diff options
| author | ruki <[email protected]> | 2020-10-15 22:39:09 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-10-15 22:39:09 +0800 |
| commit | ac9709a378add2e46001f1aa954f84e6a323172a (patch) | |
| tree | 470ebd8d71357fa54132b31736f9494eda770c3b | |
| parent | bc3367481485ab9780452e8980fe3aa8162e621f (diff) | |
improve install and uninstall
| -rw-r--r-- | xmake/actions/install/main.lua | 3 | ||||
| -rw-r--r-- | xmake/actions/uninstall/main.lua | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/xmake/actions/install/main.lua b/xmake/actions/install/main.lua index cef0ce302..8b264b54e 100644 --- a/xmake/actions/install/main.lua +++ b/xmake/actions/install/main.lua @@ -125,6 +125,9 @@ function main() cprint("${color.success}install ok!") ok = true end + if not ok and os.syserror() == os.SYSERR_NOT_PERM then + wprint("please pass the --admin parameter to `xmake install` to request administrator permissions!") + end assert(ok, "install failed, %s", errors or "unknown reason") end } diff --git a/xmake/actions/uninstall/main.lua b/xmake/actions/uninstall/main.lua index fd50d8cb4..c1e361c0d 100644 --- a/xmake/actions/uninstall/main.lua +++ b/xmake/actions/uninstall/main.lua @@ -87,6 +87,9 @@ function main() cprint("${color.success}uninstall ok!") ok = true end + if not ok and os.syserror() == os.SYSERR_NOT_PERM then + wprint("please pass the --admin parameter to `xmake uninstall` to request administrator permissions!") + end assert(ok, "uninstall failed, %s", errors or "unknown reason") end } |
