Skip to content

bootstrap.bash: fix initial cleanup - #191

Merged
pointlander merged 1 commit into
pointlander:mainfrom
dolmen-go:fix-bootstrap-cleanup
May 19, 2026
Merged

pointlander merged 1 commit into
pointlander:mainfrom
dolmen-go:fix-bootstrap-cleanup

Conversation

@dolmen

@dolmen dolmen commented May 18, 2026

Copy link
Copy Markdown
Contributor

Fixes this failure on macOS:

$ ./bootstrap.bash
rm: bootstrap/bootstrap.peg.go: Not a directory

Why?

On macOS, rm -f is stricter about its given paths: rm -f a/b fails if a is not a directory but a file.

With the command (cd bootstrap && go build && rm -f bootstrap/bootstrap.peg.go) we try to remove bootstrap/bootstrap/bootstrap.peg.go while we just created bootstrap/bootstrap as a file, not a directory.

Fix initial cleanup of previous failed builds.

Fixes this failure on macOS:
$ ./bootstrap.bash
rm: bootstrap/bootstrap.peg.go: Not a directory

Why?

On macOS, 'rm -f' is stricter about its given paths: 'rm -f a/b' fails
if 'a' is not a directory but a file. With the command
'(cd bootstrap && go build && rm -f bootstrap/bootstrap.peg.go)' we try to
remove bootstrap/bootstrap/bootstrap.peg.go while we just created bootstrap/bootstrap
as a file, not a directory.
@pointlander
pointlander merged commit c69663a into pointlander:main May 19, 2026
1 check passed
@dolmen
dolmen deleted the fix-bootstrap-cleanup branch May 21, 2026 15:27
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.

2 participants