summaryrefslogtreecommitdiff
path: root/xmake/actions/require/impl
diff options
context:
space:
mode:
authorruki <[email protected]>2019-03-16 00:45:13 +0800
committerruki <[email protected]>2019-03-15 22:31:18 +0800
commit08488b9e3a4e38e9cfe4f018d18a91f61b78e7fc (patch)
tree9c6418a2923ef8cd1b914627569b530062a886cb /xmake/actions/require/impl
parente5c057bac9799f8b7f94a2f5f7d5c14a53b675e6 (diff)
fix install package
Diffstat (limited to 'xmake/actions/require/impl')
-rw-r--r--xmake/actions/require/impl/action/install.lua13
1 files changed, 7 insertions, 6 deletions
diff --git a/xmake/actions/require/impl/action/install.lua b/xmake/actions/require/impl/action/install.lua
index 0dd3a731b..0e8e8972e 100644
--- a/xmake/actions/require/impl/action/install.lua
+++ b/xmake/actions/require/impl/action/install.lua
@@ -100,6 +100,9 @@ function main(package)
filter.call(script, package)
end
end
+
+ -- save the package info to the manifest file
+ package:manifest_save()
need_test = true
end
end
@@ -111,14 +114,9 @@ function main(package)
end
assert(fetchinfo, "fetch %s failed!", tipname)
- -- need continue to test it?
+ -- test it
if need_test then
-
- -- test it
test(package)
-
- -- save the package info to the manifest file
- package:manifest_save()
end
end
@@ -145,6 +143,9 @@ function main(package)
-- trace
cprint("${color.failure}${text.failure}")
+ -- remove the invalid package directory
+ os.tryrm(package:installdir())
+
-- failed
if not package:requireinfo().optional then
raise("install failed!")