Inject venv environment via the toolchain (#36576)
Instead of manually constructing the venv we now ask the python toolchain for the relevant information, unifying the approach of vent inspection Fixes https://github.com/zed-industries/zed/issues/27350 Release Notes: - Improved the detection of python virtual environments for terminals and tasks in remote projects.
This commit is contained in:
@@ -757,6 +757,7 @@ impl RemoteClient {
|
||||
args: &[String],
|
||||
env: &HashMap<String, String>,
|
||||
working_dir: Option<String>,
|
||||
activation_script: Option<String>,
|
||||
port_forward: Option<(u16, String, u16)>,
|
||||
) -> Result<CommandTemplate> {
|
||||
let Some(connection) = self
|
||||
@@ -766,7 +767,14 @@ impl RemoteClient {
|
||||
else {
|
||||
return Err(anyhow!("no connection"));
|
||||
};
|
||||
connection.build_command(program, args, env, working_dir, port_forward)
|
||||
connection.build_command(
|
||||
program,
|
||||
args,
|
||||
env,
|
||||
working_dir,
|
||||
activation_script,
|
||||
port_forward,
|
||||
)
|
||||
}
|
||||
|
||||
pub fn upload_directory(
|
||||
@@ -998,6 +1006,7 @@ pub(crate) trait RemoteConnection: Send + Sync {
|
||||
args: &[String],
|
||||
env: &HashMap<String, String>,
|
||||
working_dir: Option<String>,
|
||||
activation_script: Option<String>,
|
||||
port_forward: Option<(u16, String, u16)>,
|
||||
) -> Result<CommandTemplate>;
|
||||
fn connection_options(&self) -> SshConnectionOptions;
|
||||
@@ -1364,6 +1373,7 @@ mod fake {
|
||||
args: &[String],
|
||||
env: &HashMap<String, String>,
|
||||
_: Option<String>,
|
||||
_: Option<String>,
|
||||
_: Option<(u16, String, u16)>,
|
||||
) -> Result<CommandTemplate> {
|
||||
let ssh_program = program.unwrap_or_else(|| "sh".to_string());
|
||||
|
||||
Reference in New Issue
Block a user