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

pipenv lock -r: Error: No such option: -r #49

Open
pnowy opened this issue Aug 8, 2023 · 2 comments
Open

pipenv lock -r: Error: No such option: -r #49

pnowy opened this issue Aug 8, 2023 · 2 comments

Comments

@pnowy
Copy link

pnowy commented Aug 8, 2023

When we try to scan Python code with Mend Java agent (release v23.7.1) and Pipenv we get the following error:

[WARN] [2023-08-07 16:20:39,771 +0000] - Command - executeProcess - error in execute command 'pipenv lock -r', Exit Status 2
[WARN] [2023-08-07 16:20:39,772 +0000] - Read error line #1: Usage: pipenv lock [OPTIONS]
[WARN] [2023-08-07 16:20:39,772 +0000] - Read error line #2: Try 'pipenv lock -h' for help.
[WARN] [2023-08-07 16:20:39,772 +0000] - Read error line #3: Error: No such option: -r
[ERROR] [2023-08-07 16:20:39,772 +0000] - Error occurred while running command pipenv lock -r in /home/jenkins/agent/workspace/...

It seems that the agent under the hood using the old syntax of pipenv which is not available anymore.

Is there any way to handle/configure the option to avoid that kind of issue?

@hamdrew
Copy link

hamdrew commented Oct 25, 2023

A workaround is to generate the requirements.txt file manually and remove Pipenv files:

      - name: "Install pipenv"
        run: pip install --user pipenv

      - name: "Generate requirements.txt"
        run: pipenv requirements --dev > requirements.txt

      # Mend is broken with pipenv - https://github.com/whitesource/unified-agent-distribution/issues/49
      - name: "Remove pipenv files"
        run: rm -rf Pipfile Pipfile.lock .venv

@alumni
Copy link

alumni commented Jan 8, 2024

I arrived here since I noticed WhiteSource is not scanning correctly. Any plans to have this fixed?

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

No branches or pull requests

3 participants