File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ import {
3737} from "./workspace/workspacesProvider" ;
3838
3939export 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" ,
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments