fix: apply default_launch_extras when cwd is the default workspace#374
Merged
fix: apply default_launch_extras when cwd is the default workspace#374
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #374 +/- ##
==========================================
+ Coverage 54.51% 54.89% +0.38%
==========================================
Files 32 32
Lines 3603 3618 +15
==========================================
+ Hits 1964 1986 +22
+ Misses 1639 1632 -7
... and 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
ce16f8c to
f88a4f2
Compare
b224f96 to
024b5a8
Compare
When a user cd's into their configured default ComfyUI workspace and runs comfy launch, default_launch_extras were silently ignored because get_workspace_path returned CURRENT_DIR before checking if cwd matches the configured default. Now step 4 compares cwd against the default workspace and returns DEFAULT when they match. Closes #311
024b5a8 to
f1cd7ef
Compare
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.
When a user cd's into their configured default ComfyUI workspace and runs comfy launch, the default_launch_extras setting is silently ignored. This happens because get_workspace_path() detects the cwd as a ComfyUI repo (step 4) and returns CURRENT_DIR before ever checking whether it matches the configured default (step 5). The launch command only applies default_launch_extras when the workspace type is DEFAULT.
The fix adds a check in step 4: when cwd is detected as a ComfyUI repo, compare it against the configured default workspace before deciding the type. If they match, return DEFAULT so the launch extras are applied correctly. The comparison uses os.path.samefile to handle symlinks and case-insensitive filesystems, with a realpath fallback for nonexistent paths.
This is a simpler alternative to #338 — only workspace_manager.py is changed, no modifications to launch.py needed.
Closes #311