We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ef3e52b + a50b7b6 commit fce1f41Copy full SHA for fce1f41
crates/rust-analyzer/src/main_loop.rs
@@ -783,9 +783,14 @@ impl GlobalState {
783
DiscoverProjectParam::Path(it) => DiscoverArgument::Path(it),
784
};
785
786
- let handle =
787
- discover.spawn(arg, &std::env::current_dir().unwrap()).unwrap();
788
- self.discover_handle = Some(handle);
+ let handle = discover.spawn(
+ arg,
+ &std::env::current_dir()
789
+ .expect("Failed to get cwd during project discovery"),
790
+ );
791
+ self.discover_handle = Some(handle.unwrap_or_else(|e| {
792
+ panic!("Failed to spawn project discovery command: {e}")
793
+ }));
794
}
795
796
0 commit comments