Re-introduce global scope for cmd/config run as flag

This commit is contained in:
Phillip Wittrock
2020-01-13 08:42:20 -08:00
parent 3af514fa9f
commit 7bbcba5d23
4 changed files with 116 additions and 2 deletions

View File

@@ -25,6 +25,8 @@ type RunFns struct {
// directory
FunctionPaths []string
GlobalScope bool
// Output can be set to write the result to Output rather than back to the directory
Output io.Writer
@@ -91,7 +93,12 @@ func (r *RunFns) init() {
// if containerFilterProvider hasn't been set, use the default
if r.containerFilterProvider == nil {
r.containerFilterProvider = func(image, path string, api *yaml.RNode) kio.Filter {
cf := &filters.ContainerFilter{Image: image, Config: api, StorageMounts: r.StorageMounts}
cf := &filters.ContainerFilter{
Image: image,
Config: api,
StorageMounts: r.StorageMounts,
GlobalScope: r.GlobalScope,
}
return cf
}
}