Skip to content

Commit

Permalink
Fix editor on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
jgustie committed Nov 14, 2024
1 parent 06d5aac commit 509572c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ require (
github.com/google/go-jsonnet v0.20.0
github.com/google/uuid v1.6.0
github.com/jsonnet-bundler/jsonnet-bundler v0.6.0
github.com/mattn/go-isatty v0.0.20
github.com/oklog/ulid/v2 v2.1.0
github.com/pkg/errors v0.9.1
github.com/rs/zerolog v1.33.0
Expand All @@ -33,7 +34,6 @@ require (
github.com/josharian/intern v1.0.0 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/spf13/pflag v1.0.5 // indirect
Expand Down
5 changes: 4 additions & 1 deletion pkg/pipes/cobra_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ package pipes

import (
"context"
"fmt"
"os"
"os/exec"
"strings"
)

func editorCmd(ctx context.Context, filename string) *exec.Cmd {
Expand All @@ -26,5 +29,5 @@ func editorCmd(ctx context.Context, filename string) *exec.Cmd {
args = append(args, shell, "/C", fmt.Sprintf("%s %q", editor, filename))
}

return exec.CommandContext(cmd.Context(), args[0], args[1:]...)
return exec.CommandContext(ctx, args[0], args[1:]...)
}

0 comments on commit 509572c

Please # to comment.