Software / code / prosody
Comparison
util/startup.lua @ 11847:2b3ce80ffece
util.startup: Only ask if 'prosodyctl' was meant instead of 'prosody' (fix #1692)
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Tue, 12 Oct 2021 15:00:15 +0200 |
| parent | 11846:6425dfa3de45 |
| child | 11866:515a89dee6ae |
comparison
equal
deleted
inserted
replaced
| 11846:6425dfa3de45 | 11847:2b3ce80ffece |
|---|---|
| 36 function startup.parse_args() | 36 function startup.parse_args() |
| 37 local opts, err, where = parse_args(arg, arg_settigs[prosody.process_type]); | 37 local opts, err, where = parse_args(arg, arg_settigs[prosody.process_type]); |
| 38 if not opts then | 38 if not opts then |
| 39 if err == "param-not-found" then | 39 if err == "param-not-found" then |
| 40 print("Unknown command-line option: "..tostring(where)); | 40 print("Unknown command-line option: "..tostring(where)); |
| 41 print("Perhaps you meant to use prosodyctl instead?"); | 41 if prosody.process_type == "prosody" then |
| 42 print("Perhaps you meant to use prosodyctl instead?"); | |
| 43 end | |
| 42 elseif err == "missing-value" then | 44 elseif err == "missing-value" then |
| 43 print("Expected a value to follow command-line option: "..where); | 45 print("Expected a value to follow command-line option: "..where); |
| 44 end | 46 end |
| 45 os.exit(1); | 47 os.exit(1); |
| 46 end | 48 end |