Software /
code /
prosody
Comparison
prosodyctl @ 10905:709255e332d8
prosodyctl: Fix traceback when no command provided (thanks Zash)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 04 Jun 2020 17:26:18 +0100 |
parent | 10871:e5dee71d0ebb |
child | 10964:d6a3d652ca32 |
comparison
equal
deleted
inserted
replaced
10904:d009a79f723a | 10905:709255e332d8 |
---|---|
585 show_message("Failed to execute command: "..error_messages[ret]); | 585 show_message("Failed to execute command: "..error_messages[ret]); |
586 os.exit(1); -- :( | 586 os.exit(1); -- :( |
587 end | 587 end |
588 end | 588 end |
589 | 589 |
590 if not commands[command] then | 590 if command and not commands[command] then |
591 local ok, command_module = pcall(require, "util.prosodyctl."..command); | 591 local ok, command_module = pcall(require, "util.prosodyctl."..command); |
592 if ok and command_module[command] then | 592 if ok and command_module[command] then |
593 commands[command] = command_module[command]; | 593 commands[command] = command_module[command]; |
594 end | 594 end |
595 end | 595 end |