aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2024-04-07 18:36:00 +0200
committerKim Alvefur <zash@zash.se>2024-04-07 18:36:00 +0200
commit269d40f1eaa5e9a9042d77fbf9418509a87023d3 (patch)
treed002de38524a59ed95b74eec0229e75b96091138
parentb438a292e95ffc5185a17ef345628b890564b2b8 (diff)
downloadprosody-269d40f1eaa5e9a9042d77fbf9418509a87023d3.tar.gz
prosody-269d40f1eaa5e9a9042d77fbf9418509a87023d3.zip
mod_version: Fix uname result style (thanks riau)
`result[, err]`, not `ok, err|result`, must have confused it with pcall
-rw-r--r--plugins/mod_version.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/mod_version.lua b/plugins/mod_version.lua
index 8c221c0d..72b13387 100644
--- a/plugins/mod_version.lua
+++ b/plugins/mod_version.lua
@@ -22,9 +22,9 @@ if not module:get_option_boolean("hide_os_type") then
local os_version_command = module:get_option_string("os_version_command");
local ok, pposix = pcall(require, "prosody.util.pposix");
if not os_version_command and (ok and pposix and pposix.uname) then
- local ok, uname = pposix.uname();
- if not ok then
- module:log("debug", "Could not retrieve OS name: %s", uname);
+ local uname, err = pposix.uname();
+ if not uname then
+ module:log("debug", "Could not retrieve OS name: %s", err);
else
platform = uname.sysname;
end