We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a10382d commit 86cf920Copy full SHA for 86cf920
packages/gatsby/src/redux/persist.ts
@@ -1,4 +1,5 @@
1
import path from "path"
2
+import os from "os"
3
import v8 from "v8"
4
import {
5
existsSync,
@@ -139,7 +140,7 @@ export function writeToCache(contents: ICachedReduxState): void {
139
140
// Note: this should be a transactional operation. So work in a tmp dir and
141
// make sure the cache cannot be left in a corruptable state due to errors.
142
- const tmpDir = mkdtempSync(`reduxcache`) // linux / windows
143
+ const tmpDir = mkdtempSync(path.join(os.tmpdir(), `reduxcache`)) // linux / windows
144
145
prepareCacheFolder(tmpDir, contents)
146
0 commit comments