Skip to content

Commit

Permalink
Fix panic when x.py is called without any arguments.
Browse files Browse the repository at this point in the history
  • Loading branch information
kennytm authored and Mark-Simulacrum committed Feb 18, 2018
1 parent b8af50a commit d64aee0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/bootstrap/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,10 @@ impl<'a> Builder<'a> {
Subcommand::Clean { .. } => panic!(),
};

if paths[0] == Path::new("nonexistent/path/to/trigger/cargo/metadata") {
return;
if let Some(path) = paths.get(0) {
if path == Path::new("nonexistent/path/to/trigger/cargo/metadata") {
return;
}
}

let builder = Builder {
Expand Down

0 comments on commit d64aee0

Please sign in to comment.