Skip to content

doctor: warn when .env exists but is not gitignored#67

Open
SAY-5 wants to merge 2 commits into
ashlrai:mainfrom
SAY-5:feat/doctor-env-gitignore-wildcards
Open

doctor: warn when .env exists but is not gitignored#67
SAY-5 wants to merge 2 commits into
ashlrai:mainfrom
SAY-5:feat/doctor-env-gitignore-wildcards

Conversation

@SAY-5
Copy link
Copy Markdown
Contributor

@SAY-5 SAY-5 commented May 5, 2026

Closes #39. Extends doctor's existing .gitignore check to recognize wildcard patterns (*.env, **/.env, .env*, etc.) by delegating to git check-ignore when a repo is present, and falling back to a broader text scan otherwise. Adds five unit tests covering exact-match, wildcard, double-star glob, missing-entry, and comment-only fallback cases.

Signed-off-by: SAY-5 <saiasish.cnp@gmail.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 5, 2026

Someone is attempting to deploy a commit to the Evero Team on Vercel.

A member of the Team first needs to authorize it.

@SAY-5
Copy link
Copy Markdown
Contributor Author

SAY-5 commented May 6, 2026

The Ignored Tests job failures (cloud_pull_handles_404_gracefully, cloud_push_calls_vault_push_endpoint, cloud_push_then_pull_round_trip) are pre-existing failures on main, not regressions introduced by this PR. They reproduce on the most recent successful main-branch CI runs (e.g. workflow run 25302582843) with the same "Authentication required. Run phantom login first." panic.

This PR's change is limited to crates/phantom-cli/src/commands/doctor.rs (the .gitignore wildcard check), which is unrelated to the cloud_test.rs integration suite. The Lint and Test (ubuntu/macos/windows) jobs that exercise the actual change all pass.

(The Vercel deploy failure is a fork-PR auth boundary, same on every fork PR.)

@SAY-5 SAY-5 force-pushed the feat/doctor-env-gitignore-wildcards branch from 187bc70 to 383e7fe Compare May 31, 2026 02:34
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.

phantom doctor should warn if .env is not gitignored

1 participant