Skip to content

bootstrap.bash: fix initial cleanup#191

Open
dolmen wants to merge 1 commit into
pointlander:mainfrom
dolmen-go:fix-bootstrap-cleanup
Open

bootstrap.bash: fix initial cleanup#191
dolmen wants to merge 1 commit into
pointlander:mainfrom
dolmen-go:fix-bootstrap-cleanup

Conversation

@dolmen
Copy link
Copy Markdown

@dolmen dolmen commented May 18, 2026

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.
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