Added suport for multiline variables from sh

Instead of giving an error on multiline results from sh, the results are
now stored as is, except that the last newline is stripped away to make
the output of most commands easy to use in shell commands.

Two helper functions have been added to help deal with multi-line
results. In addition, previous PascalCase template function names have
been renamed to camelCase for consistency with the sprig lib.
This commit is contained in:
Sindre Røkenes Myren
2017-09-03 12:48:06 +02:00
committed by Sindre Røkenes Myren
parent 36f3be9979
commit 7a64530e83
5 changed files with 172 additions and 82 deletions

View File

@@ -121,8 +121,8 @@ func (e *Executor) RunTask(ctx context.Context, call Call) error {
return err
}
// FIXME: doing again, since a var may have been overriden using the
// `set:` attribute of a dependecy. Remove this when `set` (that is
// FIXME: doing again, since a var may have been overridden using the
// `set:` attribute of a dependency. Remove this when `set` (that is
// deprecated) be removed.
t, err = e.CompiledTask(call)
if err != nil {