From 2e736bfdb2c20bb795763329e021f7591e2d11a3 Mon Sep 17 00:00:00 2001 From: nose Date: Wed, 24 Dec 2025 03:14:45 -0800 Subject: [PATCH] dkfjd --- scripts/bootstrap.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index 1396be7..4553a22 100644 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -419,10 +419,14 @@ set -e # REPO is injected at install time; if it doesn't look like a project, try to # find the repo by walking up from the current working directory. REPO="__REPO__" -if [ ! -f "$REPO/CLI.py" ] && [ ! -f "$REPO/pyproject.toml" ] && [ ! -f "$REPO/setup.py" ]; then +# If the embedded REPO does not contain a canonical project marker, search +# upward from the current working directory for a project root. Use only +# explicit project markers (CLI.py or pyproject.toml) to avoid false positives +# from subdirectories like 'scripts' which may contain their own setup.py. +if [ ! -f "$REPO/CLI.py" ] && [ ! -f "$REPO/pyproject.toml" ]; then CUR="$(pwd -P)" while [ "$CUR" != "/" ] && [ "$CUR" != "" ]; do - if [ -f "$CUR/CLI.py" ] || [ -f "$CUR/pyproject.toml" ] || [ -f "$CUR/setup.py" ]; then + if [ -f "$CUR/CLI.py" ] || [ -f "$CUR/pyproject.toml" ]; then REPO="$CUR" break fi