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
Copy file name to clipboardExpand all lines: src/arguments.rs
+12-15Lines changed: 12 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -6,11 +6,9 @@ use crate::build_kind::BuildKind;
6
6
pubstructArgs{
7
7
pubscript:Option<String>,
8
8
pubscript_args:Vec<String>,
9
-
10
9
pubexpr:bool,
11
10
publoop_:bool,
12
11
pubcount:bool,
13
-
14
12
pubpkg_path:Option<String>,
15
13
pubgen_pkg_only:bool,
16
14
pubcargo_output:bool,
@@ -21,12 +19,7 @@ pub struct Args {
21
19
pubforce:bool,
22
20
pubunstable_features:Vec<String>,
23
21
pubbuild_kind:BuildKind,
24
-
// This is a String instead of an
25
-
// enum since one can have custom
26
-
// toolchains (ex. a rustc developer
27
-
// will probably have `stage1`).
28
22
pubtoolchain_version:Option<String>,
29
-
30
23
#[cfg(windows)]
31
24
pubinstall_file_association:bool,
32
25
#[cfg(windows)]
@@ -80,7 +73,7 @@ impl Args {
80
73
*/
81
74
.arg(Arg::new("cargo-output")
82
75
.help("Show output from cargo when building.")
83
-
.short('o')
76
+
.short('c')
84
77
.long("cargo-output")
85
78
.action(ArgAction::SetTrue)
86
79
.requires("script")
@@ -97,7 +90,7 @@ impl Args {
97
90
.action(ArgAction::SetTrue)
98
91
)
99
92
.arg(Arg::new("dep")
100
-
.help("Add an additional Cargo dependency. Each SPEC can be either just the package name (which will assume the latest version) or a full `name=version` spec.")
93
+
.help("Add a dependency - either just the package name (for the latest version) or as `name=version`.")
101
94
.long("dep")
102
95
.short('d')
103
96
.num_args(1..)
@@ -124,17 +117,20 @@ impl Args {
124
117
.arg(Arg::new("clear-cache")
125
118
.help("Clears out the script cache.")
126
119
.long("clear-cache")
120
+
.exclusive(true)
127
121
.action(ArgAction::SetTrue),
128
122
)
129
123
.arg(Arg::new("force")
130
124
.help("Force the script to be rebuilt.")
131
125
.long("force")
126
+
.short('f')
132
127
.action(ArgAction::SetTrue)
133
128
.requires("script")
134
129
)
135
130
.arg(Arg::new("gen_pkg_only")
136
-
.help("Generate the Cargo package, but don't compile or run it.")
131
+
.help("Generate the Cargo package and print the path to it, but don't compile or run it.")
0 commit comments