Skip to content

Is it possible to use envsubst without removing missing variables? #1164

Answered by mikefarah
jpmorin asked this question in Q&A
Discussion options

You must be logged in to vote

Yes - the expression you are using (.. | select(tag == "!!str")) finds all the strings and attempts substitution.

If you had a way of only selecting the 'build' time subs you wanted to do, then that would work.

e..g

foo=bar yq '.example |= envsubst' sample.yml

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@mikefarah
Comment options

@jpmorin
Comment options

@bukowa
Comment options

@jmpokar
Comment options

Answer selected by jpmorin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants