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 invalid environment replacement form like ${VAR:%} #5146

Merged

Conversation

kariya-mitsuru
Copy link
Contributor

Environment replacement form like below are invalid, so they should cause error.

  • ${VAR:#pattern}
  • ${VAR:##pattern}
  • ${VAR:%pattern}
  • ${VAR:%%pattern}

Environment replacement form like below are invalid, so they should
cause error.

- `${VAR:#pattern}`
- `${VAR:##pattern}`
- `${VAR:%pattern}`
- `${VAR:%%pattern}`

Signed-off-by: Mitsuru Kariya <mitsuru.kariya@nttdata.com>
@tonistiigi
Copy link
Member

cc @tstenner (ref #5052 as well)

@tstenner
Copy link

LGTM

Copy link
Collaborator

@jsternberg jsternberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine. As a note for the future, this lexing code is getting sufficiently complicated enough that using a lexer generator may end up being easier to reason with and maintain. That's not important for this PR though.

@tonistiigi tonistiigi merged commit add7328 into moby:master Aug 12, 2024
75 checks passed
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.

4 participants