Skip to content

Commit 097fe87

Browse files
author
José Valim
committed
Disable ansi detection for powershell to avoid false positives
Closes #5615
1 parent 6ec1e7f commit 097fe87

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

bin/elixir.bat

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -100,27 +100,6 @@ for /d %%d in ("%originPath%..\lib\*.") do (
100100
)
101101
setlocal disabledelayedexpansion
102102

103-
rem ******* detect ANSI terminal support ********************
104-
timeout 0 2>nul >nul || goto run
105-
where /Q powershell || goto run
106-
107-
set ASSERT_ANSI= ^
108-
$err = 1; ^
109-
$Kernel32 = Add-Type -Name 'Kernel32' -PassThru -MemberDefinition ' ^
110-
[DllImport(\"Kernel32.dll\", SetLastError = true)] ^
111-
public static extern IntPtr GetStdHandle(int nStdHandle); ^
112-
[DllImport(\"Kernel32.dll\", SetLastError = true)] ^
113-
public static extern bool GetConsoleMode(IntPtr hWnd, ref UInt32 lpMode); ^
114-
'; ^
115-
$StdoutHandle = $Kernel32::GetStdHandle(-11); ^
116-
$ConsoleMode = New-Object -TypeName UInt32; ^
117-
$null = $Kernel32::GetConsoleMode($StdoutHandle, [ref]$ConsoleMode); ^
118-
if ($ConsoleMode -band 0x4) { $err = 0 } ^
119-
exit $err
120-
121-
powershell -NoProfile -NonInteractive -Command %ASSERT_ANSI% || goto run
122-
set parsErlang=%parsErlang% -elixir ansi_enabled true
123-
124103
:run
125104
if not %runMode% == "iex" (
126105
set beforeExtra=-noshell -s elixir start_cli %beforeExtra%

0 commit comments

Comments
 (0)