Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Anis Eleuch committed Oct 1, 2024
1 parent 6ed5567 commit 39a1bab
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmd/admin-heal.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ var adminHealFlags = []cli.Flag{
Usage: "force stop a running heal sequence",
Hidden: true,
},
cli.BoolFlag{
Name: "force",
Usage: "avoid showing a warning prompt",
},
cli.BoolFlag{
Name: "remove",
Usage: "remove dangling objects in heal sequence",
Expand Down Expand Up @@ -738,7 +742,7 @@ func mainAdminHeal(ctx *cli.Context) error {
return nil
}

if prefix == "" && opts.Recursive && opts.Pool == nil && opts.Set == nil && isTerminal() {
if opts.Recursive && opts.Pool == nil && opts.Set == nil && isTerminal() && !ctx.Bool("force") {
fmt.Printf("You are about to scan and heal the whole namespace in all pools and sets, please confirm [y/N]: ")
answer, e := bufio.NewReader(os.Stdin).ReadString('\n')
fatalIf(probe.NewError(e), "Unable to parse user input.")
Expand Down

0 comments on commit 39a1bab

Please sign in to comment.