Skip to content

Commit

Permalink
chore: nit
Browse files Browse the repository at this point in the history
  • Loading branch information
ericzzzzzzz committed Sep 25, 2023
1 parent bd48355 commit 02d4f89
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion cmd/skaffold/app/cmd/filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,15 @@ func NewCmdFilter() *cobra.Command {
// Unlike `skaffold debug`, this filtering affects all images and not just the built artifacts.
func runFilter(ctx context.Context, out io.Writer, debuggingFilters bool, postRenderer string, buildArtifacts []graph.Artifact) error {
return withRunner(ctx, out, func(r runner.Runner, configs []util.VersionedConfig) error {

var manifestList manifest.ManifestList
var err error
if postRenderer != "" {
cmd := exec.CommandContext(ctx, postRenderer)
cmd.Stdin = os.Stdin
stdoutPipe, err := cmd.StdoutPipe()
if err != nil {
return fmt.Errorf("running post-renderer: %w", err)
}
err = cmd.Start()
if err != nil {
return fmt.Errorf("running post-renderer: %w", err)
Expand Down
2 changes: 1 addition & 1 deletion cmd/skaffold/app/cmd/filter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ spec:
})
t.SetStdin([]byte(test.manifestsStr))
var b bytes.Buffer
err := runFilter(context.TODO(), &b, false, test.buildArtifacts)
err := runFilter(context.TODO(), &b, false, "", test.buildArtifacts)
t.CheckNoError(err)
t.CheckDeepEqual(test.expected, b.String(), testutil.YamlObj(t.T))
})
Expand Down
2 changes: 1 addition & 1 deletion pkg/skaffold/helm/bin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func TestGenerateSkaffoldFilter(t *testing.T) {
manifestsOverrides: map[string]string{},
}

result := generateSkaffoldFilter(h, test.buildFile)
result := generateSkaffoldFilter(h, test.buildFile, []string{})
t.CheckDeepEqual(test.result, result)
})
}
Expand Down

0 comments on commit 02d4f89

Please sign in to comment.