mirror of
https://github.com/89luca89/distrobox.git
synced 2026-11-02 20:30:16 -06:00
fix(enter): support noworkdir flag
Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
This commit is contained in:
2 files changed
+4
No files matched your search
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user