The Wayback Machine - https://web.archive.org/web/20251014204414/https://github.com/moby/moby/pull/44332
Skip to content

Conversation

corhere
Copy link
Contributor

@corhere corhere commented Oct 20, 2022

Setting cmd.Env overrides the default of passing through the parent process' environment, which works out fine most of the time, except when it doesn't. For whatever reason, leaving out all the environment causes git-for-windows sh.exe subprocesses to enter an infinite loop of access violations during Cygwin initialization in certain environments (specifically, our very own dev container image).

Signed-off-by: Cory Snider csnider@mirantis.com

- What I did

- How I did it

- How to verify it

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

@corhere corhere requested a review from tonistiigi as a code owner October 20, 2022 00:24
@corhere corhere changed the title builder: fix running git commands on Windows [20.10] builder: fix running git commands on Windows Oct 20, 2022
Setting cmd.Env overrides the default of passing through the parent
process' environment, which works out fine most of the time, except when
it doesn't. For whatever reason, leaving out all the environment causes
git-for-windows sh.exe subprocesses to enter an infinite loop of
access violations during Cygwin initialization in certain environments
(specifically, our very own dev container image).

Signed-off-by: Cory Snider <csnider@mirantis.com>
@corhere corhere force-pushed the backport-20.10/fix-git-windows-environ branch from 6ae1657 to 05e25f7 Compare October 20, 2022 17:42
Signed-off-by: Cory Snider <csnider@mirantis.com>
@thaJeztah
Copy link
Member

Failures are unrelated, and will be addressed separately.

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants