diff --git a/lapce-data/src/proxy.rs b/lapce-data/src/proxy.rs index 024a6a2f..3b3bf91a 100644 --- a/lapce-data/src/proxy.rs +++ b/lapce-data/src/proxy.rs @@ -295,8 +295,6 @@ fn start( } fn start_remote(&self, remote: impl Remote) -> Result<()> { - remote.connection_debug(); - use HostPlatform::*; let (platform, architecture) = self.host_specification(&remote).unwrap(); @@ -566,8 +564,6 @@ fn home_dir(&self) -> Result { fn upload_file(&self, local: impl AsRef, remote: &str) -> Result<()>; fn command_builder(&self) -> Command; - - fn connection_debug(&self); } struct SshRemote { @@ -594,10 +590,6 @@ impl SshRemote { fn command_builder(user: &str, host: &str) -> Command { let mut cmd = new_command("ssh"); cmd.arg(format!("{}@{}", user, host)).args(Self::SSH_ARGS); - - #[cfg(debug_assertions)] - cmd.arg("-v"); - cmd } } @@ -615,20 +607,6 @@ fn upload_file(&self, local: impl AsRef, remote: &str) -> Result<()> { fn command_builder(&self) -> Command { Self::command_builder(&self.user, &self.host) } - - fn connection_debug(&self) { - if let Ok(out) = self.command_builder().arg("-v").arg("exit").output() { - let stderr = String::from_utf8_lossy(&out.stderr); - for line in stderr.split_terminator(['\n', '\r']) { - if line.is_empty() { - continue; - } - log::debug!(target: "lapce_data::proxy::connection_debug", "{line}"); - } - } else { - log::debug!(target: "lapce_data::proxy::connection_debug", "ssh debug output failed"); - } - } } #[derive(Debug)] @@ -696,8 +674,6 @@ fn command_builder(&self) -> Command { cmd.arg("-d").arg(&self.distro).arg("--"); cmd } - - fn connection_debug(&self) {} } // Rust-analyzer returns paths in the form of "file:///:/...", which gets parsed into URL diff --git a/lapce-proxy/src/plugin/wasi.rs b/lapce-proxy/src/plugin/wasi.rs index 90eb97d3..2774d1f8 100644 --- a/lapce-proxy/src/plugin/wasi.rs +++ b/lapce-proxy/src/plugin/wasi.rs @@ -333,7 +333,10 @@ pub fn start_volt( stderr.clone(), ))) .preopened_dir( - wasmtime_wasi::Dir::from_std_file(std::fs::File::open(volt_path)?), + wasmtime_wasi::Dir::from_std_file(std::fs::File::open( + volt_path.join("volt.toml"), + )?) + .open_parent_dir(wasmtime_wasi::ambient_authority())?, "/", )? .build();