File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
test/PowerShellEditorServices.Test/Language Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 1515using System . Linq ;
1616using System . Threading . Tasks ;
1717using Xunit ;
18- using Microsoft . PowerShell . EditorServices . Test . Shared ;
1918using Microsoft . PowerShell . EditorServices . Services ;
2019using Microsoft . Extensions . Logging . Abstractions ;
2120using Microsoft . PowerShell . EditorServices . Services . TextDocument ;
2221using Microsoft . PowerShell . EditorServices . Services . Symbols ;
2322using System . Collections . Generic ;
2423using Microsoft . PowerShell . EditorServices . Handlers ;
24+ using System . Runtime . InteropServices ;
2525
2626namespace Microsoft . PowerShell . EditorServices . Test . Language
2727{
@@ -33,7 +33,11 @@ public class LanguageServiceTests : IDisposable
3333 private readonly PowerShellContextService powerShellContext ;
3434 private static readonly string s_baseSharedScriptPath =
3535 Path . Combine (
36- Path . GetDirectoryName ( typeof ( LanguageServiceTests ) . Assembly . CodeBase ) ,
36+ Path . GetDirectoryName ( RuntimeInformation . IsOSPlatform ( OSPlatform . Windows )
37+ // On non-Windows platforms, CodeBase has file:// in it.
38+ // On Windows, Location points to a temp directory.
39+ ? typeof ( LanguageServiceTests ) . Assembly . CodeBase
40+ : typeof ( LanguageServiceTests ) . Assembly . Location ) ,
3741 ".." , ".." , ".." , ".." ,
3842 "PowerShellEditorServices.Test.Shared" ) ;
3943
You can’t perform that action at this time.
0 commit comments