Fix panic when x.py is called without any arguments.
This commit is contained in:
@@ -385,9 +385,11 @@ impl<'a> Builder<'a> {
|
||||
Subcommand::Clean { .. } => panic!(),
|
||||
};
|
||||
|
||||
if paths[0] == Path::new("nonexistent/path/to/trigger/cargo/metadata") {
|
||||
if let Some(path) = paths.get(0) {
|
||||
if path == Path::new("nonexistent/path/to/trigger/cargo/metadata") {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
let builder = Builder {
|
||||
build,
|
||||
|
||||
Reference in New Issue
Block a user