#148 workaround fixed

This commit is contained in:
asoseil 2018-01-09 00:50:49 +01:00
parent b9efc9d317
commit 930f2a3562
1 changed files with 3 additions and 1 deletions

View File

@ -575,8 +575,10 @@ func (p *Project) run(path string, stream chan Response, stop <-chan bool) (err
dirPath, _ = filepath.Abs(p.Tools.Run.Dir) dirPath, _ = filepath.Abs(p.Tools.Run.Dir)
} }
name := filepath.Base(path) name := filepath.Base(path)
if path == "." { if path == "." && p.Tools.Run.Dir == "" {
name = filepath.Base(Wdir()) name = filepath.Base(Wdir())
}else{
name = filepath.Base(dirPath)
} }
path = filepath.Join(dirPath, name) path = filepath.Join(dirPath, name)
if _, err := os.Stat(path); err == nil { if _, err := os.Stat(path); err == nil {