fix #48816 don't print help on indirect compiler ICE

This commit is contained in:
Alex Butler 2018-03-13 21:03:22 +00:00
parent 8c4ff22a2d
commit 63f654a495
No known key found for this signature in database
GPG Key ID: E1355A2F8E415521

View File

@ -1457,6 +1457,12 @@ fn extra_compiler_flags() -> Option<(Vec<String>, bool)> {
args.push(arg.to_string_lossy().to_string());
}
// Avoid printing help because of empty args. This can suggest the compiler
// itself is not the program root (consider RLS).
if args.len() < 2 {
return None;
}
let matches = if let Some(matches) = handle_options(&args) {
matches
} else {