summaryrefslogtreecommitdiffstats
path: root/commands/hugo.go
diff options
context:
space:
mode:
authorCameron Moore <moorereason@gmail.com>2016-11-29 22:52:52 -0600
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2016-11-30 08:35:30 +0100
commit971d1baf1393c07081607bd62a87da545d9cb34e (patch)
treebe61a34e2a5e77fc06c599afa3d214778ce1bc87 /commands/hugo.go
parenta4b9abf0b32a7425e85eecc2113d1cbdb286b9b5 (diff)
commands: Add noChmod option to disable perm sync
Includes updates to docs. Fixes #2749
Diffstat (limited to 'commands/hugo.go')
-rw-r--r--commands/hugo.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/commands/hugo.go b/commands/hugo.go
index 72296fd32..f5f5ef462 100644
--- a/commands/hugo.go
+++ b/commands/hugo.go
@@ -229,6 +229,7 @@ func initHugoBuildCommonFlags(cmd *cobra.Command) {
cmd.Flags().Bool("preserveTaxonomyNames", false, `Preserve taxonomy names as written ("Gérard Depardieu" vs "gerard-depardieu")`)
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().BoolVarP(&tpl.Logi18nWarnings, "i18n-warnings", "", false, "Print missing translations")
// Set bash-completion.
@@ -387,6 +388,7 @@ func initializeFlags(cmd *cobra.Command) {
"ignoreCache",
"forceSyncStatic",
"noTimes",
+ "noChmod",
}
for _, key := range persFlagKeys {
@@ -518,6 +520,7 @@ func copyStatic() error {
syncer := fsync.NewSyncer()
syncer.NoTimes = viper.GetBool("noTimes")
+ syncer.NoChmod = viper.GetBool("noChmod")
syncer.SrcFs = staticSourceFs
syncer.DestFs = hugofs.Destination()
// Now that we are using a unionFs for the static directories
@@ -797,6 +800,7 @@ func NewWatcher(port int) error {
syncer := fsync.NewSyncer()
syncer.NoTimes = viper.GetBool("noTimes")
+ syncer.NoChmod = viper.GetBool("noChmod")
syncer.SrcFs = staticSourceFs
syncer.DestFs = hugofs.Destination()