diff --git a/src/haunt/cli.go b/src/haunt/cli.go index 827bba8..cea8f13 100644 --- a/src/haunt/cli.go +++ b/src/haunt/cli.go @@ -128,7 +128,7 @@ func (r *Haunt) SetDefaults() { }, Watcher: Watch{ Exts: []string{"go"}, - Paths: []string{"/"}, + Paths: []string{"cmd/" + dir.Name()}, }, }) } else { diff --git a/src/haunt/projects.go b/src/haunt/projects.go index 8984eb6..63a0845 100644 --- a/src/haunt/projects.go +++ b/src/haunt/projects.go @@ -120,8 +120,7 @@ func (p *Project) Before() { p.cmd(p.stop, "before", true) // indexing files and dirs for _, dir := range p.Watcher.Paths { - base, _ := filepath.Abs(p.Path) - base = filepath.Join(base, dir) + base, _ := filepath.Abs(dir) if _, err := os.Stat(base); err == nil { if err := filepath.Walk(base, p.walk); err != nil { p.Err(err)