diff --git a/Makefile b/Makefile index 5304745..e931a95 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,15 @@ help: @echo " install Sync venv, symlink bin, install shell completions" @echo " uninstall Remove bin, completions and user symlinks" +# Working tree: xiaohe-agent/packages/myagents (submodule of apaam/myagents). +# Refuse ephemeral GHA runner checkouts (_work) so ~/.local/bin cannot point there. install: + @case "$(ROOT_DIR)" in \ + */_work/*|*/.xiaohe/actions-runner/*) \ + echo "ERROR: refuse install from GHA runner worktree: $(ROOT_DIR)" >&2; \ + echo "Use: cd /packages/myagents && make install" >&2; \ + exit 1 ;; \ + esac @cd "$(ROOT_DIR)" && \ if command -v uv >/dev/null 2>&1; then \ uv sync; \ @@ -22,6 +30,10 @@ install: @$(MAKE) _symlink-commands @echo "Installing shell completions…" @myagents completion install || echo "Warning: completion install failed" + @case "$(ROOT_DIR)" in \ + */_work/*|*/.xiaohe/actions-runner/*) \ + echo "ERROR: install root still a runner tree: $(ROOT_DIR)" >&2; exit 1 ;; \ + esac _symlink-commands: @mkdir -p "$(USER_BIN_DIR)"