Skip to content

Commit 29132fb

Browse files
committed
Fix Windows cache location
1 parent a01d896 commit 29132fb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/hooks/useConfig.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,12 @@ export interface Config {
2020
}
2121

2222
function platform_cache_default() {
23-
if (host().platform == 'darwin') {
23+
switch (Deno.build.os) {
24+
case 'darwin':
2425
return Path.home().join('Library/Caches')
25-
} else {
26+
case 'windows':
27+
return flatmap(Deno.env.get("LOCALAPPDATA"), Path.abs) ?? Path.home().join('AppData/Local')
28+
default:
2629
return Path.home().join('.cache')
2730
}
2831
}

0 commit comments

Comments
 (0)