Skip to content

Conversation

@mandarvaze
Copy link
Contributor

Fixes #1007

@mandarvaze
Copy link
Contributor Author

@asottile Build is failing on Windows, getting error : InvocationError for command 'D:\a\1\s\.tox\py37\Scripts\coverage.EXE

Can you help ?

Copy link
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.

feel free to ignore the windows failures, azure pipelines added their own rust in a different place so it isn't picking it up -- I'll put in a fix for that

@asottile
Copy link
Member

alright I've fixed the rust issues on master -- you'll want to rebase on top of that and fix the above comment and then this should be good to go! 👍

'--color={}'.format(args.color),
))
else:
subprocess.call(('git', '--no-pager', 'diff', '--no-ext-diff'))
Copy link
Member

Choose a reason for hiding this comment

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

I think basically what we're going to have to end up with is:

cmd = ('git', '--no-pager', 'diff', '--no-ext-diff')
if args.color:
    cmd += ('--color=always',)
subprocess.call(cmd)

Since at this point args.color will always be a boolean

(
{
'show_diff_on_failure': True,
'color': 'auto',
Copy link
Member

Choose a reason for hiding this comment

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

so as above, this isn't a valid option here unfortunately

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But the tests pass :)

Copy link
Member

Choose a reason for hiding this comment

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

yeahhhh the tests pass because we ignore the return code of git diff -- it actually ends up printing something like this:

$ git diff --color=True
error: option `color' expects "always", "auto", or "never"

@asottile
Copy link
Member

asottile commented Jun 1, 2019

ah shoot sorry, I wasn't fast enough -- you were right /o\

@mandarvaze
Copy link
Contributor Author

@asottile Now the build is failing on tox-linux-pypy3 with similar error:

InvocationError for command /home/vsts/work/1/s/.tox/pypy3/bin/coverage

I don't have "write" access, so someone with write access will have to "ignore the error" and accept/merge the commit.

@asottile
Copy link
Member

asottile commented Jun 1, 2019

I'm streaming right now if you want to chat about this PR -- https://twitch.tv/anthonywritescode :)

@asottile
Copy link
Member

asottile commented Jun 1, 2019

the CI flakes are due to this I believe: coveragepy/coveragepy#807

hopefully I'll be able to fix them at some point :S

@mandarvaze
Copy link
Contributor Author

@asottile Hopefully this is the last iteration. tox-linux-pypy3 still fails (as above) but for unrelated reason.

Please review and accept/merge the PR.

Copy link
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.

@asottile asottile merged commit a75fe69 into pre-commit:master Jun 1, 2019
@asottile
Copy link
Member

asottile commented Jun 1, 2019

Thanks!

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.

--show-diff-on-failure does not respect --color

2 participants