From 1ee673b8e323d4e5733ae3cf91eb74fdc5393a9e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=A9dric=20OLIVIER?= <cedric3.olivier@orange.com>
Date: Mon, 20 Dec 2021 21:34:21 +0000
Subject: [PATCH] fix(safety): fix command not found when poetry is used

---
 templates/gitlab-ci-python.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/templates/gitlab-ci-python.yml b/templates/gitlab-ci-python.yml
index 1b393b7..33691d4 100644
--- a/templates/gitlab-ci-python.yml
+++ b/templates/gitlab-ci-python.yml
@@ -563,11 +563,11 @@ py-safety:
     - _pip install safety
     - install_requirements build
     - |
-      if ! _pip freeze | safety check --stdin ${SAFETY_ARGS}
+      if ! _pip freeze | _run safety check --stdin ${SAFETY_ARGS}
       then
         # failed: also generate JSON report
 
-        _pip freeze | safety check --stdin --json --output reports/safety.json ${SAFETY_ARGS}
+        _pip freeze | _run safety check --stdin --json --output reports/safety.json ${SAFETY_ARGS}
         exit 1
       fi
   artifacts:
-- 
GitLab