fix(agents): support loadSkillsFromDir result

This commit is contained in:
Peter Steinberger
2025-12-20 13:31:24 +00:00
parent 055d839fc3
commit 137980b46e
2 changed files with 29 additions and 10 deletions

View File

@@ -147,12 +147,17 @@ export async function installSkill(
};
}
const result = command.shell
? await runShell(command.shell, timeoutMs)
: await runCommandWithTimeout(command.argv, {
timeoutMs,
cwd: command.cwd,
});
const result = await (async () => {
if (command.shell) return runShell(command.shell, timeoutMs);
const argv = command.argv;
if (!argv || argv.length === 0) {
return { code: null, stdout: "", stderr: "invalid install command" };
}
return runCommandWithTimeout(argv, {
timeoutMs,
cwd: command.cwd,
});
})();
const success = result.code === 0;
return {