Fix panic when x.py
is called without any arguments.
This commit is contained in:
parent
366a65665a
commit
c788433b15
1 changed files with 4 additions and 2 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue