mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-15 06:04:43 +00:00
fix: mock agent process launcher not written during install
agent_process_status() for mock always returned Some(...) even when the launcher file did not exist. This caused install_agent_process() to short-circuit with "already installed" and never write the launcher script. Fix by checking that the launcher file exists before reporting the mock agent as installed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
56c80e6c9e
commit
f0ec8e497b
1 changed files with 10 additions and 7 deletions
|
|
@ -678,14 +678,17 @@ impl AgentManager {
|
|||
}
|
||||
|
||||
fn agent_process_status(&self, agent: AgentId) -> Option<AgentProcessStatus> {
|
||||
if agent == AgentId::Mock {
|
||||
return Some(AgentProcessStatus {
|
||||
source: InstallSource::Builtin,
|
||||
version: Some("builtin".to_string()),
|
||||
});
|
||||
}
|
||||
|
||||
let launcher = self.agent_process_path(agent);
|
||||
|
||||
if agent == AgentId::Mock {
|
||||
if launcher.exists() {
|
||||
return Some(AgentProcessStatus {
|
||||
source: InstallSource::Builtin,
|
||||
version: Some("builtin".to_string()),
|
||||
});
|
||||
}
|
||||
return None;
|
||||
}
|
||||
if launcher.exists() {
|
||||
return Some(AgentProcessStatus {
|
||||
source: InstallSource::LocalPath,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue