diff --git a/envbuilder.go b/envbuilder.go index 75829c2f..295ef3f3 100644 --- a/envbuilder.go +++ b/envbuilder.go @@ -120,7 +120,7 @@ func Run(ctx context.Context, opts options.Options, preExec ...func()) error { func run(ctx context.Context, opts options.Options, execArgs *execArgsInfo) error { defer options.UnsetEnv() - workingDir := workingdir.At(opts.MagicDirBase) + workingDir := workingdir.At(opts.WorkingDirBase) stageNumber := 0 startStage := func(format string, args ...any) func(format string, args ...any) { @@ -962,7 +962,7 @@ func RunCacheProbe(ctx context.Context, opts options.Options) (v1.Image, error) return nil, fmt.Errorf("--cache-repo must be set when using --get-cached-image") } - workingDir := workingdir.At(opts.MagicDirBase) + workingDir := workingdir.At(opts.WorkingDirBase) stageNumber := 0 startStage := func(format string, args ...any) func(format string, args ...any) { diff --git a/options/defaults.go b/options/defaults.go index b9e47a80..4b153c8f 100644 --- a/options/defaults.go +++ b/options/defaults.go @@ -65,7 +65,7 @@ func (o *Options) SetDefaults() { if o.BinaryPath == "" { o.BinaryPath = "/.envbuilder/bin/envbuilder" } - if o.MagicDirBase == "" { - o.MagicDirBase = workingdir.Default.Path() + if o.WorkingDirBase == "" { + o.WorkingDirBase = workingdir.Default.Path() } } diff --git a/options/defaults_test.go b/options/defaults_test.go index de57365d..20aacc6a 100644 --- a/options/defaults_test.go +++ b/options/defaults_test.go @@ -141,7 +141,7 @@ func TestOptions_SetDefaults(t *testing.T) { Filesystem: chmodfs.New(osfs.New("/")), GitURL: "", WorkspaceFolder: options.EmptyWorkspaceDir, - MagicDirBase: "/.envbuilder", + WorkingDirBase: "/.envbuilder", BinaryPath: "/.envbuilder/bin/envbuilder", } diff --git a/options/options.go b/options/options.go index 18bd56d1..079a9044 100644 --- a/options/options.go +++ b/options/options.go @@ -162,10 +162,10 @@ type Options struct { // GetCachedImage is true. BinaryPath string - // MagicDirBase is the path to the directory where all envbuilder files should be + // WorkingDirBase is the path to the directory where all envbuilder files should be // stored. By default, this is set to `/.envbuilder`. This is intentionally // excluded from the CLI options. - MagicDirBase string + WorkingDirBase string } const envPrefix = "ENVBUILDER_"