util.startup: Only ask if 'prosodyctl' was meant instead of 'prosody' (fix #1692)
authorKim Alvefur <zash@zash.se>
Tue, 12 Oct 2021 15:00:15 +0200
changeset 11851 2b3ce80ffece
parent 11850 6425dfa3de45
child 11852 b4d4f0339e16
util.startup: Only ask if 'prosodyctl' was meant instead of 'prosody' (fix #1692)
util/startup.lua
--- a/util/startup.lua	Tue Oct 12 14:59:18 2021 +0200
+++ b/util/startup.lua	Tue Oct 12 15:00:15 2021 +0200
@@ -38,7 +38,9 @@
 	if not opts then
 		if err == "param-not-found" then
 			print("Unknown command-line option: "..tostring(where));
-			print("Perhaps you meant to use prosodyctl instead?");
+			if prosody.process_type == "prosody" then
+				print("Perhaps you meant to use prosodyctl instead?");
+			end
 		elseif err == "missing-value" then
 			print("Expected a value to follow command-line option: "..where);
 		end