diff --git a/tools/plan_check b/tools/plan_check index 63a6908..7e897ff 100755 --- a/tools/plan_check +++ b/tools/plan_check @@ -8,7 +8,7 @@ if len(sys.argv) < 3: sys.exit(1) import shutil -if os.environ.get('OLLIE_BEADS_ENABLE') == '1' and shutil.which('bd'): +if os.environ.get('OLLIE_BEADS_ENABLE') == '1' and shutil.which('bd') and os.path.exists('.beads'): print("error: beads is available — use 'bd' for planning instead of plan_check", file=sys.stderr) sys.exit(2) diff --git a/tools/plan_create b/tools/plan_create index bae18a3..3f2bb02 100755 --- a/tools/plan_create +++ b/tools/plan_create @@ -4,7 +4,7 @@ # Output: plan filename in pl/ set -euo pipefail -if [ "${OLLIE_BEADS_ENABLE:-0}" = "1" ] && command -v bd >/dev/null 2>&1; then +if [ "${OLLIE_BEADS_ENABLE:-0}" = "1" ] && command -v bd >/dev/null 2>&1 && [ -f ".beads" ]; then echo "error: beads is available — use 'bd' for planning instead of plan_create" >&2 exit 2 fi diff --git a/tools/plan_start b/tools/plan_start index 4b2fb70..46cf92e 100755 --- a/tools/plan_start +++ b/tools/plan_start @@ -4,7 +4,7 @@ # Output: new filename set -euo pipefail -if [ "${OLLIE_BEADS_ENABLE:-0}" = "1" ] && command -v bd >/dev/null 2>&1; then +if [ "${OLLIE_BEADS_ENABLE:-0}" = "1" ] && command -v bd >/dev/null 2>&1 && [ -f ".beads" ]; then echo "error: beads is available — use 'bd' for planning instead of plan_start" >&2 exit 2 fi