Skip to content

Commit 58ef514

Browse files
njb90claude
andcommitted
fix: catch install errors for Cursor/Copilot and show feedback when no files written
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 9c3ad95 commit 58ef514

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

src/commands/configureAiTools.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,9 +376,17 @@ function registerConfigureAiTools(context: vscode.ExtensionContext): void {
376376
if (ideTarget.label === "Claude Code") {
377377
await installForClaudeCode(rootUri, skill.dirName, content, createdFiles, errors);
378378
} else if (ideTarget.label === "Cursor") {
379-
await installForCursor(rootUri, skill.dirName, content, createdFiles);
379+
try {
380+
await installForCursor(rootUri, skill.dirName, content, createdFiles);
381+
} catch (err) {
382+
errors.push(`${skill.dirName}: ${err instanceof Error ? err.message : String(err)}`);
383+
}
380384
} else {
381-
await installForCopilot(rootUri, skill.dirName, content, createdFiles);
385+
try {
386+
await installForCopilot(rootUri, skill.name, content, createdFiles);
387+
} catch (err) {
388+
errors.push(`${skill.name}: ${err instanceof Error ? err.message : String(err)}`);
389+
}
382390
}
383391
}
384392
}
@@ -407,6 +415,8 @@ function registerConfigureAiTools(context: vscode.ExtensionContext): void {
407415
);
408416
vscode.window.showTextDocument(doc);
409417
}
418+
} else if (errors.length === 0) {
419+
vscode.window.showInformationMessage("No files were written — all targets already exist.");
410420
}
411421
})
412422
);

0 commit comments

Comments
 (0)