-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Error piping on Conemu #28814
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
+1 |
As a workaround, disabling |
+1
|
cc @jhowardmsft |
As far as I can tell, the ConEmu author thinks this is a problem with Docker because Docker doesn't behave exactly the same as it does with Powershell/cmd. Would it be reasonable to fix this by removing the Lines 74 to 79 in 28cca5d
I would be happy to make and test that change if that is an acceptable fix for this issue. |
Looks like it's possible to test that theory; the code checks for the |
Yes, it works correctly. It is actually the workaround that's specified in Maximus5/ConEmu#958 (comment) |
That comment says; disable the feature in ConEmu; in that case, the code on Docker's side will do emulation. I'm interested if keeping the feature enabled, but overriding the env-var (to make Docker think the feature isn't enabled) does the job If that works, there may still be something to check for; does it work because Docker is handling emulating, or did it then correctly detect that emulation is not needed. |
With the feature enabled, is it impossible to override the env var unfortunately:
I have also tried setting a system variable ConEmuANSI="OFF", but ConEmu will override it. It looks like ConEmu is doing some work to ensure that the env var refects whether the feature is enabled or not. I'll try removing the ConEmuANSI check from the |
Sounds good; looks like some of the code can be simplified in that case (some of the detections won't be needed), but that can be looked at after that |
A bit of an update on this: I have removed the > echo 'FROM hello-world' | .\build\docker-windows-amd64.exe build -t temp -
Sending build context to Docker daemon 2.048kB
Step 1/1 : FROM hello-world
---> 2cb0d9787c4d
Successfully built 2cb0d9787c4d
Successfully tagged temp:latest
SECURITY WARNING: You are building a Docker image from Windows against a non-Windows Docker host. All files and directories added to build context will have '-rwxr-xr-x' permissions. It is recommended to double check and reset permissions for sensitive files and directories.
~\git\cli [master ≡ +0 ~1 -0 !]
> echo 'FROM hello-world' | docker build -t temp -
unable to prepare context: failed to peek context header from STDIN: Función incorrecta. I have also verified that removing this block does not produce a regression on #25475 For the record, I am using Windows 10 1803 (17134.112) and ConEmu 180626. I have also verified the fix with ConsoleZ 1.18.3.18143 I have looked at some old PRs and I have seen that there have been attempts to enable native VT code processing in recent versions of Windows, but I am not sure if that effort was abandoned. There is a risk that by removing this we are falling back to a different behavior in Windows 10 than in previous Windows versions. Someone with more knowledge of the codebase should check this. I have opened #37600 |
It's also worth mentioning microsoft/terminal#231 (comment): the root cause of this bug might be a problem in |
Fix #28814: use emulation for ConEmu and ConsoleZ
When you pipe to
docker build
on Windows it fails under Conemu.It is probably related to these lines which explicitly target Conemu.
Versions
ConEmu build: x64
ConEmu version: 16.10.22.0
OS version: Windows 10 x64 (Version 1607 OS Build 14393.447)
Used shell version (Far Manager, git-bash, cmd, powershell, cygwin, whatever): ???
Problem description
When using Docker for Windows, while using Linux containers, if you run on Conemu:
And PowerShell:
or
Or on cmd:
You get this error:
The command works on cmd and PowerShell without Conemu.
The text was updated successfully, but these errors were encountered: