dunglas / frankenphp

🧟 The modern PHP app server
https://frankenphp.dev
MIT License
6.96k stars 244 forks source link

fix: Ignore watcher dir creation error if the watcher exists #1165

Closed bk-ty closed 1 week ago

bk-ty commented 1 week ago

Docker presented the error when building on linux/arm64. Applying the -p flag to mkdir allowed for successful builds.

0.324 + curlGitHubHeaders=(--header "X-GitHub-Api-Version: 2022-11-28")
0.324 + '[' '' ']'
0.324 + mkdir watcher
0.324 mkdir: can't create directory 'watcher': File exists
dunglas commented 1 week ago

Thanks!

wayanjimmy commented 1 week ago

@dunglas is this fix included in 1.3.1 ?

AlliBalliBaba commented 1 week ago

Hmm I don't think it is in 1.3.1 yet, in the meantime you can add an rm -r at the end of the static-build.Dockerfile like this:

# Build the static binary
WORKDIR /go/src/app/
RUN rm -r dist/static-php-cli/watcher
RUN EMBED=dist/app/ ./build-static.sh
wayanjimmy commented 1 week ago

nice idea thanks @AlliBalliBaba