Fix configure hosts show emptying /etc/hosts and setpersist CLI variable in configure hosts
- Only open `/etc/hosts` when write intended - Correct `SetPersist` CLI variable
This commit is contained in:
@@ -16,7 +16,7 @@ var (
|
||||
|
||||
func init() {
|
||||
baseCmd.PersistentFlags().BoolVarP(&SetShow, "show", "s", false, "Show configuration (don't update)")
|
||||
baseCmd.PersistentFlags().BoolVar(&SetShow, "persist", false, "Persist the configuration and initialize the service")
|
||||
baseCmd.PersistentFlags().BoolVar(&SetPersist, "persist", false, "Persist the configuration and initialize the service")
|
||||
}
|
||||
|
||||
// GetRootCommand returns the root cobra.Command for the application.
|
||||
|
||||
Reference in New Issue
Block a user