diff options
author | Erica Mays <erica@emays.dev> | 2023-06-10 13:25:07 -0400 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2023-06-12 21:33:35 +0200 |
commit | 258884f44fc3ea6e4954936ddeb24e739eb8f58a (patch) | |
tree | 3f96e643dd97f0ebe275f49daa780dae7954d20a /commands/commandeer.go | |
parent | 254c2b323cbc74b0decb29e5f7331f4b03914a9e (diff) |
cache: Set default cache path based on $USER
Change the default cache directory to `$TMPDIR/hugo_cache_$USER`, so
that multi-user systems do not have caches that interfere with each
other. The other cache-choosing logic (e.g. Netlify exceptions,
configuration options) are not affected.
Fixes #7391
Diffstat (limited to 'commands/commandeer.go')
-rw-r--r-- | commands/commandeer.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/commands/commandeer.go b/commands/commandeer.go index d43d06b8a..da395baa5 100644 --- a/commands/commandeer.go +++ b/commands/commandeer.go @@ -521,7 +521,7 @@ Complete documentation is available at https://gohugo.io/.` func applyLocalFlagsBuildConfig(cmd *cobra.Command, r *rootCommand) { cmd.Flags().StringSliceP("theme", "t", []string{}, "themes to use (located in /themes/THEMENAME/)") cmd.Flags().StringVarP(&r.baseURL, "baseURL", "b", "", "hostname (and path) to the root, e.g. https://spf13.com/") - cmd.Flags().StringP("cacheDir", "", "", "filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/") + cmd.Flags().StringP("cacheDir", "", "", "filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache_$USER/") _ = cmd.Flags().SetAnnotation("cacheDir", cobra.BashCompSubdirsInDir, []string{}) cmd.Flags().StringP("contentDir", "c", "", "filesystem path to content directory") _ = cmd.Flags().SetAnnotation("theme", cobra.BashCompSubdirsInDir, []string{"themes"}) |