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

Allow fully templated commands #87

Merged
merged 8 commits into from
May 15, 2022
Merged

Conversation

davidovich
Copy link
Owner

Breaking change.

The config has been simplified to warrant a cmd: field in handles:

This allows conditional commands to be specified. One use case is that the consuming executables can specify docker environments when called from host, or remove the docker call when called inside the container.

the 'environments' experiment is over. The inversed command nesting was
strange and hard to reason about and brought little advantages (reducing
config file duplication)

This duplication can be managed by using yaml anchors.

Advantages:

* the cmd can be completely removed by a template rendering, allowing
conditionnal commands
* duplication detection is handled at the yaml parsing phase
* better semantics for parameter separation
joining in the subprocess erroneously elides the arguments that are
passed, making assertions difficult/impossible.
It is up to the user to add additionnal quotes to keep a potential token
group together.

This change allows for conditional cmd construction
@davidovich davidovich force-pushed the allow-fully-templated-commands branch from 83d1ce7 to a1fa749 Compare May 15, 2022 00:33
@davidovich davidovich merged commit 59fc313 into main May 15, 2022
@davidovich davidovich deleted the allow-fully-templated-commands branch May 15, 2022 00:43
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.

1 participant