@@ -12,7 +12,7 @@ use std::{future::Future, sync::Arc};
1212use anyhow:: { Context , Result } ;
1313#[ cfg( feature = "experimental-wasm-features" ) ]
1414use clap:: ValueEnum ;
15- use clap:: { Args , IntoApp , Parser } ;
15+ use clap:: { Args , CommandFactory , Parser } ;
1616use spin_app:: App ;
1717use spin_common:: sloth;
1818use spin_common:: ui:: quoted_path;
@@ -45,6 +45,7 @@ pub const SPIN_WORKING_DIR: &str = "SPIN_WORKING_DIR";
4545/// A command that runs a TriggerExecutor.
4646#[ derive( Parser , Debug ) ]
4747#[ clap(
48+ styles = spin_common:: cli:: CLAP_STYLES ,
4849 override_usage = "spin [COMMAND] [OPTIONS]" ,
4950 next_help_heading = help_heading:: <T , B :: Factors >( )
5051) ]
@@ -72,7 +73,6 @@ pub struct FactorsTriggerCommand<T: Trigger<B::Factors>, B: RuntimeFactorsBuilde
7273 long = "disable-cache" ,
7374 env = DISABLE_WASMTIME_CACHE ,
7475 conflicts_with = WASMTIME_CACHE_FILE ,
75- takes_value = false ,
7676 ) ]
7777 pub disable_cache : bool ,
7878
@@ -91,7 +91,7 @@ pub struct FactorsTriggerCommand<T: Trigger<B::Factors>, B: RuntimeFactorsBuilde
9191
9292 /// Enable Wasmtime's debug info for Wasm guests, allowing debugging
9393 /// with gdb or lldb.
94- #[ clap( long = "debug-info" , takes_value = false ) ]
94+ #[ clap( long = "debug-info" ) ]
9595 pub debug_info : bool ,
9696
9797 /// Print output to stdout/stderr only for given component(s)
@@ -330,9 +330,9 @@ fn warn_if_wasm_build_slothful() -> sloth::SlothGuard {
330330
331331fn help_heading < T : Trigger < F > , F : RuntimeFactors > ( ) -> Option < & ' static str > {
332332 if T :: TYPE == <help:: HelpArgsOnlyTrigger as Trigger < F > >:: TYPE {
333- Some ( "TRIGGER OPTIONS " )
333+ Some ( "Trigger Options " )
334334 } else {
335- let heading = format ! ( "{} TRIGGER OPTIONS " , T :: TYPE . to_uppercase( ) ) ;
335+ let heading = format ! ( "{} Trigger Options " , T :: TYPE . to_uppercase( ) ) ;
336336 let as_str = Box :: new ( heading) . leak ( ) ;
337337 Some ( as_str)
338338 }
0 commit comments