Skip to content

fix: correct exit codes and error messages across CLI commands#388

Merged
bigcat88 merged 1 commit intomainfrom
fix/bug-fixes-exit-codes-error-messages
Mar 27, 2026
Merged

fix: correct exit codes and error messages across CLI commands#388
bigcat88 merged 1 commit intomainfrom
fix/bug-fixes-exit-codes-error-messages

Conversation

@bigcat88
Copy link
Copy Markdown
Contributor

In launch_comfyui background mode, os._exit(process.pid) was passing the process PID (e.g. 12345) as the exit code instead of the actual return code. The foreground mode had a similar issue on one path where exit(res) passed the entire CompletedProcess object instead of res.returncode.

The install, reinstall, and uninstall commands printed "Invalid command: {mode}" when rejecting all as an argument, but mode is the unrelated --mode option (remote/local/cache) which defaults to None, so users saw "Invalid command: None.".

Also fixes a stray ) in the GitHub rate limit error message and a "migit" typo.

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. bug Something isn't working labels Mar 27, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 27, 2026

Codecov Report

❌ Patch coverage is 57.14286% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
comfy_cli/command/launch.py 0.00% 3 Missing ⚠️
@@            Coverage Diff             @@
##             main     #388      +/-   ##
==========================================
+ Coverage   70.94%   71.07%   +0.12%     
==========================================
  Files          33       33              
  Lines        3931     3931              
==========================================
+ Hits         2789     2794       +5     
+ Misses       1142     1137       -5     
Files with missing lines Coverage Δ
comfy_cli/command/custom_nodes/command.py 79.69% <100.00%> (ø)
comfy_cli/command/install.py 76.15% <100.00%> (+0.96%) ⬆️
comfy_cli/command/launch.py 42.68% <0.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bigcat88 bigcat88 merged commit be361e1 into main Mar 27, 2026
14 checks passed
@bigcat88 bigcat88 deleted the fix/bug-fixes-exit-codes-error-messages branch March 27, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant