Skip to content

Commit

Permalink
check if using powershell in windows
Browse files Browse the repository at this point in the history
  • Loading branch information
mmabdpr committed Jun 7, 2024
1 parent ab15812 commit bc686da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func (s *Snapshot) compareFromBefore() error {

//nolint:gosec
func (s *Snapshot) prepareCommand(commands []string) *exec.Cmd {
if runtime.GOOS == "windows" {
if runtime.GOOS == "windows" && s.shell != "pwsh" {
cmdStr := strings.Join(commands, " ")
compSec := os.Getenv("COMSPEC")

Expand Down

0 comments on commit bc686da

Please sign in to comment.