diff --git a/shared/testutils/testutils.go b/shared/testutils/testutils.go index a57a532..bece521 100644 --- a/shared/testutils/testutils.go +++ b/shared/testutils/testutils.go @@ -78,7 +78,6 @@ func BackupAndRestoreWithId(t testing.TB, id string) func() { path.Join(homedir, data.GetHishtoryPath(), DB_WAL_PATH), path.Join(homedir, data.GetHishtoryPath(), DB_SHM_PATH), path.Join(homedir, data.GetHishtoryPath(), data.CONFIG_PATH), - path.Join(homedir, data.GetHishtoryPath(), "hishtory"), path.Join(homedir, data.GetHishtoryPath(), "config.sh"), path.Join(homedir, data.GetHishtoryPath(), "config.zsh"), path.Join(homedir, data.GetHishtoryPath(), "config.fish"), @@ -86,6 +85,13 @@ func BackupAndRestoreWithId(t testing.TB, id string) func() { path.Join(homedir, ".zsh_history"), path.Join(homedir, ".local/share/fish/fish_history"), } + hishtoryBinaryPath := path.Join(homedir, data.GetHishtoryPath(), "hishtory") + if IsGithubAction() { + // On github actions, avoid constantly copying the binary back and forth since we aren't worried about an existing hishtory installation + _ = os.Remove(hishtoryBinaryPath) + } else { + renameFiles = append(renameFiles, hishtoryBinaryPath) + } for _, file := range renameFiles { touchFile(file) Check(t, rename(file, getBackPath(file, id)))