Windows: Disable killall on windows

This commit is contained in:
David Dworken 2022-11-06 00:02:48 -07:00
parent fadc8ad70e
commit f4925a0999
No known key found for this signature in database

View File

@ -89,11 +89,13 @@ func BackupAndRestoreWithId(t *testing.T, id string) func() {
for _, file := range copyFiles { for _, file := range copyFiles {
checkError(copy(getBackPath(file, id), file)) checkError(copy(getBackPath(file, id), file))
} }
if runtime.GOOS != "windows" {
cmd := exec.Command("killall", "hishtory") cmd := exec.Command("killall", "hishtory")
stdout, err := cmd.Output() stdout, err := cmd.Output()
if err != nil && err.Error() != "exit status 1" { if err != nil && err.Error() != "exit status 1" {
t.Fatalf("failed to execute killall hishtory, stdout=%#v: %v", string(stdout), err) t.Fatalf("failed to execute killall hishtory, stdout=%#v: %v", string(stdout), err)
} }
}
checkError(os.Chdir(initialWd)) checkError(os.Chdir(initialWd))
} }
} }