mirror of
https://github.com/89luca89/distrobox.git
synced 2026-08-19 01:14:49 -05:00
fix: passing root correctly to create and generate-entry command (#2068)
* fix(create): handle root correctly The `root` flag is handled in the root cli command. if we re-declare the flag here we shadow it, resulting in a contaner manager initializated as non-root. Before this commit, these two commands produce respectively one root and one non-root execution ``` distrobox --root create # root distrobox create --root # non-root ``` * fix(generate-entry): handle root correctly The `root` flag is handled in the root cli command. if we re-declare the flag here we shadow it, resulting in a contaner manager initializated as non-root. Before this commit, these two commands produce respectively one root and one non-root execution ``` distrobox --root generate-entry # root distrobox generate-entry --root # non-root ```
This commit is contained in:
@@ -65,13 +65,6 @@ Examples:
|
||||
Aliases: []string{"Y"},
|
||||
Usage: "non-interactive, pull images without asking",
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "root",
|
||||
Aliases: []string{"r"},
|
||||
Usage: `launch podman/docker/lilipod with root privileges. This is the only supported way to run with root
|
||||
privileges. Do not use "sudo distrobox". If you need to specify a different program (e.g. 'doas') for root privileges,
|
||||
use the DBX_SUDO_PROGRAM environment variable or the 'distrobox_sudo_program' config variable.`,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "clone",
|
||||
Aliases: []string{"c"},
|
||||
|
||||
@@ -35,11 +35,6 @@ func newGenerateEntryCommand(cfg *config.Values) *cli.Command {
|
||||
Aliases: []string{"a"},
|
||||
Usage: "perform for all distroboxes",
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "root",
|
||||
Aliases: []string{"r"},
|
||||
Usage: "perform on rootful distroboxes",
|
||||
},
|
||||
},
|
||||
ArgsUsage: "container-name",
|
||||
Action: func(ctx context.Context, cmd *cli.Command) error {
|
||||
|
||||
Reference in New Issue
Block a user