From caa32e0708ba4347dd37e93174fce1d2c5660160 Mon Sep 17 00:00:00 2001 From: Kid <44045911+kidonng@users.noreply.github.com> Date: Wed, 19 Oct 2022 12:42:19 +0800 Subject: [PATCH] fix: use proper cache directory for `electron-updater` on macOS (#7032) --- .changeset/smooth-hounds-peel.md | 5 +++++ packages/electron-updater/src/AppAdapter.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/smooth-hounds-peel.md diff --git a/.changeset/smooth-hounds-peel.md b/.changeset/smooth-hounds-peel.md new file mode 100644 index 00000000000..260cc7cb343 --- /dev/null +++ b/.changeset/smooth-hounds-peel.md @@ -0,0 +1,5 @@ +--- +"electron-updater": patch +--- + +fix: use appropriate `electron-updater` cache directory on macOS diff --git a/packages/electron-updater/src/AppAdapter.ts b/packages/electron-updater/src/AppAdapter.ts index df7b2376f4d..f2da362fda8 100644 --- a/packages/electron-updater/src/AppAdapter.ts +++ b/packages/electron-updater/src/AppAdapter.ts @@ -36,7 +36,7 @@ export function getAppCacheDir() { if (process.platform === "win32") { result = process.env["LOCALAPPDATA"] || path.join(homedir, "AppData", "Local") } else if (process.platform === "darwin") { - result = path.join(homedir, "Library", "Application Support", "Caches") + result = path.join(homedir, "Library", "Caches") } else { result = process.env["XDG_CACHE_HOME"] || path.join(homedir, ".cache") }