Skip to content

Commit

Permalink
Fix really stupid bug
Browse files Browse the repository at this point in the history
  • Loading branch information
nilehmann committed Sep 13, 2023
1 parent ae15133 commit d55eb58
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@ struct Args {
fn main() -> io::Result<()> {
let mut args = Args::parse();

let Some(cmd) = args.cmd.pop() else {
eprintln!("No command specified");
if args.cmd.len() == 0 {
std::process::exit(1);
};
}

let mut cmd = Command::new(cmd);
let mut cmd = Command::new(args.cmd.remove(0));
for arg in args.cmd {
cmd.arg(arg);
}
Expand Down

0 comments on commit d55eb58

Please sign in to comment.