diff options
| author | ruki <[email protected]> | 2019-03-16 00:45:13 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-03-15 22:31:18 +0800 |
| commit | 08488b9e3a4e38e9cfe4f018d18a91f61b78e7fc (patch) | |
| tree | 9c6418a2923ef8cd1b914627569b530062a886cb /xmake/modules/package | |
| parent | e5c057bac9799f8b7f94a2f5f7d5c14a53b675e6 (diff) | |
fix install package
Diffstat (limited to 'xmake/modules/package')
| -rw-r--r-- | xmake/modules/package/manager/xmake/find_package.lua | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/xmake/modules/package/manager/xmake/find_package.lua b/xmake/modules/package/manager/xmake/find_package.lua index 1264e72a6..0c6461480 100644 --- a/xmake/modules/package/manager/xmake/find_package.lua +++ b/xmake/modules/package/manager/xmake/find_package.lua @@ -133,12 +133,14 @@ function _find_package_from_repo(name, opt) end -- update the project references file - local projectdir = os.projectdir() - if projectdir and os.isdir(projectdir) then - local references_file = path.join(installdir, "references.txt") - local references = os.isfile(references_file) and io.load(references_file) or {} - references[projectdir] = os.date("%y%m%d") - io.save(references_file, references) + if result then + local projectdir = os.projectdir() + if projectdir and os.isdir(projectdir) then + local references_file = path.join(installdir, "references.txt") + local references = os.isfile(references_file) and io.load(references_file) or {} + references[projectdir] = os.date("%y%m%d") + io.save(references_file, references) + end end -- get version |
