move check for working dir for exec functions

This commit is contained in:
Natasha Sarkar
2021-08-20 10:07:32 -07:00
parent 1e1b9b484a
commit e100be620e
5 changed files with 42 additions and 20 deletions

View File

@@ -510,10 +510,6 @@ func (r *RunFns) ffp(spec runtimeutil.FunctionSpec, api *yaml.RNode, currentUser
}
if r.EnableExec && spec.Exec.Path != "" {
if r.WorkingDir == "" {
return nil, fmt.Errorf("no working directory set for exec function")
}
ef := &exec.Filter{
Path: spec.Exec.Path,
WorkingDir: r.WorkingDir,