mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-16 11:19:33 +01:00
fix(install): say why an added agent failed on a Mac with no other agent
After "Skip for now" there is no other agent, so a failed add hit
install_offered_cli's gate first, and the app showed its first-install text
("re-run the installer") instead of naming the agent and its command. That
is the main path of adding an agent.
run_offered_cli now runs a trusted command and looks again; the gate stays in
install_offered_cli for the install, and `agent` judges its own run. The one
line that executes a trusted command is unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
dd07126dd8
commit
1157aa9ecd
5 files changed
+32
-10
No files matched your search
@@ -600,6 +600,15 @@ describe('install.sh agent, one AI CLI and nothing else', () => {
|
||||
expect(run.stdout).not.toContain('REACHED THE END');
|
||||
});
|
||||
|
||||
it('says the same with no other agent here, the way a Mac is after Skip for now', () => {
|
||||
const run = agent(['--no-admin', '--progress', '--ai-cli', 'codex']);
|
||||
expect(run.ran).toEqual(['codex']);
|
||||
expect(run.status).toBe(1);
|
||||
expect(run.stderr).toContain('@@codeman error Codex did not install.');
|
||||
expect(run.stderr).not.toContain('re-run the installer');
|
||||
expect(run.stderr).not.toContain('@@codeman phase done');
|
||||
});
|
||||
|
||||
it('installs nothing for an agent that is here already, and that is a success', () => {
|
||||
const run = agent(['--no-admin', '--progress', '--ai-cli', 'codex'], { FOUND: 'codex' });
|
||||
expect(run.status, run.stderr).toBe(0);
|
||||
@@ -653,7 +662,7 @@ describe('install.sh agent, one AI CLI and nothing else', () => {
|
||||
for (const word of ['launchctl', 'systemctl', 'setup_launchd', 'install_or_update_repo', 'npm run', 'sudo']) {
|
||||
expect(body, word).not.toContain(word);
|
||||
}
|
||||
expect(body).toContain('install_offered_cli "$idx"');
|
||||
expect(body).toContain('run_offered_cli "$idx"');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user