Permalink
Browse files

fix watcher

  • Loading branch information...
1 parent e768d48 commit b3580af7536de2db7fd11da92972931f243c54b1 @neelance neelance committed Jan 21, 2017
Showing with 5 additions and 1 deletion.
  1. +5 −1 tool.go
View
@@ -127,7 +127,11 @@ func main() {
for _, pkgPath := range args {
pkgPath = filepath.ToSlash(pkgPath)
if s.Watcher != nil {
- s.Watcher.Add(pkgPath)
+ pkg, err := gbuild.NewBuildContext(s.InstallSuffix(), options.BuildTags).Import(pkgPath, "", build.FindOnly)
+ if err != nil {
+ return err
+ }
+ s.Watcher.Add(pkg.Dir)
}
pkg, err := gbuild.Import(pkgPath, 0, s.InstallSuffix(), options.BuildTags)
if err != nil {

0 comments on commit b3580af

Please sign in to comment.