opentofu/cmd/tofu/working_dir.go
Lars Lehtonen f708fbe17e
cmd: Demote Exported Functions and Variables (#658)
Signed-off-by: Lars Lehtonen <lars.lehtonen@gmail.com>
2023-10-13 16:59:01 +02:00

16 lines
445 B
Go

// Copyright (c) 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
}