File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
src/PowerShellEditorServices/Language Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 66using Microsoft . PowerShell . EditorServices . Symbols ;
77using Microsoft . PowerShell . EditorServices . Utility ;
88using System ;
9- using System . Collections ;
109using System . Collections . Generic ;
1110using System . Collections . Specialized ;
1211using System . Linq ;
@@ -699,6 +698,15 @@ await this.powerShellContext.GetRunspaceHandle(
699698
700699 this . areAliasesLoaded = true ;
701700 }
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+ }
702710 catch ( TaskCanceledException )
703711 {
704712 // The wait for a RunspaceHandle has timed out, skip aliases for now
You can’t perform that action at this time.
0 commit comments