summaryrefslogtreecommitdiffstats
path: root/commands/hugo.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-06-12 20:29:47 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-06-12 20:35:19 +0200
commit26aa06a3db57ab7134a900d641fa2976f7971520 (patch)
treeece558f21e90ce02eec1986af08a4d1a96b17122 /commands/hugo.go
parent52a0cea65de7b75ae1662abe3dec36fca3604617 (diff)
Revert "commands: Remove the rlimit tweaking on macOS"
This reverts commit bcd32f1086c8c604fb22a7496924e41cc46b1605. See #3582
Diffstat (limited to 'commands/hugo.go')
-rw-r--r--commands/hugo.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/commands/hugo.go b/commands/hugo.go
index 9b827bc9b..16170acd4 100644
--- a/commands/hugo.go
+++ b/commands/hugo.go
@@ -25,6 +25,7 @@ import (
"net/http"
"os"
"path/filepath"
+ "runtime"
"strings"
"sync"
"time"
@@ -758,6 +759,10 @@ func (c *commandeer) rebuildSites(events []fsnotify.Event) error {
// newWatcher creates a new watcher to watch filesystem events.
func (c *commandeer) newWatcher(port int) error {
+ if runtime.GOOS == "darwin" {
+ tweakLimit()
+ }
+
watcher, err := watcher.New(1 * time.Second)
var wg sync.WaitGroup