fix(bootstrap): stub nohup so Linux CI records pnpm dev
The anything-analyzer start path backgrounds `nohup pnpm dev`. On Ubuntu CI that never invoked the pnpm stub, so the source-pin regression missed the argv. Intercept nohup like sudo, and fall back to a plain background when nohup is absent.
This commit is contained in:
@@ -679,7 +679,14 @@ ensure_anything_analyzer() {
|
||||
if $START_SERVICES; then
|
||||
(cd "$dir" && pnpm install --frozen-lockfile) || return 1
|
||||
install_git_commit "$repo" "$commit" "$dir" || return 1
|
||||
(cd "$dir" && nohup pnpm dev >/tmp/anything-analyzer.log 2>&1 &)
|
||||
(
|
||||
cd "$dir" || exit 1
|
||||
if has_cmd nohup; then
|
||||
nohup pnpm dev >/tmp/anything-analyzer.log 2>&1 &
|
||||
else
|
||||
pnpm dev >/tmp/anything-analyzer.log 2>&1 &
|
||||
fi
|
||||
)
|
||||
if wait_for_port 23816 120; then
|
||||
if test_mcp_http 23816; then
|
||||
log_ok "anything-analyzer MCP server ready on port 23816 (HTTP verified)"
|
||||
|
||||
@@ -16,7 +16,7 @@ cat > "$STUB_BIN/command-stub" <<'STUB'
|
||||
#!/usr/bin/env bash
|
||||
name="$(basename "$0")"
|
||||
{ printf '%s' "$name"; for arg in "$@"; do printf '|%s' "$arg"; done; printf '\n'; } >> "$CALL_LOG"
|
||||
if [[ "$name" == sudo ]]; then
|
||||
if [[ "$name" == sudo || "$name" == nohup ]]; then
|
||||
next="${1:-}"; shift || true
|
||||
exec "$(dirname "$0")/$next" "$@"
|
||||
fi
|
||||
@@ -57,7 +57,7 @@ esac
|
||||
[[ "${STUB_FAIL_COMMAND:-}" != "$name" ]]
|
||||
STUB
|
||||
chmod +x "$STUB_BIN/command-stub"
|
||||
for name in git node npm npx pipx pnpm sleep nc apt-get sudo; do ln -s command-stub "$STUB_BIN/$name"; done
|
||||
for name in git node npm npx pipx pnpm sleep nc apt-get sudo nohup; do ln -s command-stub "$STUB_BIN/$name"; done
|
||||
ln -s command-stub "$STUB_BIN/brew"
|
||||
|
||||
cat > "$STUB_BIN/python3" <<STUB
|
||||
@@ -112,7 +112,7 @@ anything_pin=$(json_value anything-analyzer pinnedCommit)
|
||||
NO_PYTHON_BIN="$SCRATCH/no-python-bin"
|
||||
PARSER_FIXTURE="$SCRATCH/parser-bootstrap"
|
||||
mkdir -p "$NO_PYTHON_BIN"
|
||||
for name in git node npm npx pipx pnpm sleep nc brew apt-get sudo; do ln -s "$STUB_BIN/command-stub" "$NO_PYTHON_BIN/$name"; done
|
||||
for name in git node npm npx pipx pnpm sleep nc brew apt-get sudo nohup; do ln -s "$STUB_BIN/command-stub" "$NO_PYTHON_BIN/$name"; done
|
||||
for tool in bash uname dirname mktemp rm head tr basename mkdir cat ln; do ln -s "$(command -v "$tool")" "$NO_PYTHON_BIN/$tool"; done
|
||||
mkdir -p "$PARSER_FIXTURE"
|
||||
cp "$BOOTSTRAP" "$PARSER_FIXTURE/bootstrap-reverse.sh"
|
||||
|
||||
Reference in New Issue
Block a user