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

Check for reserved target names (e.g. base) #898

Merged
merged 1 commit into from
Mar 30, 2021

Conversation

alexcb
Copy link
Collaborator

@alexcb alexcb commented Mar 30, 2021

  • adds a check for invalid target names that conflict with reserved
    target names

Signed-off-by: Alex Couture-Beil alex@earthly.dev

FROM alpine:latest


base:
    RUN echo foo > /data

foo:
    FROM +base
    RUN ls /data

will now produce the following error:

$ ./build/linux/amd64/earthly ~/broken/base+foo
           buildkitd | Starting buildkit daemon as a docker container (earthly-buildkitd)...
           buildkitd | ...Done
Error: resolve build context for target /home/alex/broken/base+foo: 1 validation issues.
- /home/alex/broken/base/Earthfile line 4:0 invalid target "base": base is a reserved target name

@alexcb alexcb force-pushed the check-for-reserved-target-names branch 2 times, most recently from e5ff8bd to 7d59c53 Compare March 30, 2021 17:18
- adds a check for invalid target names that conflict with reserved
target names

Signed-off-by: Alex Couture-Beil <alex@earthly.dev>
@alexcb alexcb force-pushed the check-for-reserved-target-names branch from 7d59c53 to 1200bfb Compare March 30, 2021 17:19
@alexcb alexcb marked this pull request as ready for review March 30, 2021 17:35
@alexcb alexcb merged commit 915c6ea into main Mar 30, 2021
@alexcb alexcb deleted the check-for-reserved-target-names branch March 30, 2021 17:44
alexcb added a commit that referenced this pull request Mar 31, 2021
- adds a check for invalid target names that conflict with reserved
target names

Signed-off-by: Alex Couture-Beil <alex@earthly.dev>
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.

None yet

2 participants