aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-01-21 19:02:03 +0100
committerKim Alvefur <zash@zash.se>2021-01-21 19:02:03 +0100
commit07e3f4ace874a1dfe9d0d8612a69fd0f9ec7d972 (patch)
tree2333be55953f2bec1babb85518cdbbb5bdc98d61
parent47c0ab5788fc340f742f9fe83db3a518609dbe36 (diff)
downloadprosody-07e3f4ace874a1dfe9d0d8612a69fd0f9ec7d972.tar.gz
prosody-07e3f4ace874a1dfe9d0d8612a69fd0f9ec7d972.zip
prosodyctl: Use luarocks status code as exit code
Enables some shell level error handling
-rwxr-xr-xprosodyctl9
1 files changed, 6 insertions, 3 deletions
diff --git a/prosodyctl b/prosodyctl
index 42647055..aa1bc2d9 100755
--- a/prosodyctl
+++ b/prosodyctl
@@ -79,7 +79,8 @@ function commands.install(arg)
return 1;
end
-- TODO finalize config option name
- call_luarocks("install", arg[1], configmanager.get("*", "plugin_server") or "http://localhost/");
+ local ret = call_luarocks("install", arg[1], configmanager.get("*", "plugin_server") or "http://localhost/");
+ return ret;
end
function commands.remove(arg)
@@ -87,7 +88,8 @@ function commands.remove(arg)
show_usage([[remove]], [[Removes a module installed in the working directory's plugins folder]]);
return 1;
end
- call_luarocks("remove", arg[1])
+ local ret = call_luarocks("remove", arg[1]);
+ return ret;
end
function commands.list(arg)
@@ -95,7 +97,8 @@ function commands.list(arg)
show_usage([[list]], [[Shows installed rocks]]);
return 1;
end
- call_luarocks("list", arg[1])
+ local ret = call_luarocks("list", arg[1]);
+ return ret;
end
function commands.adduser(arg)