From bc686daa54db2d87fa56b9b8068c4f9aa0490bee Mon Sep 17 00:00:00 2001 From: Mohammad <34169320+mmabdpr@users.noreply.github.com> Date: Fri, 7 Jun 2024 12:04:37 -0400 Subject: [PATCH] check if using powershell in windows --- snapshot.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snapshot.go b/snapshot.go index 45438be..32ddc4c 100644 --- a/snapshot.go +++ b/snapshot.go @@ -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")