File tree Expand file tree Collapse file tree 4 files changed +8
-18
lines changed Expand file tree Collapse file tree 4 files changed +8
-18
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,6 @@ function handleLanguageServerOptionChanges(changedOptions: OptionChanges): void
40
40
} ;
41
41
if ( changedOptions . changedCommonOptions . find ( ( key ) => key === 'useOmnisharpServer' ) ) {
42
42
// If the user has changed the useOmnisharpServer flag we need to reload the window.
43
- // Intentionally not awaiting this promise - we don't want to block handling changes on showing the notification prompt.
44
43
showInformationMessage (
45
44
vscode ,
46
45
vscode . l10n . t (
@@ -56,6 +55,5 @@ function handleLanguageServerOptionChanges(changedOptions: OptionChanges): void
56
55
const message = vscode . l10n . t (
57
56
'C# configuration has changed. Would you like to reload the window to apply your changes?'
58
57
) ;
59
- // Intentionally not awaiting this promise - we don't want to block handling changes on showing the notification prompt.
60
58
showInformationMessage ( vscode , message , reloadTitle ) ;
61
59
}
Original file line number Diff line number Diff line change @@ -80,7 +80,6 @@ export async function restore(
80
80
showOutput : boolean
81
81
) : Promise < void > {
82
82
if ( _restoreInProgress ) {
83
- // Show error message but don't await the dismissal of it.
84
83
showErrorMessage ( vscode , vscode . l10n . t ( 'Restore already in progress' ) ) ;
85
84
return ;
86
85
}
Original file line number Diff line number Diff line change @@ -245,7 +245,7 @@ export class BaseVsDbgConfigurationProvider implements vscode.DebugConfiguration
245
245
action : async ( ) => {
246
246
const returnData = await createSelfSignedCert ( dotnetPath ) ;
247
247
if ( returnData . error === null ) {
248
- //if the prcess returns 0, returnData.error is null, otherwise the return code can be acessed in returnData.error.code
248
+ // if the process returns 0, returnData.error is null, otherwise the return code can be accessed in returnData.error.code
249
249
const message =
250
250
errorCode === CertToolStatusCodes . CertificateNotTrusted ? 'trusted' : 'created' ;
251
251
showInformationMessage (
Original file line number Diff line number Diff line change @@ -81,22 +81,15 @@ function showMessage(
81
81
delegateFunc ( message , messageOptions , ...items ) . then (
82
82
async ( selectedItem ) => {
83
83
if ( selectedItem ) {
84
- const item = items . find ( ( i ) => i ) ;
85
- if ( item === undefined ) {
86
- // This should never happen - we got an item back that we didn't provide
87
- throw new Error (
88
- `Could not find item with message: ${ selectedItem } ; items:${ JSON . stringify ( items ) } `
89
- ) ;
90
- }
91
- if ( typeof item === 'string' ) {
84
+ if ( typeof selectedItem === 'string' ) {
92
85
return ;
93
- } else if ( 'action' in item && item . action ) {
94
- await item . action ( ) ;
95
- } else if ( 'command' in item && item . command ) {
96
- if ( item . arguments ) {
97
- await vscode . commands . executeCommand ( item . command , ...item . arguments ) ;
86
+ } else if ( 'action' in selectedItem && selectedItem . action ) {
87
+ await selectedItem . action ( ) ;
88
+ } else if ( 'command' in selectedItem && selectedItem . command ) {
89
+ if ( selectedItem . arguments ) {
90
+ await vscode . commands . executeCommand ( selectedItem . command , ...selectedItem . arguments ) ;
98
91
} else {
99
- await vscode . commands . executeCommand ( item . command ) ;
92
+ await vscode . commands . executeCommand ( selectedItem . command ) ;
100
93
}
101
94
}
102
95
}
You can’t perform that action at this time.
0 commit comments