Skip to content

Commit 9aede05

Browse files
authored
Remove the 32,767 character limit on the environment block for Start-Process (#14111)
1 parent c5955a5 commit 9aede05

File tree

1 file changed

+0
-4
lines changed
  • src/Microsoft.PowerShell.Commands.Management/commands/management

1 file changed

+0
-4
lines changed

src/Microsoft.PowerShell.Commands.Management/commands/management/Process.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2370,10 +2370,6 @@ private static byte[] ConvertEnvVarsToByteArray(StringDictionary sd)
23702370

23712371
// Use Unicode encoding
23722372
bytes = Encoding.Unicode.GetBytes(builder.ToString());
2373-
if (bytes.Length > 0xffff)
2374-
{
2375-
throw new InvalidOperationException("EnvironmentBlockTooLong");
2376-
}
23772373

23782374
return bytes;
23792375
}

0 commit comments

Comments
 (0)