Skip to content

Support backticks inside defaults #10

@jayvdb

Description

@jayvdb

FOO={env:FOO:blah} is common enough that users would want to replace blah with backticks.

i.e.

FOO={env:FOO:`do_stuff`}

The problem with that is it takes away valid syntax, as previously that would result in FOO being equal to do_stuff in backticks. While that is not likely to be a common case, it was valid.

Another option is to add a sub_type and then FOO={env:FOO:{backticks:do_stuff}} can be used. That should currently be an error "Unknown sub_type backticks", or similar, so it doesnt remove valid syntax.

This can be done atm using

DEFAULTFOO=`blah`
FOO={env:FOO:{env:DEFAULTFOO}}

But then we run into #9 as DEFAULTFOO needs to be executed even if FOO was defined externally. But trying to determine that DEFAULTFOO is unneeded is hard, as the regex currently being used only returns the innermost env:DEFAULTFOO.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions