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

Evaluate variable default values in determining if blank #269

Closed
duckbrain opened this issue Jun 18, 2024 · 2 comments
Closed

Evaluate variable default values in determining if blank #269

duckbrain opened this issue Jun 18, 2024 · 2 comments
Labels

Comments

@duckbrain
Copy link

If I create a Dockerfile with the following contents

FROM ${VAR:-ignore}

I get a diagnostic error:

dockerfile-utils: base name (${VAR:-ignore}) should not be blank [51]

The :- syntax provides a default value so if $VAR is blank, ignore is used instead, so there's no way for the image name to be blank.

@rcjsuen
Copy link
Owner

rcjsuen commented Jun 18, 2024

@duckbrain Thank you for bringing this to our attention. I have opened rcjsuen/dockerfile-utils#126 to track this.

@rcjsuen rcjsuen added the bug label Jun 18, 2024
@rcjsuen
Copy link
Owner

rcjsuen commented Jun 19, 2024

@duckbrain Thanks again for the bug report. The latest 0.13.0 release of the language server should not flag this as an error anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants