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

git_resource: additional portability fixes #216

Merged
merged 1 commit into from
Aug 2, 2021

Conversation

milas
Copy link
Contributor

@milas milas commented Aug 2, 2021

When the repo has already been cloned, the extension checks for
local modifications using output from git status and seeing if
there are any lines using wc -l. This isn't portable to Windows,
and trying to use hacks with find /c /v "" produce weird errors,
so just do the line counting in Starlark.

Additionally, use os.path.join consistently instead of manually
concatenating strings with / to make Windows tools happy.

Fixes #211.

When the repo has already been cloned, the extension checks for
local modifications using output from `git status` and seeing if
there are any lines using `wc -l`. This isn't portable to Windows,
and trying to use hacks with `find /c /v ""` produce weird errors,
so just do the line counting in Starlark.

Additionally, use `os.path.join` consistently instead of manually
concatenating strings with `/` to make Windows tools happy.
@milas milas requested review from nicks and landism August 2, 2021 17:29
@milas milas mentioned this pull request Aug 2, 2021
2 tasks
@milas milas merged commit cc53707 into master Aug 2, 2021
@milas milas deleted the milas/git-resource-windows-2 branch August 2, 2021 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

git_resource does not work on Windows
2 participants