Skip to content

Commit

Permalink
Finish spinner after enable/disable
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisscott committed Jan 26, 2021
1 parent f2497a7 commit f1c32be
Showing 1 changed file with 26 additions and 18 deletions.
44 changes: 26 additions & 18 deletions internal/cli/rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,19 +73,23 @@ func enableRuleCmd(cli *cli) *cobra.Command {
} else {
return fmt.Errorf("No rule found with name: %q", name)
}
return nil
})

// @TODO Only display modified rules
rules, err := getRules(cli)
if err != nil {
return err
}

if err != nil {
return err
}
// @TODO Only display modified rules
rules, err := getRules(cli)

cli.renderer.RulesList(rules)
if err != nil {
return err
}

return nil
})
return err
cli.renderer.RulesList(rules)

return nil
},
}

Expand Down Expand Up @@ -115,19 +119,23 @@ func disableRuleCmd(cli *cli) *cobra.Command {
} else {
return fmt.Errorf("No rule found with name: %q", name)
}
return nil
})

// @TODO Only display modified rules
rules, err := getRules(cli)
if err != nil {
return err
}

if err != nil {
return err
}
// @TODO Only display modified rules
rules, err := getRules(cli)

cli.renderer.RulesList(rules)
if err != nil {
return err
}

return nil
})
return err
cli.renderer.RulesList(rules)

return nil
},
}

Expand Down

0 comments on commit f1c32be

Please sign in to comment.