Skip to content

Conversation

@leobrines
Copy link

possible fix for issue #938

@leobrines leobrines requested a review from localden as a code owner October 18, 2025 03:02
Comment on lines +66 to 78
# First try to find .specify directory (highest priority)
REPO_ROOT="$(find_repo_root "$SCRIPT_DIR")"
if [ -n "$REPO_ROOT" ]; then
# Check if this is a git repository
if git rev-parse --show-toplevel >/dev/null 2>&1; then
HAS_GIT=true
else
HAS_GIT=false
fi
HAS_GIT=false
else
echo "Error: Could not determine repository root. Please run this script from within the repository." >&2
exit 1
fi
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# First try to find .specify directory (highest priority)
REPO_ROOT="$(find_repo_root "$SCRIPT_DIR")"
if [ -n "$REPO_ROOT" ]; then
# Check if this is a git repository
if git rev-parse --show-toplevel >/dev/null 2>&1; then
HAS_GIT=true
else
HAS_GIT=false
fi
HAS_GIT=false
else
echo "Error: Could not determine repository root. Please run this script from within the repository." >&2
exit 1
fi
# Source common functions
source "$SCRIPT_DIR/common.sh"
# Get all paths and variables from common functions
eval $(get_feature_paths)

If you have already fixed the get_repo_root method, why not use it ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants