mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-24 16:10:46 -06:00
cb2e9119aa
Signed-off-by: namgyalangmo <75657887+namgyalangmo@users.noreply.github.com>
18 lines
524 B
Go
18 lines
524 B
Go
// Copyright (c) The OpenTofu Authors
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
// Copyright (c) 2023 HashiCorp, Inc.
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
package main
|
|
|
|
import "github.com/opentofu/opentofu/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
|
|
}
|