From 712f09a824e084472d3283a05b48fb3295b1376d Mon Sep 17 00:00:00 2001 From: MDietermann Date: Tue, 14 Apr 2026 22:31:46 +0200 Subject: [PATCH] feat(cmd): add --force flag to install command --- cmd/archduino/main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/archduino/main.go b/cmd/archduino/main.go index 233b34a..6c77474 100644 --- a/cmd/archduino/main.go +++ b/cmd/archduino/main.go @@ -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)")