Skip to content

Commit

Permalink
Fix regression of woodpecker-ci#4119
Browse files Browse the repository at this point in the history
  • Loading branch information
6543 committed Sep 16, 2024
1 parent 375309a commit 7d8c0b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cli/exec/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 7d8c0b6

Please sign in to comment.