mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 04:36:39 +00:00
Merge pull request #1245 from PowerShell/vors/types
Make DefineTypes aware of / as a path delimiter on non-windows systems
This commit is contained in:
commit
75ee763d32
1 file changed
+4
-1
@@ -1124,7 +1124,10 @@ namespace System.Management.Automation.Language
|
||||
// Two replaces at the end are for not-allowed characters. They are replaced by similar-looking chars.
|
||||
string assemblyName = ClrFacade.FIRST_CHAR_PSASSEMBLY_MARK + (string.IsNullOrWhiteSpace(rootAst.Extent.File)
|
||||
? "powershell"
|
||||
: rootAst.Extent.File.Replace('\\', (char)0x29f9).Replace(':', (char)0x0589));
|
||||
: rootAst.Extent.File
|
||||
.Replace('\\', (char)0x29f9)
|
||||
.Replace('/', (char)0x29f9)
|
||||
.Replace(':', (char)0x0589));
|
||||
|
||||
var assembly = AssemblyBuilder.DefineDynamicAssembly(new AssemblyName(assemblyName),
|
||||
AssemblyBuilderAccess.RunAndCollect, GetAssemblyAttributeBuilders());
|
||||
|
||||
Reference in new issue
Block a user