fix(skills): align planner and cli tests on curl download commands

This commit is contained in:
William Valentin
2026-02-17 10:33:58 -08:00
parent 1d9c25a4c6
commit ac29789d89
4 changed files with 50 additions and 39 deletions
+4 -4
View File
@@ -60,15 +60,15 @@ describe('buildInstallerPlan', () => {
expect(plan.skipped).toEqual([]);
});
it('skips download installer when destination is missing', () => {
it('plans download installer without destination as stdout curl', () => {
const plan = buildInstallerPlan(
[{ type: 'download', url: 'https://example.com/tool.tgz' }],
{ hasBinary: () => true },
);
expect(plan.steps).toEqual([]);
expect(plan.skipped).toEqual([
{ installerType: 'download', reason: 'download destination is required for executable install plans' },
expect(plan.steps).toEqual([
{ installerType: 'download', command: 'curl -fsSL https://example.com/tool.tgz' },
]);
expect(plan.skipped).toEqual([]);
});
});
+3 -5
View File
@@ -73,13 +73,11 @@ export function buildInstallerPlan(
continue;
}
if (!installer.destination) {
skipped.push({ installerType: 'download', reason: 'download destination is required for executable install plans' });
continue;
}
steps.push({
installerType: 'download',
command: `curl -fsSL -o ${installer.destination} ${installer.url}`,
command: installer.destination
? `curl -fsSL -o ${installer.destination} ${installer.url}`
: `curl -fsSL ${installer.url}`,
});
}