Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: inline Environment #403

Merged
merged 16 commits into from
Nov 26, 2020
Prev Previous commit
no switch inside if
  • Loading branch information
Duologic committed Nov 26, 2020
commit 52ba439e21d6790c8c4c788a8228a61c63b63792
15 changes: 7 additions & 8 deletions pkg/tanka/workflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,13 +185,12 @@ func Show(baseDir string, opts Opts) (manifest.List, error) {
// Eval returns the raw evaluated Jsonnet output (without any transformations)
func Eval(dir string, opts Opts) (raw interface{}, err error) {
r, _, err := eval(dir, opts.JsonnetOpts)
if err != nil {
switch err.(type) {
case ErrNoEnv, ErrMultipleEnvs:
return r, err
default:
return nil, err
}
switch err.(type) {
case ErrNoEnv, ErrMultipleEnvs:
return r, err
case nil:
return r, nil
default:
return nil, err
}
return r, nil
}