@@ -148,6 +148,10 @@ func serviceAction(c *cli.Context) error {
148148func signAction (c * cli.Context ) error {
149149 // Skip validation of the config since that relies on Keybase's servers
150150 conf := config.EnvConfig {}
151+ err := config .ValidateConfig (conf , true )
152+ if err != nil {
153+ return fmt .Errorf ("Invalid config: %v" , err )
154+ }
151155 principals := strings .Join (conf .GetTeams (), "," )
152156 expiration := conf .GetKeyExpiration ()
153157 randomUUID , err := uuid .NewRandom ()
@@ -186,7 +190,8 @@ func signAction(c *cli.Context) error {
186190
187191// The action for the `keybaseca` command. Only used for hidden and unlisted flags.
188192func mainAction (c * cli.Context ) error {
189- if c .Bool ("wipe-all-configs" ) {
193+ switch {
194+ case c .Bool ("wipe-all-configs" ):
190195 teams , err := shared .KBFSList ("/keybase/team/" )
191196 if err != nil {
192197 return err
@@ -215,7 +220,7 @@ func mainAction(c *cli.Context) error {
215220 }(team )
216221 }
217222 semaphore .Wait ()
218- } else if c .Bool ("wipe-logs" ) {
223+ case c .Bool ("wipe-logs" ):
219224 conf , err := loadServerConfig ()
220225 if err != nil {
221226 return err
@@ -233,7 +238,7 @@ func mainAction(c *cli.Context) error {
233238 }
234239 }
235240 fmt .Println ("Wiped existing log file at " + logLocation )
236- } else {
241+ default :
237242 cli .ShowAppHelpAndExit (c , 1 )
238243 }
239244 return nil
@@ -316,7 +321,7 @@ func captureControlCToDeleteClientConfig(conf config.Config) {
316321// Load and validate a server config object from the environment
317322func loadServerConfig () (config.Config , error ) {
318323 conf := config.EnvConfig {}
319- err := config .ValidateConfig (conf )
324+ err := config .ValidateConfig (conf , false )
320325 if err != nil {
321326 return nil , fmt .Errorf ("Failed to validate config: %v" , err )
322327 }
0 commit comments