Skip to content

Commit

Permalink
refactor: tune error message for invalid generate value (#162)
Browse files Browse the repository at this point in the history
  • Loading branch information
letFunny authored Oct 7, 2024
1 parent 33bed22 commit 406881b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/setup/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ func Select(release *Release, slices []SliceKey) (*Selection, error) {
switch newInfo.Generate {
case GenerateNone, GenerateManifest:
default:
return nil, fmt.Errorf("slice %s has invalid 'generate' for path %s: %q, consider an update if available",
return nil, fmt.Errorf("slice %s has invalid 'generate' for path %s: %q",
new, newPath, newInfo.Generate)
}
}
Expand Down
2 changes: 1 addition & 1 deletion internal/setup/setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1402,7 +1402,7 @@ var setupTests = []setupTest{{
},
},
selslices: []setup.SliceKey{{"mypkg", "myslice"}},
selerror: `slice mypkg_myslice has invalid 'generate' for path /dir/\*\*: "foo", consider an update if available`,
selerror: `slice mypkg_myslice has invalid 'generate' for path /dir/\*\*: "foo"`,
}, {
summary: "Paths with generate: manifest must have trailing /**",
input: map[string]string{
Expand Down

0 comments on commit 406881b

Please sign in to comment.