From 4683968925b405245902a8f2c8f03682d5fb7a29 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Tue, 17 Sep 2024 06:46:31 +0200 Subject: [PATCH] Fix regression of #4119 (#4121) --- cli/exec/metadata.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/exec/metadata.go b/cli/exec/metadata.go index dff5f7947..db2f9d95f 100644 --- a/cli/exec/metadata.go +++ b/cli/exec/metadata.go @@ -45,7 +45,7 @@ func metadataFromContext(_ context.Context, c *cli.Command, axis matrix.Axis) (m var changedFiles []string changedFilesRaw := c.String("pipeline-files") - if changedFilesRaw[0] == '[' { + if len(changedFilesRaw) != 0 && changedFilesRaw[0] == '[' { if err := json.Unmarshal([]byte(changedFilesRaw), &changedFiles); err != nil { return metadata.Metadata{}, fmt.Errorf("pipeline-files detected json but could not parse it: %w", err) }