Summary
The user is inquiring about using the COPY command with wildcards and the --if-exists option in Earthly. They note that using COPY *.go ./
fails if no .go
files are present, while using COPY --if-exists *.go ./
does not copy the files even when they are available. They mention a potential related issue on GitHub and specify their Earthly version and system details.
jroberts
How can I use COPY with wilcards and --if-exists ?
If I do COPY *.go ./
then if fails when no .go
files are present - failed: /*.go not found
If if do COPY --if-exists *.go ./
then it does not copy the files when they are present.
Possible related to https://github.com/earthly/earthly/issues/3875, i'm running the latest version of earthly earthly version v0.8.15 cb38f72663696d17d8393b1cc8bac66aed28faa2 darwin/arm64; macOS 14.6.1 homebrew