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

Fix passing multiple ignores to pipenv check #2632

Merged
merged 2 commits into from
Jul 24, 2018
Merged

Conversation

washeck
Copy link
Contributor

@washeck washeck commented Jul 23, 2018

Fix missing space in command line arguments to 'safety' when
multiple CVEs are ignored.

Fix missing space in command line arguments to 'safety' when
multiple CVEs are ignored.
@washeck
Copy link
Contributor Author

washeck commented Jul 23, 2018

When multiple CVEs are ignored in pipenv check it results in error:

pipenv check -i 33073 -i 33074
Checking PEP 508 requirements...
Passed!
Checking installed package safety...
Notice: Ignoring CVE(s) 33073, 33074
An error occurred:
Usage: safety check [OPTIONS]

Error: Got unexpected extra argument (33074)

It is because the arguments passed to safety look like this: '--ignore 33073--ignore 33074'

This PR just adds the missing space.

@rooterkyberian
Copy link

Not sure if we want another testcase for pipenv check, but here is one I have used to reproduce this error and test the fix:

@pytest.mark.cli
@pytest.mark.needs_internet(reason='required by check')
@flaky
def test_pipenv_check_with_double_ignore(PipenvInstance):
    with PipenvInstance() as p:
        c = p.pipenv('check --ignore 666 --ignore 777')
        assert c.return_code == 0
        assert 'Ignoring CVE(s) 666, 777' in c.err

@techalchemy
Copy link
Member

Would very much appreciate the additional test case, feel free to make a separate PR with that test. Much appreciated and thanks for your contributions on this!

@techalchemy techalchemy merged commit 2b63523 into pypa:master Jul 24, 2018
techalchemy added a commit that referenced this pull request Jul 24, 2018
Signed-off-by: Dan Ryan <[email protected]>
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.

3 participants