diff --git a/internal/job/checkout.go b/internal/job/checkout.go index a68d894416..cf51995ec0 100644 --- a/internal/job/checkout.go +++ b/internal/job/checkout.go @@ -641,6 +641,12 @@ func (e *Executor) defaultCheckoutPhase(ctx context.Context) error { args := []string{} for _, config := range e.GitSubmoduleCloneConfig { + // -c foo=bar is valid, -c foo= is valid, -c foo is valid, but... + // -c (nothing) is invalid. + // This could happen because the env var was set to an empty value. + if config == "" { + continue + } args = append(args, "-c", config) }