recent_projects: Do not try to watch /etc/ssh/ssh_config on windows (#42200)
Release Notes: - N/A *or* Added/Fixed/Improved ...
This commit is contained in:
@@ -218,7 +218,7 @@ impl LanguageModels {
|
||||
}
|
||||
_ => {
|
||||
log::error!(
|
||||
"Failed to authenticate provider: {}: {err}",
|
||||
"Failed to authenticate provider: {}: {err:#}",
|
||||
provider_name.0
|
||||
);
|
||||
}
|
||||
|
||||
@@ -177,7 +177,7 @@ impl LanguageModelPickerDelegate {
|
||||
}
|
||||
_ => {
|
||||
log::error!(
|
||||
"Failed to authenticate provider: {}: {err}",
|
||||
"Failed to authenticate provider: {}: {err:#}",
|
||||
provider_name.0
|
||||
);
|
||||
}
|
||||
|
||||
@@ -460,8 +460,12 @@ pub fn user_ssh_config_file() -> PathBuf {
|
||||
home_dir().join(".ssh/config")
|
||||
}
|
||||
|
||||
pub fn global_ssh_config_file() -> &'static Path {
|
||||
Path::new("/etc/ssh/ssh_config")
|
||||
pub fn global_ssh_config_file() -> Option<&'static Path> {
|
||||
if cfg!(windows) {
|
||||
None
|
||||
} else {
|
||||
Some(Path::new("/etc/ssh/ssh_config"))
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns candidate paths for the vscode user settings file
|
||||
|
||||
@@ -2199,11 +2199,9 @@ impl RemoteServerProjects {
|
||||
fn spawn_ssh_config_watch(fs: Arc<dyn Fs>, cx: &Context<RemoteServerProjects>) -> Task<()> {
|
||||
let mut user_ssh_config_watcher =
|
||||
watch_config_file(cx.background_executor(), fs.clone(), user_ssh_config_file());
|
||||
let mut global_ssh_config_watcher = watch_config_file(
|
||||
cx.background_executor(),
|
||||
fs,
|
||||
global_ssh_config_file().to_owned(),
|
||||
);
|
||||
let mut global_ssh_config_watcher = global_ssh_config_file()
|
||||
.map(|it| watch_config_file(cx.background_executor(), fs, it.to_owned()))
|
||||
.unwrap_or_else(|| futures::channel::mpsc::unbounded().1);
|
||||
|
||||
cx.spawn(async move |remote_server_projects, cx| {
|
||||
let mut global_hosts = BTreeSet::default();
|
||||
|
||||
Reference in New Issue
Block a user