File tree 1 file changed +9
-1
lines changed
src/PowerShellEditorServices/Language
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 6
6
using Microsoft . PowerShell . EditorServices . Symbols ;
7
7
using Microsoft . PowerShell . EditorServices . Utility ;
8
8
using System ;
9
- using System . Collections ;
10
9
using System . Collections . Generic ;
11
10
using System . Collections . Specialized ;
12
11
using System . Linq ;
@@ -699,6 +698,15 @@ await this.powerShellContext.GetRunspaceHandle(
699
698
700
699
this . areAliasesLoaded = true ;
701
700
}
701
+ catch ( PSNotSupportedException e )
702
+ {
703
+ this . logger . Write (
704
+ LogLevel . Warning ,
705
+ $ "Caught PSNotSupportedException while attempting to get aliases from remote session:\n \n { e . ToString ( ) } ") ;
706
+
707
+ // Prevent the aliases from being fetched again - no point if the remote doesn't support InvokeCommand.
708
+ this . areAliasesLoaded = true ;
709
+ }
702
710
catch ( TaskCanceledException )
703
711
{
704
712
// The wait for a RunspaceHandle has timed out, skip aliases for now
You can’t perform that action at this time.
0 commit comments