File tree Expand file tree Collapse file tree 1 file changed +17
-9
lines changed
Expand file tree Collapse file tree 1 file changed +17
-9
lines changed Original file line number Diff line number Diff line change @@ -127,15 +127,23 @@ export class PickPSHostProcessFeature implements IFeature {
127127 } ) ;
128128 } ;
129129
130- let options : vscode . QuickPickOptions = {
131- placeHolder : "Select a PowerShell Host process to attach to" ,
132- matchOnDescription : true ,
133- matchOnDetail : true
134- } ;
135-
136- return vscode . window . showQuickPick ( items , options ) . then ( item => {
137- return item ? item . pid : null ;
138- } ) ;
130+ if ( items . length === 0 ) {
131+ return vscode . window . showInformationMessage (
132+ "There are no other PowerShell host processes to attach to." ) . then ( _ => {
133+ return null ;
134+ } ) ;
135+ }
136+ else {
137+ let options : vscode . QuickPickOptions = {
138+ placeHolder : "Select a PowerShell Host process to attach to" ,
139+ matchOnDescription : true ,
140+ matchOnDetail : true
141+ } ;
142+
143+ return vscode . window . showQuickPick ( items , options ) . then ( item => {
144+ return item ? item . pid : null ;
145+ } ) ;
146+ }
139147 } ) ;
140148 }
141149
You can’t perform that action at this time.
0 commit comments