Skip to content

Commit

Permalink
fix: Check for command line position on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Dustin Blackman committed Dec 1, 2023
1 parent f76939f commit eeec3aa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ pub fn run() -> Result<()> {
app.print_long_help()?;
} else {
let mut args: Vec<_> = env::args().collect();
let start_index = args.iter().position(|e| return e.ends_with("/cargo-bin"));
let start_index = args
.iter()
.position(|e| return e.ends_with("/cargo-bin") || e.ends_with("cargo-bin.exe"));
if start_index.is_none() || start_index.unwrap() == (args.len() + 1) {
app.print_long_help()?;
return Ok(());
Expand Down

0 comments on commit eeec3aa

Please sign in to comment.