From 8c5b5658b960d5ee668912cf9e71ad3c102d4644 Mon Sep 17 00:00:00 2001 From: Luca Di Maio Date: Sat, 20 Jun 2026 15:02:55 +0200 Subject: [PATCH] fix(enter): support noworkdir flag Signed-off-by: Luca Di Maio --- internal/cli/enter.go | 2 ++ pkg/commands/enter.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/internal/cli/enter.go b/internal/cli/enter.go index 6df90e51..6e87bebc 100644 --- a/internal/cli/enter.go +++ b/internal/cli/enter.go @@ -63,6 +63,7 @@ func newEnterCommand(cfg *config.Values) *cli.Command { &cli.BoolFlag{ Name: "no-workdir", Aliases: []string{"nw"}, + Sources: cli.EnvVars("DBX_SKIP_WORKDIR"), Usage: "always start the container from container's home directory", }, }, @@ -141,6 +142,7 @@ func enterAction(ctx context.Context, cmd *cli.Command, cfg *config.Values) erro NoTTY: cmd.Bool("no-tty"), CleanPath: cmd.Bool("clean-path"), Verbose: cmd.Bool("verbose"), + NoWorkDir: cmd.Bool("no-workdir"), } progress := ui.NewProgress(os.Stderr) diff --git a/pkg/commands/enter.go b/pkg/commands/enter.go index eefc23ac..7813dcc8 100644 --- a/pkg/commands/enter.go +++ b/pkg/commands/enter.go @@ -19,6 +19,7 @@ type EnterOptions struct { NoTTY bool Verbose bool CleanPath bool + NoWorkDir bool } type EnterCommand struct { @@ -51,6 +52,7 @@ func (c *EnterCommand) Execute(ctx context.Context, opts EnterOptions) (*EnterRe NoTTY: opts.NoTTY, Verbose: opts.Verbose, CleanPath: opts.CleanPath, + NoWorkDir: opts.NoWorkDir, } err := c.containerManager.Enter(ctx, cmdOpts, c.progress, c.printer)