summaryrefslogtreecommitdiff
path: root/internal/askcli/command_write_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/askcli/command_write_test.go')
-rw-r--r--internal/askcli/command_write_test.go10
1 files changed, 1 insertions, 9 deletions
diff --git a/internal/askcli/command_write_test.go b/internal/askcli/command_write_test.go
index e922920..453b005 100644
--- a/internal/askcli/command_write_test.go
+++ b/internal/askcli/command_write_test.go
@@ -5,7 +5,6 @@ import (
"context"
"errors"
"io"
- "path/filepath"
"strings"
"testing"
"time"
@@ -15,15 +14,8 @@ func useIsolatedTaskAliasCache(t *testing.T) time.Time {
t.Helper()
dir := t.TempDir()
- oldRoot := taskAliasCacheRoot
- oldNow := nowTaskAliasCache
fixedNow := time.Date(2026, 3, 26, 12, 0, 0, 0, time.UTC)
- taskAliasCacheRoot = func() (string, error) { return filepath.Join(dir, "hexai"), nil }
- nowTaskAliasCache = func() time.Time { return fixedNow }
- t.Cleanup(func() {
- taskAliasCacheRoot = oldRoot
- nowTaskAliasCache = oldNow
- })
+ t.Setenv("XDG_CACHE_HOME", dir)
return fixedNow
}