summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorsatotake <doublequotation@gmail.com>2022-05-23 02:14:17 +0900
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-05-24 13:57:23 +0200
commit6f7fbe03b1a70733f00da6556a89250a29e53ec8 (patch)
treeb00220561191a7ca0262a88acb5b572e29a55b32 /commands
parent2fc2e9c8718db2fe60f03bcf3661f449851cfe5f (diff)
basefs: add `noBuildLock` flag
If the flag is enabled, `.hugo_build.lock` will not be created. This ensures safe running on read-only filesystem etc. Close #9780
Diffstat (limited to 'commands')
-rw-r--r--commands/commands.go1
-rw-r--r--commands/hugo.go1
2 files changed, 2 insertions, 0 deletions
diff --git a/commands/commands.go b/commands/commands.go
index aee6a7284..b81b867f9 100644
--- a/commands/commands.go
+++ b/commands/commands.go
@@ -305,6 +305,7 @@ func (cc *hugoBuilderCommon) handleFlags(cmd *cobra.Command) {
cmd.Flags().BoolP("forceSyncStatic", "", false, "copy all files when static is changed.")
cmd.Flags().BoolP("noTimes", "", false, "don't sync modification time of files")
cmd.Flags().BoolP("noChmod", "", false, "don't sync permission mode of files")
+ cmd.Flags().BoolP("noBuildLock", "", false, "don't create .hugo_build.lock file")
cmd.Flags().BoolP("printI18nWarnings", "", false, "print missing translations")
cmd.Flags().BoolP("printPathWarnings", "", false, "print warnings on duplicate target paths etc.")
cmd.Flags().BoolP("printUnusedTemplates", "", false, "print warnings on unused templates.")
diff --git a/commands/hugo.go b/commands/hugo.go
index 8dfd4b4bd..94111e92d 100644
--- a/commands/hugo.go
+++ b/commands/hugo.go
@@ -200,6 +200,7 @@ func initializeFlags(cmd *cobra.Command, cfg config.Provider) {
"forceSyncStatic",
"noTimes",
"noChmod",
+ "noBuildLock",
"ignoreVendorPaths",
"templateMetrics",
"templateMetricsHints",