Changeset

12786:5d4957c8a972

util.prosodyctl.cert: Remove Lua 5.1 os.execute() return value compat
author Kim Alvefur <zash@zash.se>
date Thu, 20 Oct 2022 17:37:33 +0200
parents 12785:123d74bf60e3
children 12789:517b5702c5a1
files util/prosodyctl/cert.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/util/prosodyctl/cert.lua	Thu Oct 20 17:37:07 2022 +0200
+++ b/util/prosodyctl/cert.lua	Thu Oct 20 17:37:33 2022 +0200
@@ -179,7 +179,7 @@
 		os.execute(("chown -c --reference=%s %s"):format(sh_esc(cert_basedir), sh_esc(to)));
 	elseif owner and group then
 		local ok = os.execute(("chown %s:%s %s"):format(sh_esc(owner), sh_esc(group), sh_esc(to)));
-		assert(ok == true or ok == 0, "Failed to change ownership of "..to);
+		assert(ok, "Failed to change ownership of "..to);
 	end
 	if old_umask then pposix.umask(old_umask); end
 	return true;