@@ -12,11 +12,10 @@ use volta_core::session::Session;
1212
1313 To install a tool in your toolchain, use `volta install`.
1414 To pin your project's runtime or package manager, use `volta pin`." ,
15- global_setting = clap:: AppSettings :: ColoredHelp ,
16- global_setting = clap:: AppSettings :: ColorAuto ,
15+ color = clap:: ColorChoice :: Auto ,
1716 global_setting = clap:: AppSettings :: DeriveDisplayOrder ,
18- global_setting = clap :: AppSettings :: DisableVersion ,
19- global_setting = clap :: AppSettings :: DontCollapseArgsInUsage ,
17+ disable_version_flag = true ,
18+ dont_collapse_args_in_usage = true ,
2019) ]
2120pub ( crate ) struct Volta {
2221 #[ clap( subcommand) ]
@@ -55,7 +54,7 @@ impl Volta {
5554 } else if let Some ( command) = self . command {
5655 command. run ( session)
5756 } else {
58- Volta :: from_iter ( [ "volta" , "help" ] . iter ( ) ) . run ( session)
57+ Volta :: parse_from ( [ "volta" , "help" ] . iter ( ) ) . run ( session)
5958 }
6059 }
6160}
@@ -85,7 +84,7 @@ pub(crate) enum Subcommand {
8584 /// Generates Volta completions
8685 #[ clap(
8786 name = "completions" ,
88- setting = clap :: AppSettings :: ArgRequiredElseHelp ,
87+ arg_required_else_help = true ,
8988 long_about = "Generates Volta completions
9089
9190By default, completions will be generated for the value of your current shell,
@@ -105,7 +104,7 @@ otherwise, they will be written to `stdout`.
105104 #[ clap(
106105 name = "use" ,
107106 long_about = crate :: command:: r#use:: USAGE ,
108- setting = clap :: AppSettings :: Hidden ,
107+ hide = true ,
109108 ) ]
110109 Use ( command:: Use ) ,
111110
@@ -114,11 +113,7 @@ otherwise, they will be written to `stdout`.
114113 Setup ( command:: Setup ) ,
115114
116115 /// Run a command with custom Node, npm, pnpm, and/or Yarn versions
117- #[ clap(
118- name = "run" ,
119- setting = clap:: AppSettings :: AllowLeadingHyphen ,
120- setting = clap:: AppSettings :: TrailingVarArg ,
121- ) ]
116+ #[ clap( name = "run" , allow_hyphen_values = true , trailing_var_arg = true ) ]
122117 Run ( command:: Run ) ,
123118}
124119
0 commit comments