Wait to locate system-installed Node until the shell environment is loaded (#30416)
Release Notes: - Fixed a race condition that sometimes prevented a system-installed `node` binary from being detected. - Fixed a bug where the `node.path` setting was not respected when invoking npm.
This commit is contained in:
parent
9afc6f6f5c
commit
65b13968a2
7 changed files with 68 additions and 58 deletions
|
@ -468,7 +468,7 @@ pub fn execute_run(
|
|||
)
|
||||
};
|
||||
|
||||
let node_runtime = NodeRuntime::new(http_client.clone(), node_settings_rx);
|
||||
let node_runtime = NodeRuntime::new(http_client.clone(), None, node_settings_rx);
|
||||
|
||||
let mut languages = LanguageRegistry::new(cx.background_executor().clone());
|
||||
languages.set_language_server_download_dir(paths::languages_dir().clone());
|
||||
|
@ -796,7 +796,7 @@ fn initialize_settings(
|
|||
let settings = &ProjectSettings::get_global(cx).node;
|
||||
log::info!("Got new node settings: {:?}", settings);
|
||||
let options = NodeBinaryOptions {
|
||||
allow_path_lookup: !settings.ignore_system_version.unwrap_or_default(),
|
||||
allow_path_lookup: !settings.ignore_system_version,
|
||||
// TODO: Implement this setting
|
||||
allow_binary_download: true,
|
||||
use_paths: settings.path.as_ref().map(|node_path| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue