-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Display a warning when ~ is used in a
COPY
destination (#3540)
Got some feedback about how `~` is expected to expand to a home directory. However this is not something that Earthly currently supports (see #1789 for more info). This PR will display a warning if a `~` is used to make it clear to the user.
- Loading branch information
Showing
4 changed files
with
60 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
VERSION 0.7 | ||
|
||
FROM alpine:3.18 | ||
WORKDIR /test | ||
|
||
artifact: | ||
COPY --dir in in | ||
SAVE ARTIFACT in | ||
|
||
copy-tilde-destination: | ||
RUN echo destination is tilde | ||
COPY in ~/. | ||
|
||
copy-tilde-in-destination: | ||
RUN echo destination contains tilde | ||
RUN mkdir -p /some/dir | ||
COPY in /some/dir/~/. | ||
|
||
copy-tilde-in-destination-prefix: | ||
RUN echo destination contains tilde in prefix | ||
RUN mkdir -p ~some/dir | ||
COPY in ~some/dir. | ||
|
||
copy-tilde-arg-in-destination: | ||
RUN echo destination arg contains tilde | ||
RUN mkdir -p /some/dir | ||
ARG dest=/some/dir/~/. | ||
COPY in $dest | ||
|
||
copy-tilde-artifact: | ||
RUN echo destination contains tilde for artifact | ||
RUN mkdir -p /some/dir | ||
ARG dest=/some/dir/~/. | ||
COPY +artifact/in /some/dir/~/. | ||
|
||
copy-tilde-in-destination-not-prefix: | ||
RUN echo destination contains a tilde but that should not trigger a warning | ||
RUN mkdir -p some/di~r | ||
COPY in some/di~r. |