-
Notifications
You must be signed in to change notification settings - Fork 3.9k
fix: detect and warn about spec directory mismatch #736
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
520bba3
08de238
df76a8d
d26a21a
d92f3d9
dfc4cb3
2aea108
bfcbe48
83ef3cc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -33,6 +33,13 @@ eval $(get_feature_paths) | |||||
| # Check if we're on a proper feature branch (only for git repos) | ||||||
| check_feature_branch "$CURRENT_BRANCH" "$HAS_GIT" || exit 1 | ||||||
|
|
||||||
| # Check if branch and spec directory are in sync | ||||||
| check_and_fix_spec_directory_mismatch | ||||||
| result=$? | ||||||
| if [[ $result -ne 0 && $result -ne 1 ]]; then | ||||||
|
||||||
| if [[ $result -ne 0 && $result -ne 1 ]]; then | |
| if [[ $result -eq 1 ]]; then |
Copilot
AI
Nov 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent error handling between setup-plan.sh and check-prerequisites.sh. In check-prerequisites.sh (line 87), the function is called with || exit 1, treating any non-zero return as an error. Here, return code 1 is explicitly allowed to continue. This inconsistency suggests different intentions that should be clarified with comments or unified.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
existing_branchesvariable will have a trailing pipe character when branches exist, but will be empty when no branches exist. Line 226's checkecho \"|${existing_branches}\" | grep -qF \"|${dirname}|\"will fail for the first branch name whenexisting_branchesis non-empty because of the missing leading pipe inexisting_branches. The variable should be|branch1|branch2|format, buttr '\\n' '|'producesbranch1|branch2|. This will cause false positives for orphan detection.