mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-24 16:10:46 -06:00
13 lines
377 B
Go
13 lines
377 B
Go
|
package main
|
||
|
|
||
|
import "github.com/hashicorp/terraform/internal/command/workdir"
|
||
|
|
||
|
func WorkingDir(originalDir string, overrideDataDir string) *workdir.Dir {
|
||
|
ret := workdir.NewDir(".") // caller should already have used os.Chdir in "-chdir=..." mode
|
||
|
ret.OverrideOriginalWorkingDir(originalDir)
|
||
|
if overrideDataDir != "" {
|
||
|
ret.OverrideDataDir(overrideDataDir)
|
||
|
}
|
||
|
return ret
|
||
|
}
|