Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion extension/src/views/AspireAppHostTreeProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,11 @@ export class AspireAppHostTreeProvider implements vscode.TreeDataProvider<TreeEl
}

viewResourceLogs(element: ResourceItem): void {
this._runResourceCommand(element, 'logs', '--follow');
const appHost = this._findAppHostForResource(element);
if (!appHost) {
return;
}
this._terminalProvider.sendAspireCommandToAspireTerminal(`logs "${element.resource.name}" --apphost "${appHost.appHostPath}" --follow`);
Comment on lines +292 to +296
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sendAspireCommandToAspireTerminal supports an additionalArgs array with platform-specific quoting/escaping, but this code builds a single interpolated command string with manual double-quoting. If resource names/paths ever contain characters like quotes, $, or backticks, this may not behave consistently across shells. Consider switching to sendAspireCommandToAspireTerminal('logs', ..., additionalArgs) (passing the resource name, --apphost, path, and --follow as separate args) and optionally making this method async/awaiting the call for clearer error propagation.

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change updates the exact CLI command shape used for the "View Logs" action, but there’s no unit test asserting the constructed command. Consider adding a small test that mocks AspireTerminalProvider and verifies the logs <resource> --apphost <path> --follow invocation to prevent regressions when CLI command shapes change again.

Copilot uses AI. Check for mistakes.
}

async executeResourceCommand(element: ResourceItem): Promise<void> {
Expand Down
Loading