From 3f3c53a8fcc327ceb623d0de487e94b542cb7e58 Mon Sep 17 00:00:00 2001 From: Josh Deprez Date: Tue, 10 Dec 2024 11:08:26 +1100 Subject: [PATCH] Ignore empty submodule clone configs --- internal/job/checkout.go | 6 ++++++ 1 file changed, 6 insertions(+) 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) }