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

missing-key-action Ignored #172

Open
1 task done
yhakbar opened this issue Mar 18, 2024 · 0 comments
Open
1 task done

missing-key-action Ignored #172

yhakbar opened this issue Mar 18, 2024 · 0 comments
Labels
boilerplate bug Something isn't working

Comments

@yhakbar
Copy link
Contributor

yhakbar commented Mar 18, 2024

Describe the bug
The behavior of empty variables changes depending on whether a --var is passed into the invocation of boilerplate or not.

If the boilerplate.yml has a variable with a default value of "" and no --var is passed in to determine the value, an empty string is stamped out into the output folder.

If a --var is populated with an empty string, --var EmptyVariable='' it will stamp out <no value>.

If a --var is populated with an empty string inside an empty string, --var EmptyVariable='""' it will stamp out an empty string.

Using the missing-key-action zero does not change this behavior.

To Reproduce
Take a look at the branch bug/missing-key-action-ignored.

In this branch, the following command was run:

boilerplate \
--template-url examples/for-learning-and-testing/empty-variable \
--output-folder test-fixtures/examples-expected-output/empty-variable \
--var EmptyVariable=''  \
--non-interactive \
--missing-key-action zero

Expected behavior
In this example, a user likely expects for an empty string to be stamped out into the target output folder.

Nice to have

  • Branch with reproduction: bug/missing-key-action-ignored
@yhakbar yhakbar added the bug Something isn't working label Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
boilerplate bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants