Software /
code /
prosody
Changeset
13476:b9267ce1b183
mod_version: Fix uname result style (thanks riau)
`result[, err]`, not `ok, err|result`, must have confused it with pcall
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 07 Apr 2024 18:36:00 +0200 |
parents | 13475:c14659710747 |
children | 13477:e8ac3ce3238e |
files | plugins/mod_version.lua |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_version.lua Sat Apr 06 16:51:27 2024 +0200 +++ b/plugins/mod_version.lua Sun Apr 07 18:36:00 2024 +0200 @@ -22,9 +22,9 @@ 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