feat(cmd): add --force flag to install command
Some checks failed
ci / test (push) Has been cancelled
Some checks failed
ci / test (push) Has been cancelled
This commit is contained in:
@@ -108,6 +108,7 @@ func newInstallCmd() *cobra.Command {
|
||||
dryRun bool
|
||||
halt bool
|
||||
noSudo bool
|
||||
force bool
|
||||
only []string
|
||||
skip []string
|
||||
overlayPath string
|
||||
@@ -174,12 +175,14 @@ func newInstallCmd() *cobra.Command {
|
||||
Selected: selected,
|
||||
DryRun: dryRun,
|
||||
HaltOnError: halt,
|
||||
Force: force,
|
||||
Reporter: reporter,
|
||||
})
|
||||
} else {
|
||||
// TUI path: wizard → dashboard. If the user does not confirm,
|
||||
// we exit cleanly with a zero-summary and no error.
|
||||
initial := tui.NewWizardState(cfg, reg)
|
||||
initial.Force = force
|
||||
// Pre-filter the wizard's module list by --only/--skip so the
|
||||
// user cannot accidentally widen selection in the TUI beyond
|
||||
// what they asked for on the CLI.
|
||||
@@ -254,6 +257,7 @@ func newInstallCmd() *cobra.Command {
|
||||
cmd.Flags().BoolVar(&dryRun, "dry-run", false, "show planned actions without applying")
|
||||
cmd.Flags().BoolVar(&halt, "halt-on-error", false, "stop at first failure instead of continuing siblings")
|
||||
cmd.Flags().BoolVar(&noSudo, "no-sudo", false, "skip upfront sudo -v (for tests / containers with passwordless sudo)")
|
||||
cmd.Flags().BoolVar(&force, "force", false, "reapply every selected module, ignoring current state")
|
||||
cmd.Flags().StringSliceVar(&only, "only", nil, "comma-separated module IDs to run (exclusive with --skip)")
|
||||
cmd.Flags().StringSliceVar(&skip, "skip", nil, "comma-separated module IDs to skip")
|
||||
cmd.Flags().StringVar(&overlayPath, "config", "", "path to overlay.yaml (default: ~/.config/archduino/overlay.yaml)")
|
||||
|
||||
Reference in New Issue
Block a user