diff --git a/bundle/config/mutator/process_target_mode.go b/bundle/config/mutator/process_target_mode.go index 8bcff0ca3..bd7ca6f26 100644 --- a/bundle/config/mutator/process_target_mode.go +++ b/bundle/config/mutator/process_target_mode.go @@ -158,7 +158,10 @@ func isRunAsSet(r config.Resources) bool { } func isExplicitRootSet(b *bundle.Bundle) bool { - targetConfig := b.Config.Targets[b.Config.Bundle.Target] + targetConfig, ok := b.Config.Targets[b.Config.Bundle.Target] + if !ok || targetConfig == nil { + return false + } if targetConfig.Workspace == nil { return false }