fix(enter): support noworkdir flag

Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
This commit is contained in:
Luca Di Maio committed 2026-06-25 09:07:21 +02:00
1 parent 9844159d0f
commit 8c5b5658b9
2 files changed
+4

No files matched your search

+2
View File
@@ -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)
+2
View File
@@ -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)