Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
frontend/dockerfile: BFlags.Parse: include flag with "--" prefix in e…
…rrors Before this change, only the name of the flag would be printed as part of errors. Change the errors to include the flag-name _including_ the "--" prefix to make it more clear the error is about a flag that was provided but invalid. Before this change: Dockerfile:2 -------------------- 1 | FROM alpine 2 | >>> COPY --nosuchflag . . 3 | -------------------- ERROR: failed to solve: dockerfile parse error on line 2: unknown flag: nosuchflag Dockerfile:4 -------------------- 2 | FROM alpine 3 | WORKDIR /test 4 | >>> COPY --exclude /.git . . 5 | -------------------- ERROR: failed to solve: dockerfile parse error on line 4: missing a value on flag: exclude With this change; Dockerfile:2 -------------------- 1 | FROM alpine 2 | >>> COPY --nosuchflag . . 3 | -------------------- ERROR: failed to solve: dockerfile parse error on line 2: unknown flag: --nosuchflag Dockerfile:4 -------------------- 2 | FROM alpine 3 | WORKDIR /test 4 | >>> COPY --exclude /.git . . 5 | -------------------- ERROR: failed to solve: dockerfile parse error on line 4: missing a value on flag: --exclude Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
- Loading branch information