You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if command_surface::is_known_command(&subcommand){
379
365
format!(
380
-
"Command '{}' is currently unavailable in this build. Try: run 'sce --help' to see available commands in this build.",
381
-
subcommand
366
+
"Command '{subcommand}' is currently unavailable in this build. Try: run 'sce --help' to see available commands in this build."
382
367
)
383
368
}else{
384
369
format!(
385
-
"Unknown command '{}'. Try: run 'sce --help' to list valid commands, then rerun with a valid command such as 'sce version' or 'sce setup --help'.",
386
-
subcommand
370
+
"Unknown command '{subcommand}'. Try: run 'sce --help' to list valid commands, then rerun with a valid command such as 'sce version' or 'sce setup --help'."
387
371
)
388
372
}
389
373
}else{
390
-
format!("{}. Try: run 'sce --help' to see valid usage.", message)
374
+
format!("{message}. Try: run 'sce --help' to see valid usage.")
391
375
}
392
376
}
393
377
ErrorKind::UnknownArgument => {
394
378
// Extract the unknown argument and provide helpful guidance
395
379
ifletSome(arg) = extract_quoted_value(message){
396
380
format!(
397
-
"Unknown option '{}'. Try: run 'sce --help' to see top-level usage, or use 'sce <command> --help' for command-specific options.",
398
-
arg
381
+
"Unknown option '{arg}'. Try: run 'sce --help' to see top-level usage, or use 'sce <command> --help' for command-specific options."
399
382
)
400
383
}else{
401
-
format!("{}. Try: run 'sce --help' to see valid usage.", message)
384
+
format!("{message}. Try: run 'sce --help' to see valid usage.")
402
385
}
403
386
}
404
387
ErrorKind::MissingRequiredArgument => {
405
388
// Clean up clap's message for missing required arguments
406
389
if message.contains("required"){
407
-
format!(
408
-
"{}. Try: run 'sce --help' to see required arguments.",
409
-
message
410
-
)
390
+
format!("{message}. Try: run 'sce --help' to see required arguments.")
411
391
}else{
412
-
format!("{}. Try: run 'sce --help' to see valid usage.", message)
392
+
format!("{message}. Try: run 'sce --help' to see valid usage.")
413
393
}
414
394
}
415
395
ErrorKind::ArgumentConflict => {
416
396
// Handle mutually exclusive arguments
417
397
if message.contains("cannot be used with") || message.contains("conflicts with"){
418
-
format!("{}. Try: use only one of the conflicting options.", message)
398
+
format!("{message}. Try: use only one of the conflicting options.")
419
399
}else{
420
-
format!("{}. Try: run 'sce --help' to see valid usage.", message)
400
+
format!("{message}. Try: run 'sce --help' to see valid usage.")
421
401
}
422
402
}
423
403
_ => {
424
404
// Default cleanup: ensure message ends with guidance
425
405
if message.contains("Try:"){
426
406
message.to_string()
427
407
}else{
428
-
format!("{}. Try: run 'sce --help' to see valid usage.", message)
408
+
format!("{message}. Try: run 'sce --help' to see valid usage.")
0 commit comments