From 629c898f4616b32419456863e526da4aa89f6c15 Mon Sep 17 00:00:00 2001 From: Maxim Prokhorov Date: Thu, 29 May 2025 02:46:31 +0300 Subject: [PATCH 1/2] build_cache.path correction might as well use values from go docs https://pkg.go.dev/os#UserCacheDir cli code fall back to /tmp when neither $HOME or XDG variables are avaiable https://github.com/arduino/arduino-cli/blob/55f86b541026aad880fcb27bc49e3fe1facb223b/internal/cli/configuration/configuration.go#L105-L114 --- docs/configuration.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/configuration.md b/docs/configuration.md index 702594a019b..d6c77639f06 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -62,9 +62,11 @@ configuration file. - on Linux (and other Unix-based OS) is: if [`$XDG_CACHE_HOME`](https://specifications.freedesktop.org/basedir-spec/latest/#variables) is defined, - `$XDG_CACHE_HOME/arduino`. Otherwise `{HOME}/.config/arduino`. - - on Windows is: `{HOME}/AppData/Local/arduino` - - on MacOS is: `{HOME}/Library/Caches/arduino` + `$XDG_CACHE_HOME/arduino`. Otherwise `${HOME}/.cache/arduino`. + - on Windows is: `%LocalAppData%/arduino` + - on MacOS is: `${HOME}/Library/Caches/arduino` + + If neither `$HOME` or `$XDG_CACHE_HOME` are defined, a temporary directory will be used. - The `directories.data` default is OS-dependent: From aa199fd8a9c8235f5af56780bbaef19ef0b5d499 Mon Sep 17 00:00:00 2001 From: Maxim Prokhorov Date: Thu, 29 May 2025 04:54:29 +0300 Subject: [PATCH 2/2] or -> nor, syntax --- docs/configuration.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/configuration.md b/docs/configuration.md index d6c77639f06..4caa4deb77d 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -62,11 +62,11 @@ configuration file. - on Linux (and other Unix-based OS) is: if [`$XDG_CACHE_HOME`](https://specifications.freedesktop.org/basedir-spec/latest/#variables) is defined, - `$XDG_CACHE_HOME/arduino`. Otherwise `${HOME}/.cache/arduino`. + `$XDG_CACHE_HOME/arduino`. Otherwise `$HOME/.cache/arduino`. - on Windows is: `%LocalAppData%/arduino` - - on MacOS is: `${HOME}/Library/Caches/arduino` + - on MacOS is: `$HOME/Library/Caches/arduino` - If neither `$HOME` or `$XDG_CACHE_HOME` are defined, a temporary directory will be used. + If neither `$HOME` nor `$XDG_CACHE_HOME` are defined, a temporary directory will be used. - The `directories.data` default is OS-dependent: