Skip to content
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

Check if git is a batch file on Windows #9652

Merged
merged 1 commit into from Feb 27, 2018

Conversation

Projects
None yet
6 participants
@csnardi
Copy link
Member

csnardi commented Feb 23, 2018

In the steps for manifest generation, if git is contained in a batch file, subprocess will not be able to find git and will throw a WindowsError. This change makes it so that if a WindowsError is thrown, it will check if using git.bat works.

Chromium has run into this issue on Windows (see https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/7Q0cv67h5p8). I'm not sure if this is the best solution, open to thoughts on that.


This change is Reviewable

Check if git is a batch file on Windows
In the steps for manifest generation, if git is contained in a batch file, subprocess will not be able to find git and will throw a WindowsError. This change makes it so that if a WindowsError is thrown, it will check if using git.bat works.

@wpt-pr-bot wpt-pr-bot added the infra label Feb 23, 2018

@wpt-pr-bot wpt-pr-bot requested review from gsnedders and jgraham Feb 23, 2018

@w3c-bots

This comment has been minimized.

Copy link

w3c-bots commented Feb 23, 2018

Build PASSED

Started: 2018-02-23 19:43:05
Finished: 2018-02-23 19:58:29

View more information about this build on:

@Ms2ger

Ms2ger approved these changes Feb 27, 2018

@jgraham

This comment has been minimized.

Copy link
Contributor

jgraham commented Feb 27, 2018

I'm not super-happy with these changes because I feel like it's over-specific to what Chromium currently happens to do. But if it unblocks you and Ms2ger approves, I guess it's OK for now.

@jgraham jgraham merged commit 0503e45 into web-platform-tests:master Feb 27, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@csnardi

This comment has been minimized.

Copy link
Member Author

csnardi commented Feb 27, 2018

@jgraham The other options here are switching to using shell=True (but I didn't see any other use of shell=True in the code), or basically trying every extension in %PATHEXT% to see if one works. I agree that it does seem overly specific, but I wasn't sure which of these options would be preferable.

@gsnedders

This comment has been minimized.

Copy link
Contributor

gsnedders commented Feb 27, 2018

I'd have a slight preference for checking everything in %PATHEXT% (well, really, I'd have a preference for using stdlib shutil.which, but that's Py3.3+), FWIW.

@csnardi csnardi deleted the csnardi:manifest-git branch Apr 1, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.