Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2021-06-29 10:51:09 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2021-06-29 10:51:09 +0300
commit6c8c0c8b6a0b39b91de44d72a7bd1cd49534a0f1 (patch)
tree4d6e62285ddf931ce341a71f6a96cc64cefb6288 /helpers
parent49fedbc51cafa64e4eb0eae9fb79ccbe2d4c6774 (diff)
config: Fix Netlify default cache dir logic
Fixes #8710
Diffstat (limited to 'helpers')
-rw-r--r--helpers/path.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/helpers/path.go b/helpers/path.go
index fd35fafc9..6d4827bd2 100644
--- a/helpers/path.go
+++ b/helpers/path.go
@@ -412,8 +412,8 @@ func getCacheDir(cfg config.Provider) string {
return addTrailingFileSeparator(cacheDir)
}
- // Both of these are fairly distinctive OS env keys used by Netlify.
- if os.Getenv("DEPLOY_PRIME_URL") != "" && os.Getenv("PULL_REQUEST") != "" {
+ // This is always set to true when running on Netlify.
+ if os.Getenv("NETLIFY") == "true" {
// Netlify's cache behaviour is not documented, the currently best example
// is this project:
// https://github.com/philhawksworth/content-shards/blob/master/gulpfile.js