fix: align Windows destroy.bat behavior with bash destroy script (fixes #342)#399
Merged
pradeeban merged 1 commit intoFeb 19, 2026
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a critical bug in the Windows destroy.bat script where it was only checking for the existence of stop.bat but not actually executing it or clear.bat before deleting the study directory. This left Docker containers running, processes active, and volumes dangling on Windows systems.
Changes:
- Fixed
destroy.batto properly executestop.batandclear.batbefore directory deletion, aligning with bashdestroyscript behavior - Added proper error handling with directory existence checks and appropriate exit codes
- Improved path handling with proper quoting for spaces
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi pradeeban Sir,
Fixes #342.
This PR updates
destroy.batso its behavior matches the bashdestroyscript.Previously
destroy.batonly checked whetherstop.batexisted and then immediately deleted the study directory. It did not actually runstop.batorclear.bat. Because of this, Docker containers or background processes could remain running, and volumes or files could be left behind.This change makes the Windows script follow the same order as the bash version.
Changes in this PR:
stop.batbefore deletionclear.bat(if the file exists)rmdir /s /qcallsemanticsThe result is that Windows now follows the same flow as bash:
stop → clear → delete
Scope:
destroy.batTesting done locally on Windows:
stop.bat(not a concore study) → error message, exit code 1stop.batandclear.bat→ stop runs → clear runs → directory removedstop.bat→ stop runs → directory removed (clear skipped)All tests passed.