Skip to content

cli/compose: keep hyphens inside :? error text - #7340

Closed
locker95 wants to merge 1 commit into
docker:masterfrom
locker95:fix/stack-required-hyphen
Closed

locker95 wants to merge 1 commit into
docker:masterfrom
locker95:fix/stack-required-hyphen

Conversation

@locker95

Copy link
Copy Markdown
Contributor

Fixes: #7313

Summary

${VAR:?must be set - reason} was taking the - default path, so docker stack config succeeded when the variable was unset. use whichever of :?, :-, ?, and - shows up first, which is what compose already does.

Release notes (optional)

docker stack was treating the first "-" as a hard default, so
${VAR:?must be set - reason} succeeded when VAR was unset.

Signed-off-by: Dean Chen <862469039@qq.com>
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@locker95

Copy link
Copy Markdown
Contributor Author

Closing this. #7316 already covers the hyphen inside :? error text, and #7314 is on the same interpolation path. I shouldn't have opened another one.

@locker95 locker95 closed this Sep 29, 2026
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.

docker stack subcommands: the :? interpolation operator and hyphens do not mix

2 participants