Skip to content

Commit d053656

Browse files
owenrumneyCopilot
andauthored
Update src/mcp/install.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent aaa6fb5 commit d053656

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/mcp/install.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,12 @@ export async function installTrivyMCPServer(): Promise<void> {
136136
}
137137

138138
const document = editor.document;
139+
if (!document.fileName.endsWith('mcp.json')) {
140+
Output.getInstance().appendLineWithTimestamp(
141+
'Unexpected file opened. Expected MCP configuration file.'
142+
);
143+
return;
144+
}
139145
const text = document.getText();
140146

141147
let config: McpJsonConfig = {};

0 commit comments

Comments
 (0)