Skip to content

Commit 2fd45d2

Browse files
committed
Review comments
1 parent 4b6af7f commit 2fd45d2

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

src/commands.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ import {
3737
} from "./workspace/workspacesProvider";
3838

3939
export class Commands {
40-
private readonly logger: Logger;
40+
private readonly logger: Logger & vscode.LogOutputChannel;
4141
private readonly pathResolver: PathResolver;
4242
private readonly mementoManager: MementoManager;
4343
private readonly secretsManager: SecretsManager;
@@ -337,12 +337,20 @@ export class Commands {
337337
key,
338338
value: setting.value,
339339
}));
340-
await applySettingOverrides(
340+
const ok = await applySettingOverrides(
341341
this.pathResolver.getUserSettingsPath(),
342342
overrides,
343343
this.logger,
344344
);
345-
if (this.remoteWorkspaceClient) {
345+
if (!ok) {
346+
const action = await vscode.window.showErrorMessage(
347+
"Failed to write SSH settings. Check the Coder output for details.",
348+
"Show Output",
349+
);
350+
if (action === "Show Output") {
351+
this.logger.show();
352+
}
353+
} else if (this.remoteWorkspaceClient) {
346354
const action = await vscode.window.showInformationMessage(
347355
"Applied recommended SSH settings. Reload the window for changes to take effect.",
348356
"Reload Window",

src/core/container.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export class ServiceContainer implements vscode.Disposable {
8484
return this.secretsManager;
8585
}
8686

87-
getLogger(): Logger {
87+
getLogger(): Logger & vscode.LogOutputChannel {
8888
return this.logger;
8989
}
9090

0 commit comments

Comments
 (0)