From f4925a099928e1a165bd8d89495082a11b30a444 Mon Sep 17 00:00:00 2001 From: David Dworken Date: Sun, 6 Nov 2022 00:02:48 -0700 Subject: [PATCH] Windows: Disable killall on windows --- shared/testutils/testutils.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/shared/testutils/testutils.go b/shared/testutils/testutils.go index 7a93dde..efc31a4 100644 --- a/shared/testutils/testutils.go +++ b/shared/testutils/testutils.go @@ -89,10 +89,12 @@ func BackupAndRestoreWithId(t *testing.T, id string) func() { for _, file := range copyFiles { checkError(copy(getBackPath(file, id), file)) } - cmd := exec.Command("killall", "hishtory") - stdout, err := cmd.Output() - if err != nil && err.Error() != "exit status 1" { - t.Fatalf("failed to execute killall hishtory, stdout=%#v: %v", string(stdout), err) + if runtime.GOOS != "windows" { + cmd := exec.Command("killall", "hishtory") + stdout, err := cmd.Output() + if err != nil && err.Error() != "exit status 1" { + t.Fatalf("failed to execute killall hishtory, stdout=%#v: %v", string(stdout), err) + } } checkError(os.Chdir(initialWd)) }