pyupio/safety

Gitlab step issue with the new release

mladendin opened this issue ยท 4 comments

  • safety version: 2.1.0
  • Python version: 3.8
  • Operating System: Gitlab

Description

It seems like there is an issue with the new release. This is how my Gitlab CI looks like which prior to the latest version(2.1.) was working just fine.

  script:
    - cd $RELATIVE_DIR
    - pip install safety
    - poetry export -f requirements.txt --output requirements.txt
    - safety check -r requirements.txt -o text
    - safety check -r requirements.txt

For some reason, I'm getting this error message now:

$ safety check -r requirements.txt -o text
Unhandled exception happened: [Errno 2] No such file or directory: 'git'

I can confirm that the same error happens in Bitbucket CI. Downgrading safety to v2.0.0 fixes the issue temporarily for me.

cb22 commented

Looks like we were relying on the git binary being present, which definitely isn't the case in all environments.

I've just merged in #397 which has a fix for this, and a new dot release will be up soon!

cb22 commented

Safety 2.1.1 is out and published with this fix!

Thank you for the quick reaction, guys.