Skip to content

fix(review): stop source env from running /usr/bin/env - #10

Merged
stasadev merged 1 commit into
mainfrom
20261029_stasadev_review_env_path
Oct 29, 2026
Merged

stasadev merged 1 commit into
mainfrom
20261029_stasadev_review_env_path

Conversation

@stasadev

Copy link
Copy Markdown
Member

Short Summary (TL;DR)

The review skill's env file is now review.env, sourced by its absolute path. An agent that ran source env in the review directory ran /usr/bin/env instead, so the next ddev command used the user's real global config.

The Issue

Bash's source looks a name without a slash up on PATH before the current directory. The review skill wrote its env file as env, so source env found /usr/bin/env and failed. Commands after it ran without DDEV_XDG_CONFIG_HOME. In one review, this started a test project in the user's own global config and recreated their ddev-router. Agents hit it in several reviews.

How This PR Solves The Issue

  • The file is now review.env, which isn't on PATH.
  • The example shows sourcing it by its absolute path in each later command.

Manual Testing Instructions

cd "$(mktemp -d "$HOME/tmp/env-test.XXXXXX")"
echo 'export X=ok' > env && echo 'export X=ok' > review.env
source env; echo "X=$X"
# Expect "source: /usr/bin/env: cannot execute binary file" and an empty X
source review.env; echo "X=$X"
# Expect X=ok

Automated Testing Overview

No tests cover skill text. Claude Code ran claude plugin validate ..

🤖 Generated with Claude Code

## Short Summary (TL;DR)

The review skill's env file is now `review.env`, sourced by its absolute path. An agent that ran `source env` in the review directory ran `/usr/bin/env` instead, so the next ddev command used the user's real global config.

## The Issue

Bash's `source` looks a name without a slash up on `PATH` before the current directory. The review skill wrote its env file as `env`, so `source env` found `/usr/bin/env` and failed. Commands after it ran without `DDEV_XDG_CONFIG_HOME`. In one review, this started a test project in the user's own global config and recreated their `ddev-router`. Agents hit it in several reviews.

## How This PR Solves The Issue

- The file is now `review.env`, which isn't on `PATH`.
- The example shows sourcing it by its absolute path in each later command.

## Manual Testing Instructions

```bash
cd "$(mktemp -d "$HOME/tmp/env-test.XXXXXX")"
echo 'export X=ok' > env && echo 'export X=ok' > review.env
source env; echo "X=$X"
# Expect "source: /usr/bin/env: cannot execute binary file" and an empty X
source review.env; echo "X=$X"
# Expect X=ok
```

## Automated Testing Overview

No tests cover skill text. Claude Code ran `claude plugin validate .`.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@stasadev
stasadev merged commit 940beec into main Oct 29, 2026
1 check passed
@stasadev
stasadev deleted the 20261029_stasadev_review_env_path branch October 29, 2026 15:16
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.

1 participant