changing exec to always use abs path
parent
bcfdbd4327
commit
b9b75192c5
4
lib.go
4
lib.go
|
@ -235,7 +235,9 @@ func Exec(str string, opts ...*Opts) ([]*exec.Cmd, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
cmdwd := opt.Wd
|
cmdwd := opt.Wd
|
||||||
|
if !filepath.IsAbs(cmdwd) {
|
||||||
|
cmdwd = filepath.Join(wd, cmdwd)
|
||||||
|
}
|
||||||
prepCmd := func(l Line) *exec.Cmd {
|
prepCmd := func(l Line) *exec.Cmd {
|
||||||
cmd := exec.Command(l.Tokens[0], l.Tokens[1:]...)
|
cmd := exec.Command(l.Tokens[0], l.Tokens[1:]...)
|
||||||
cmd.Stdout = log.Writer()
|
cmd.Stdout = log.Writer()
|
||||||
|
|
Loading…
Reference in New Issue