We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b4d9171 commit d721602Copy full SHA for d721602
internal/cli/configuration/configuration.go
@@ -103,7 +103,14 @@ func getDefaultUserDir() string {
103
104
// getDefaultBuildCacheDir returns the full path to the default build cache folder
105
func getDefaultBuildCacheDir() string {
106
- return paths.TempDir().Join("arduino").String()
+ var cacheDir *paths.Path
107
+ if p, err := os.UserCacheDir(); err == nil {
108
+ cacheDir = paths.New(p)
109
+ } else {
110
+ // fallback to /tmp
111
+ cacheDir = paths.TempDir()
112
+ }
113
+ return cacheDir.Join("arduino").String()
114
}
115
116
// FindConfigFlagsInArgsOrFallbackOnEnv returns the config file path using the
0 commit comments