File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -82,9 +82,9 @@ export class ExternalApiFeature implements IFeature {
82
82
RETURNS:
83
83
true if it worked, otherwise throws an error.
84
84
*/
85
- vscode . commands . registerCommand ( "PowerShell.UnregisterExternalExtension" , ( uuid : string ) : boolean => {
85
+ vscode . commands . registerCommand ( "PowerShell.UnregisterExternalExtension" , ( uuid : string = "" ) : boolean => {
86
86
log . writeDiagnostic ( `Unregistering extension with session UUID: ${ uuid } ` ) ;
87
- if ( ! uuid && ! ExternalApiFeature . registeredExternalExtension . delete ( uuid ) ) {
87
+ if ( ! ExternalApiFeature . registeredExternalExtension . delete ( uuid ) ) {
88
88
throw new Error ( `No extension registered with session UUID: ${ uuid } ` ) ;
89
89
}
90
90
return true ;
@@ -109,8 +109,8 @@ export class ExternalApiFeature implements IFeature {
109
109
architecture: string;
110
110
}
111
111
*/
112
- vscode . commands . registerCommand ( "PowerShell.GetPowerShellVersionDetails" , async ( uuid : string ) : Promise < IExternalPowerShellDetails > => {
113
- if ( ! uuid && ! ExternalApiFeature . registeredExternalExtension . has ( uuid ) ) {
112
+ vscode . commands . registerCommand ( "PowerShell.GetPowerShellVersionDetails" , async ( uuid : string = "" ) : Promise < IExternalPowerShellDetails > => {
113
+ if ( ! ExternalApiFeature . registeredExternalExtension . has ( uuid ) ) {
114
114
throw new Error (
115
115
"UUID provided was invalid, make sure you execute the 'PowerShell.GetPowerShellVersionDetails' command and pass in the UUID that it returns to subsequent command executions." ) ;
116
116
}
You can’t perform that action at this time.
0 commit comments