Skip to content

Overriding/default ((vars)) #5446

Answered by vito
allandegnan asked this question in General
Apr 15, 2020 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

Hmm, it looks like we don't explicitly document a precedence between vars and var_files, and that may be because we just haven't run into that question yet. Intuitively I would expect later-listed entries in var_files to take precedence over earlier-listed entries in var_files, but I'm not sure what I would expect between vars and var_files.

If we're to match the documented behavior of fly set-pipeline -l foo.yml -v foo=bar, we should have vars take precedence over var_files.

However, according to the current code...:

staticVars := []vars.Variables{}
if len(s.step.plan.Vars) > 0 {
staticVars = append(s…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@allandegnan
Comment options

@vito
Comment options

Answer selected by vito
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants