Remove workarounds for half-implemented windows support

This commit is contained in:
David Dworken 2023-05-19 17:16:17 -07:00
parent 9f2b392ddb
commit 201bedf020
No known key found for this signature in database

View File

@ -104,13 +104,11 @@ func BackupAndRestoreWithId(t *testing.T, id string) func() {
touchFile(path.Join(homedir, ".zsh_history")) touchFile(path.Join(homedir, ".zsh_history"))
touchFile(path.Join(homedir, ".local/share/fish/fish_history")) touchFile(path.Join(homedir, ".local/share/fish/fish_history"))
return func() { return func() {
if runtime.GOOS != "windows" {
cmd := exec.Command("killall", "hishtory", "tmux") cmd := exec.Command("killall", "hishtory", "tmux")
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)
} }
}
persistLog() persistLog()
Check(t, os.RemoveAll(path.Join(homedir, data.GetHishtoryPath()))) Check(t, os.RemoveAll(path.Join(homedir, data.GetHishtoryPath())))
Check(t, os.MkdirAll(path.Join(homedir, data.GetHishtoryPath()), os.ModePerm)) Check(t, os.MkdirAll(path.Join(homedir, data.GetHishtoryPath()), os.ModePerm))
@ -214,13 +212,8 @@ func buildServer() string {
} }
version, err := os.ReadFile("VERSION") version, err := os.ReadFile("VERSION")
if err != nil { if err != nil {
if runtime.GOOS == "windows" {
// TODO: Figure out why it can't read the VERSION file
version = []byte("174")
} else {
panic(fmt.Sprintf("failed to read VERSION file: %v", err)) panic(fmt.Sprintf("failed to read VERSION file: %v", err))
} }
}
f, err := os.CreateTemp("", "server") f, err := os.CreateTemp("", "server")
checkError(err) checkError(err)
fn := f.Name() fn := f.Name()