hugo/testscripts/commands
Bjørn Erik Pedersen b3f10556f0
Use os.UserCacheDir as first fallback if cacheDir is not set
We will now try

1. cacheDir (or, commonly set in environment as `HUGO_CACHEDIR`)
2. if on Netlify we use `/opt/build/cache/hugo_cache/`
3. os.UserCacheDir
4. A temp dir

Storing the cache, especially the module cache, in a temporary idea has had lots of hard to debug issues, especially on MacOS,
which this commit tries to fix.

This should also make it easier to locate the Hugo cache:

>UserCacheDir returns the default root directory to use for user-specific cached data. Users should create their own
application-specific subdirectory within this one and use that.
>
>On Unix systems, it returns $XDG_CACHE_HOME as specified by
https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html if non-empty, else $HOME/.cache. On Darwin, it
returns $HOME/Library/Caches. On Windows, it returns %LocalAppData%. On Plan 9, it returns $home/lib/cache.
>
>If the location cannot be determined (for example, $HOME is not defined), then it will return an error.

Fixes #11286
Fixes #11291
2023-07-27 20:59:47 +02:00
..
commands_errors.txt Fix "unknown command" message when no suggestion 2023-05-22 18:54:34 +02:00
completion.txt
config.txt Add --format to hugo config 2023-05-22 20:26:02 +02:00
config__cachedir.txt Use os.UserCacheDir as first fallback if cacheDir is not set 2023-07-27 20:59:47 +02:00
convert.txt
deploy.txt deploy: Fix deploy defaults for non-zero flag values (e.g. maxDeletes, invalidateCDN) 2023-06-18 19:38:34 +02:00
env.txt
gen.txt commands: Add TLS/HTTPS support to hugo server 2023-06-05 09:53:53 +02:00
hugo.txt Fix regression when loading config -e is empty or HUGO_ENV or HUGO_ENVIRONMENT is set 2023-05-24 16:39:31 +02:00
hugo__configdir.txt commands: Fail the build when no config file or config dir 2023-05-27 16:56:54 +02:00
hugo__errors.txt
hugo__flags.txt commands: Fail the build when no config file or config dir 2023-05-27 16:56:54 +02:00
hugo__noconfig.txt Don't create the public folder unless needed 2023-05-28 12:55:44 +02:00
hugo__path-warnings-postprocess.txt Fix false path warnings with resources.PostProcess 2023-06-27 21:55:35 +02:00
hugo__path-warnings.txt Fix false path warnings with resources.PostProcess 2023-06-27 21:55:35 +02:00
hugo__processingstats.txt Fix Processed images count regression for multiple languages 2023-05-28 12:55:44 +02:00
hugo__publishdir_in_config.txt commands: Load config before creating the filesystem 2023-05-18 15:38:25 +02:00
hugo__watch.txt Don't inject livereload script on hugo -w 2023-06-02 09:04:00 +02:00
hugo_configdev_env.txt Fix regression when loading config -e is empty or HUGO_ENV or HUGO_ENVIRONMENT is set 2023-05-24 16:39:31 +02:00
hugo_configdev_environment.txt Fix regression when loading config -e is empty or HUGO_ENV or HUGO_ENVIRONMENT is set 2023-05-24 16:39:31 +02:00
hugo_configprod.txt Fix regression when loading config -e is empty or HUGO_ENV or HUGO_ENVIRONMENT is set 2023-05-24 16:39:31 +02:00
hugo_printpathwarnings.txt Re-add --printUnusedTemplates and --printPathWarnings 2023-05-19 11:37:05 +02:00
hugo_printunusedtemplates.txt Re-add --printUnusedTemplates and --printPathWarnings 2023-05-19 11:37:05 +02:00
import_jekyll.txt
list.txt commands: Make all list commands list what 'all' did before 2023-05-22 12:27:19 +02:00
mod.txt commands: Handle hugo mod get --help 2023-06-29 08:53:50 +02:00
mod__themesdir.txt commands: Reinstate some of the removed build flags (e.g. --theme) to new and mod 2023-05-28 12:55:44 +02:00
mod_npm.txt
mod_tidy.txt
mod_vendor.txt Fix hugo mod vendor for modules with hugo.toml 2023-07-08 16:08:46 +02:00
new.txt commands: Fix help message for hugo new theme 2023-06-28 09:30:27 +02:00
server.txt commands: Improve the common build flag handling 2023-05-17 22:13:29 +02:00
server__edit_config.txt
server__edit_content.txt
server__multihost.txt
server__watch_hugo_stats.txt commands: Move testscript into its correct place 2023-07-19 19:54:36 +02:00
server_disablelivereload.txt Re-instate disableLiveReload as a config option (and not just a flag) 2023-07-19 19:50:37 +02:00
server_disablelivereload__config.txt Re-instate disableLiveReload as a config option (and not just a flag) 2023-07-19 19:50:37 +02:00
server_render_static_to_disk.txt Fix --renderStaticToDisk regression 2023-05-27 16:56:54 +02:00
server_render_to_memory.txt Fix handling of aliases (e.g. hugo serve) 2023-06-13 10:47:51 +02:00
version.txt