Skip to content

Commit

Permalink
hugo: change default options to support githubfs (#142)
Browse files Browse the repository at this point in the history
githubfs doesn't support `chmod` or `chtimes`.
  • Loading branch information
Parzival-3141 authored Apr 7, 2024
1 parent d8c91bd commit 17334ce
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 8 additions & 4 deletions external/hugo/wanix_vendor.patch
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
diff --git a/commands/commandeer.go b/commands/commandeer.go
index 1e5928ff9..c1e1421d0 100644
index 1e5928ff9..897a76d57 100644
--- a/commands/commandeer.go
+++ b/commands/commandeer.go
@@ -542,7 +542,7 @@ func applyLocalFlagsBuild(cmd *cobra.Command, r *rootCommand) {
@@ -540,9 +540,9 @@ func applyLocalFlagsBuild(cmd *cobra.Command, r *rootCommand) {
cmd.Flags().Bool("templateMetrics", false, "display metrics about template executions")
cmd.Flags().Bool("templateMetricsHints", false, "calculate some improvement hints when combined with --templateMetrics")
cmd.Flags().BoolVar(&r.forceSyncStatic, "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("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("noTimes", "", true, "don't sync modification time of files")
+ cmd.Flags().BoolP("noChmod", "", true, "don't sync permission mode of files")
+ cmd.Flags().BoolP("noBuildLock", "", true, "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.")
Expand Down
2 changes: 1 addition & 1 deletion kernel/fs/js.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ func (s *Service) read(this js.Value, args []js.Value) any {
}

if rs, ok := f.File.(io.ReadSeeker); ok && !pos.IsNull() {
_, err := rs.Seek(int64(pos.Int()), 0)
_, err := rs.Seek(int64(pos.Int()), io.SeekStart)
if err != nil {
cb.Invoke(jsutil.ToJSError(err), 0)
return
Expand Down

0 comments on commit 17334ce

Please sign in to comment.