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

Merge pull request #20 from jeffastorey/check-path

not using dir as base dir if it's empty
This commit is contained in:
Thomas Boerger 2016-06-17 07:02:43 +02:00 committed by GitHub
commit 519daa7fc9

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
}