improved: made watcher paths relative to the config file location
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
01550ac3b3
commit
e8237d5458
@ -128,7 +128,7 @@ func (r *Haunt) SetDefaults() {
|
||||
},
|
||||
Watcher: Watch{
|
||||
Exts: []string{"go"},
|
||||
Paths: []string{"/"},
|
||||
Paths: []string{"cmd/" + dir.Name()},
|
||||
},
|
||||
})
|
||||
} else {
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user