Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression: COPY --if-exists + wildcard is broken in v0.8 #3875

Closed
idelvall opened this issue Mar 7, 2024 · 2 comments · Fixed by #3877
Closed

Regression: COPY --if-exists + wildcard is broken in v0.8 #3875

idelvall opened this issue Mar 7, 2024 · 2 comments · Fixed by #3877
Assignees
Labels
type:bug Something isn't working

Comments

@idelvall
Copy link
Member

idelvall commented Mar 7, 2024

The following command fails in v.0.8.x but works in v0.7.23

earthly --no-cache +build
VERSION 0.7

build:
 FROM alpine
 COPY --if-exists non_existing_folder/* /
@idelvall idelvall added the type:bug Something isn't working label Mar 7, 2024
@idelvall idelvall changed the title Regression: COPY --if-exists + wildcard is broken Regression: COPY --if-exists + wildcard is broken in v0.8 Mar 7, 2024
@mikejholly
Copy link
Contributor

This PR may have introduced a regression with the wildcard case.

mikejholly added a commit that referenced this issue Mar 8, 2024
Fixes: #3875

This PR fixes the issue, but I'm curious why the `!strings.Contains(src,
"*")` was added in the first place. It seems like all of the relevant
tests pass without this extra condition.
@idelvall
Copy link
Member Author

idelvall commented Mar 8, 2024

Thanks Mike!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants