Skip to content

Check git mode on Windows#480

Merged
asottile merged 1 commit intopre-commit:masterfrom
mxr:git-file-mode
May 18, 2020
Merged

Check git mode on Windows#480
asottile merged 1 commit intopre-commit:masterfrom
mxr:git-file-mode

Conversation

@mxr
Copy link
Copy Markdown
Member

@mxr mxr commented May 17, 2020

Resolves #435

@mxr mxr marked this pull request as ready for review May 17, 2020 02:25
@mxr mxr marked this pull request as draft May 18, 2020 01:31
@mxr mxr marked this pull request as ready for review May 18, 2020 02:16
@mxr
Copy link
Copy Markdown
Member Author

mxr commented May 18, 2020

@asottile I can't request a review in the GitHub UI but this should be ready for review now

Copy link
Copy Markdown
Member

@asottile asottile left a comment

Choose a reason for hiding this comment

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

sweet, I improved this on stream! added a few tests and made sure things worked well on windows

@asottile asottile merged commit ad928f6 into pre-commit:master May 18, 2020
@mxr
Copy link
Copy Markdown
Member Author

mxr commented May 18, 2020

Awesome!


f = tmpdir.join('f')
f.write('#!/usr/bin/env bash')
f_path = str(f)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The other tests use .strpath, is one preferred over the other?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

apparently strpath is not documented despite being a public attribute so I've mostly switched to str(...) now that I don't care about python2

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

TIL

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

check-executables-have-shebangs not correct on windows

2 participants