fix(runner): scope verified runtime inheritance

This commit is contained in:
Dotta 2026-09-02 19:29:03 -05:00
parent cf8e7d475a
commit 464bcfec26
3 changed files with 20 additions and 4 deletions

View File

@ -239,7 +239,10 @@ impl AcpxProviderDescriptor {
Ok(AcpxSidecarTransportConfig {
command: launch_profile.command.clone(),
args: launch_profile.args.clone(),
verified_launch: Some(VerifiedProcessLaunch::new(command, verified_args)),
verified_launch: Some(
VerifiedProcessLaunch::new(command, verified_args)
.with_inherited_runtime_executable(),
),
request_timeout: Duration::from_secs(30),
shutdown_grace: Duration::from_secs(2),
})

View File

@ -195,11 +195,21 @@ pub enum VerifiedProcessArgument {
pub struct VerifiedProcessLaunch {
program: VerifiedProcessArtifact,
args: Vec<VerifiedProcessArgument>,
inherit_runtime_executable: bool,
}
impl VerifiedProcessLaunch {
pub fn new(program: VerifiedProcessArtifact, args: Vec<VerifiedProcessArgument>) -> Self {
Self { program, args }
Self {
program,
args,
inherit_runtime_executable: false,
}
}
pub fn with_inherited_runtime_executable(mut self) -> Self {
self.inherit_runtime_executable = true;
self
}
#[cfg(test)]
@ -624,7 +634,9 @@ impl SupervisedProcess {
shutdown_grace,
max_line_bytes,
additional_environment_keys,
Some(&inherited.program),
launch
.inherit_runtime_executable
.then_some(inherited.program.as_path()),
);
#[cfg(target_os = "macos")]
if let Ok(process) = result.as_mut() {

View File

@ -68,7 +68,8 @@ fn verified_launch_uses_open_command_and_script_after_atomic_path_replacement()
)
.unwrap(),
)],
);
)
.with_inherited_runtime_executable();
let replacement_command = directory.join("replacement-command");
let replacement_script = directory.join("replacement-script");