mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
Log fsync errors
This commit is contained in:
parent
5b065a27a2
commit
80e1fd29ab
1 changed files with 6 additions and 2 deletions
|
@ -847,7 +847,9 @@ func NewWatcher(port int) error {
|
|||
} else if err == nil {
|
||||
// If file still exists, sync it
|
||||
logger.Println("Syncing", relPath, "to", publishDir)
|
||||
syncer.Sync(filepath.Join(publishDir, relPath), relPath)
|
||||
if err := syncer.Sync(filepath.Join(publishDir, relPath), relPath); err != nil {
|
||||
jww.ERROR.Println(err)
|
||||
}
|
||||
} else {
|
||||
jww.ERROR.Println(err)
|
||||
}
|
||||
|
@ -857,7 +859,9 @@ func NewWatcher(port int) error {
|
|||
|
||||
// For all other event operations Hugo will sync static.
|
||||
logger.Println("Syncing", relPath, "to", publishDir)
|
||||
syncer.Sync(filepath.Join(publishDir, relPath), relPath)
|
||||
if err := syncer.Sync(filepath.Join(publishDir, relPath), relPath); err != nil {
|
||||
jww.ERROR.Println(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue