@@ -31,12 +31,13 @@ Supervisor running on your Home Assistant system.`,
3131 for _ , value := range []string {
3232 "hostname" ,
3333 "channel" ,
34+ "detect-blocking-io" ,
3435 "timezone" ,
3536 "logging" ,
3637 } {
3738 val , err := cmd .Flags ().GetString (value )
3839 if val != "" && err == nil && cmd .Flags ().Changed (value ) {
39- options [value ] = val
40+ options [strings . ReplaceAll ( value , "-" , "_" ) ] = val
4041 }
4142 }
4243
@@ -79,6 +80,7 @@ Supervisor running on your Home Assistant system.`,
7980func init () {
8081 supervisorOptionsCmd .Flags ().StringP ("hostname" , "" , "" , "Hostname to set" )
8182 supervisorOptionsCmd .Flags ().StringP ("channel" , "c" , "" , "Channel to track (stable|beta|dev)" )
83+ supervisorOptionsCmd .Flags ().StringP ("detect-blocking-io" , "" , "" , "Detect blocking IO (on|on-at-startup|off)" )
8284 supervisorOptionsCmd .Flags ().StringP ("timezone" , "t" , "" , "Timezone" )
8385 supervisorOptionsCmd .Flags ().StringP ("logging" , "l" , "" , "Logging: debug|info|warning|error|critical" )
8486 supervisorOptionsCmd .Flags ().IntP ("wait-boot" , "w" , 0 , "Seconds to wait after boot" )
@@ -97,6 +99,9 @@ func init() {
9799 supervisorOptionsCmd .RegisterFlagCompletionFunc ("channel" , func (cmd * cobra.Command , args []string , toComplete string ) ([]string , cobra.ShellCompDirective ) {
98100 return []string {"stable" , "beta" , "dev" }, cobra .ShellCompDirectiveNoFileComp
99101 })
102+ supervisorOptionsCmd .RegisterFlagCompletionFunc ("detect-blocking-io" , func (cmd * cobra.Command , args []string , toComplete string ) ([]string , cobra.ShellCompDirective ) {
103+ return []string {"on" , "on-at-startup" , "off" }, cobra .ShellCompDirectiveNoFileComp
104+ })
100105 supervisorOptionsCmd .RegisterFlagCompletionFunc ("timezone" , cobra .NoFileCompletions )
101106 supervisorOptionsCmd .RegisterFlagCompletionFunc ("logging" , func (cmd * cobra.Command , args []string , toComplete string ) ([]string , cobra.ShellCompDirective ) {
102107 return []string {"debug" , "info" , "warning" , "error" , "critical" }, cobra .ShellCompDirectiveNoFileComp
0 commit comments