mirror of
https://github.com/thegeeklab/wp-opentofu.git
synced 2024-11-22 10:40:39 +00:00
not using dir as base dir if it's empty
This commit is contained in:
parent
a61567ecef
commit
4aaf028ac3
6
main.go
6
main.go
@ -66,6 +66,12 @@ func main() {
|
|||||||
for _, c := range commands {
|
for _, c := range commands {
|
||||||
c.Env = os.Environ()
|
c.Env = os.Environ()
|
||||||
c.Dir = workspace.Path
|
c.Dir = workspace.Path
|
||||||
|
if c.Dir == "" {
|
||||||
|
wd, err := os.Getwd()
|
||||||
|
if err == nil {
|
||||||
|
c.Dir = wd
|
||||||
|
}
|
||||||
|
}
|
||||||
if vargs.RootDir != "" {
|
if vargs.RootDir != "" {
|
||||||
c.Dir = c.Dir + "/" + vargs.RootDir
|
c.Dir = c.Dir + "/" + vargs.RootDir
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user