quote newlines when interpolating
This commit is contained in:
parent
2bb64949d1
commit
aa48f1f771
1 changed files with 5 additions and 1 deletions
|
@ -96,7 +96,11 @@ func (a *Agent) prep(w *model.Work) (*yaml.Config, error) {
|
|||
|
||||
var err error
|
||||
w.Yaml, err = envsubst.Eval(w.Yaml, func(s string) string {
|
||||
return envs[s]
|
||||
env := envs[s]
|
||||
if strings.Contains(env, "\n") {
|
||||
env = fmt.Sprintf("%q", env)
|
||||
}
|
||||
return env
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
Loading…
Reference in a new issue