mirror of
https://github.com/bjc/prosody.git
synced 2025-04-03 05:07:42 +03:00
mod_version: Fix uname result style (thanks riau)
`result[, err]`, not `ok, err|result`, must have confused it with pcall
This commit is contained in:
parent
b438a292e9
commit
269d40f1ea
1 changed files with 3 additions and 3 deletions
|
@ -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 os_version_command = module:get_option_string("os_version_command");
|
||||||
local ok, pposix = pcall(require, "prosody.util.pposix");
|
local ok, pposix = pcall(require, "prosody.util.pposix");
|
||||||
if not os_version_command and (ok and pposix and pposix.uname) then
|
if not os_version_command and (ok and pposix and pposix.uname) then
|
||||||
local ok, uname = pposix.uname();
|
local uname, err = pposix.uname();
|
||||||
if not ok then
|
if not uname then
|
||||||
module:log("debug", "Could not retrieve OS name: %s", uname);
|
module:log("debug", "Could not retrieve OS name: %s", err);
|
||||||
else
|
else
|
||||||
platform = uname.sysname;
|
platform = uname.sysname;
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue