Comparison

prosodyctl @ 12864:9f9633364044

Merge 0.12->trunk
author Kim Alvefur <zash@zash.se>
date Sun, 22 Jan 2023 15:43:44 +0100
parent 12589:39ae08180c81
parent 12863:891edd1ebde6
child 12954:4f2accd99373
comparison
equal deleted inserted replaced
12861:57e86d537ffe 12864:9f9633364044
668 end 668 end
669 669
670 local ok, ret = modulemanager.call_module_method(module, "command", arg); 670 local ok, ret = modulemanager.call_module_method(module, "command", arg);
671 if ok then 671 if ok then
672 if type(ret) == "number" then 672 if type(ret) == "number" then
673 os.exit(ret); 673 os.exit(ret, true);
674 elseif type(ret) == "string" then 674 elseif type(ret) == "string" then
675 show_message(ret); 675 show_message(ret);
676 end 676 end
677 os.exit(0); -- :) 677 os.exit(0, true); -- :)
678 else 678 else
679 show_message("Failed to execute command: "..error_messages[ret]); 679 show_message("Failed to execute command: "..error_messages[ret]);
680 os.exit(1); -- :( 680 os.exit(1); -- :(
681 end 681 end
682 end 682 end
750 done[command_name] = true; 750 done[command_name] = true;
751 end 751 end
752 end 752 end
753 753
754 754
755 os.exit(0); 755 os.exit(0, true);
756 end 756 end
757 757
758 os.exit(commands[command](arg)); 758 os.exit(commands[command](arg), true);
759 end, watchers); 759 end, watchers);
760 760
761 command_runner:run(true); 761 command_runner:run(true);