Skip to content

Commit 174fc77

Browse files
committed
Remove check for PS6 in startup sequence
1 parent 7b429a3 commit 174fc77

File tree

1 file changed

+1
-20
lines changed

1 file changed

+1
-20
lines changed

src/PowerShellEditorServices.Hosting/Commands/StartEditorServicesCommand.cs

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,6 @@
1212
using System.Management.Automation.Runspaces;
1313
using Microsoft.PowerShell.EditorServices.Hosting;
1414
using System.Globalization;
15-
using System.Collections;
16-
17-
// TODO: Remove this when we drop support for PS6.
18-
#if CoreCLR
19-
using System.Runtime.InteropServices;
20-
#endif
2115

2216
#if DEBUG
2317
using System.Diagnostics;
@@ -35,14 +29,6 @@ namespace Microsoft.PowerShell.EditorServices.Commands
3529
[Cmdlet(VerbsLifecycle.Start, "EditorServices", DefaultParameterSetName = "NamedPipe")]
3630
public sealed class StartEditorServicesCommand : PSCmdlet
3731
{
38-
// TODO: Remove this when we drop support for PS6.
39-
private static readonly bool s_isWindows =
40-
#if CoreCLR
41-
RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
42-
#else
43-
true;
44-
#endif
45-
4632
private readonly List<IDisposable> _disposableResources;
4733

4834
private readonly List<IDisposable> _loggerUnsubscribers;
@@ -420,12 +406,7 @@ private ConsoleReplKind GetReplKind()
420406
return ConsoleReplKind.None;
421407
}
422408

423-
// TODO: Remove this when we drop support for PS6.
424-
Hashtable psVersionTable = (Hashtable)SessionState.PSVariable.GetValue("PSVersionTable");
425-
dynamic version = psVersionTable["PSVersion"];
426-
int majorVersion = (int)version.Major;
427-
428-
if (UseLegacyReadLine || (!s_isWindows && majorVersion == 6))
409+
if (UseLegacyReadLine)
429410
{
430411
_logger.Log(PsesLogLevel.Diagnostic, "REPL configured as Legacy");
431412
return ConsoleReplKind.LegacyReadLine;

0 commit comments

Comments
 (0)