mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #4568] [TUI] strata launch --stop: a failed stop no longer says nothing is running, and exits 1 #5092
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#5092
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/4568
Author: @Nyarlathoteppppp
Created: 10/29/2026
Status: 🔄 Open
Base:
main← Head:fix/4398-stop-failed📝 Commits (1)
11272fdlaunch: a failed --stop no longer says nothing is running, and exits 1 (#4398)📊 Changes
2 files changed (+28 additions, -4 deletions)
View changed files
📝
strata_cli/launch/cmd.py(+4 -4)📝
tests/terminal/test_launch.py(+24 -0)📄 Description
Problem and result
_stop_all()instrata_cli/launch/cmd.pycounts only successful stops, and itselif not stopped:branch prints the same sentence as the no-targets branch. A failed stop therefore reads:and
strata launch --stopreturns 0 whatever happened.After the change a failed stop prints only the
Could not stop …line and--stopexits 1, also when another launch in the same call stopped fine. Nothing running and all stops succeeding keep today's output and exit 0.Related discussion
Fixes #4398. The issue leaves the exit code to you; I went with 1 so a script that gates a re-launch on
--stopdoes not go on to hit the port the leftover engine still holds. Easy to drop if you prefer 0.Approach
Count failed stops next to successful ones; print "Nothing … is running" only when nothing was stopped and nothing failed; return 1 when any stop failed.
Validation
Passed:
python -m pytest tests/terminal/test_launch.py: two new tests (failed stop with and without--preset, as subtests; one failed plus one successful stop) fail on46c152aand pass with the fix. The file's other 2 failures (test_the_apps_own_installer_arguments,test_the_access_help_names_the_flags_for_showing_and_setting_a_key) fail on46c152atoo.python -m pytest tests/terminal/test_launch_dsv41.py tests/terminal/test_tui_stress_launch.py tests/terminal/test_dsv41_tui_items.py tests/terminal/test_launch_show_key_setup.py: 59 passed, 2 failed, the same as on46c152a.46c152a.Failed:
none beyond the pre-existing failures above.
Not run:
full test suite, Windows/Linux, a real engine that refuses to stop.
Limits
--stopnow exits 1 on a failed stop; a caller that treated any--stopas success will see that.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.