0
0
mirror of https://github.com/thegeeklab/wp-opentofu.git synced 2024-11-22 00:30:40 +00:00

not using dir as base dir if it's empty

This commit is contained in:
Jeff Storey 2016-04-07 19:30:59 -04:00
parent a61567ecef
commit 4aaf028ac3

View File

@ -66,6 +66,12 @@ func main() {
for _, c := range commands {
c.Env = os.Environ()
c.Dir = workspace.Path
if c.Dir == "" {
wd, err := os.Getwd()
if err == nil {
c.Dir = wd
}
}
if vargs.RootDir != "" {
c.Dir = c.Dir + "/" + vargs.RootDir
}