Skip to content

Commit d114bf0

Browse files
committed
Try fixing Windows again
1 parent bc04c05 commit d114bf0

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/main.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,11 @@ fn parse_args() -> Args {
117117
.arg(Arg::new("script")
118118
.index(1)
119119
.about("Script file or expression to execute.")
120-
.required_unless_present_any(&["clear-cache"])
120+
.required_unless_present_any(if cfg!(windows) {
121+
vec!["clear-cache", "list-templates", "file-association"]
122+
} else {
123+
vec!["clear-cache", "list-templates"]
124+
})
121125
.number_of_values(1)
122126
.conflicts_with_all(if cfg!(windows) {
123127
&["list-templates", "file-association"]
@@ -156,6 +160,7 @@ fn parse_args() -> Args {
156160
.about("Show output from cargo when building.")
157161
.short('o')
158162
.long("cargo-output")
163+
.requires("script")
159164
)
160165
.arg(Arg::new("count")
161166
.about("Invoke the loop closure with two arguments: line, and line number.")
@@ -167,15 +172,15 @@ fn parse_args() -> Args {
167172
.long("debug")
168173
)
169174
.arg(Arg::new("dep")
170-
.about("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.")
175+
.about("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.")
171176
.long("dep")
172177
.short('d')
173178
.takes_value(true)
174179
.multiple(true)
175180
.number_of_values(1)
176181
)
177182
.arg(Arg::new("dep_extern")
178-
.about("Like `dep`, except that it *also* adds a `#[macro_use] extern crate name;` item for expression and loop scripts. Note that this only works if the name of the dependency and the name of the library it generates are exactly the same.")
183+
.about("Like `dep`, except that it *also* adds a `#[macro_use] extern crate name;` item for expression and loop scripts. Note that this only works if the name of the dependency and the name of the library it generates are exactly the same.")
179184
.long("dep-extern")
180185
.short('D')
181186
.takes_value(true)

0 commit comments

Comments
 (0)