Repository navigation
test: the make env mode check reads GNU stat first, so it passes on Linux - #63
Merged
Merged
Conversation
…inux The check ran `stat -f %Lp FILE || stat -c %a FILE`. GNU stat reads -f as "file system" and %Lp as a file name: it prints the file system's details, exits non-zero on the missing name, and the fallback adds "600", so the output never equals 600. CI on Linux failed on it from #61 on (89ca301, and the v2.0.0 release commit 4e62d44); macOS passed. GNU's form first, then BSD's, gives 600 on both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Main's CI has been red since #61: the
staticjob fails one module test,make env: creates .env from .env.example, readable only by its owner. That includes the v2.0.0 release commit (#62). macOS passes the test, so local runs stayed green.Cause
The test read the mode with
stat -f %Lp FILE 2>/dev/null || stat -c %a FILE, BSD's form first. GNU stat on Linux reads-fas "file system" and%Lpas a file name. It prints the file system's details for.env, exits non-zero on the missing%Lp, and the fallback then prints600. The captured output is therefore several lines plus600, never600.The
Makefiletemplate is correct:cp .env.example .env && chmod 600 .env. Only the test is wrong.Fix
Read GNU's form first, then BSD's:
stat -c %a FILE 2>/dev/null || stat -f %Lp FILE. BSD stat rejects-cand prints nothing to stdout, so the fallback gives600there. A comment above the check says why the order matters.This is a test-only change, so it needs no changelog entry. The
v2.0.0tag still belongs on the release merge commit (4e62d44): this change ships nothing.Checks
evals/static/test-modules.shpasses all 69 tests.🤖 Generated with Claude Code