equal
deleted
inserted
replaced
661 end |
661 end |
662 |
662 |
663 local ok, ret = modulemanager.call_module_method(module, "command", arg); |
663 local ok, ret = modulemanager.call_module_method(module, "command", arg); |
664 if ok then |
664 if ok then |
665 if type(ret) == "number" then |
665 if type(ret) == "number" then |
666 os.exit(ret); |
666 os.exit(ret, true); |
667 elseif type(ret) == "string" then |
667 elseif type(ret) == "string" then |
668 show_message(ret); |
668 show_message(ret); |
669 end |
669 end |
670 os.exit(0); -- :) |
670 os.exit(0, true); -- :) |
671 else |
671 else |
672 show_message("Failed to execute command: "..error_messages[ret]); |
672 show_message("Failed to execute command: "..error_messages[ret]); |
673 os.exit(1); -- :( |
673 os.exit(1); -- :( |
674 end |
674 end |
675 end |
675 end |
743 done[command_name] = true; |
743 done[command_name] = true; |
744 end |
744 end |
745 end |
745 end |
746 |
746 |
747 |
747 |
748 os.exit(0); |
748 os.exit(0, true); |
749 end |
749 end |
750 |
750 |
751 os.exit(commands[command](arg)); |
751 os.exit(commands[command](arg), true); |
752 end, watchers); |
752 end, watchers); |
753 |
753 |
754 command_runner:run(true); |
754 command_runner:run(true); |