From 0a483920c2208be1b19a2dbfe624b1714a8dfa4c Mon Sep 17 00:00:00 2001 From: Keith Hill Date: Fri, 2 Nov 2018 21:58:09 -0600 Subject: [PATCH] We can't entirely skip PS Core on Windows, may run in diff host Keep this PR simple in scope - just the deferred Add-Type. After a chat w/lzybkr we may want to convert some of this to a binary to help import/prompt processing time. --- src/ConsoleMode.ps1 | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/ConsoleMode.ps1 b/src/ConsoleMode.ps1 index 66c9b84a3..7e586c015 100644 --- a/src/ConsoleMode.ps1 +++ b/src/ConsoleMode.ps1 @@ -1,9 +1,6 @@ # Hack! https://gist.github.com/lzybkr/f2059cb2ee8d0c13c65ab933b75e998c -# We do not need to set the console mode in PowerShell Core on any platform. -# On Windows, PowerShell Core added this support in this PR: -# https://github.com/PowerShell/PowerShell/pull/2991 -if ($PSVersionTable.PSVersion.Major -ge 6) { +if ($IsWindows -eq $false) { function Set-ConsoleMode { [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseShouldProcessForStateChangingFunctions", "")] param()