From 452f1c7d766ca3b5d5c04b1447f153daa2e11295 Mon Sep 17 00:00:00 2001
From: mrethore <martin.rethoret-pasty@pasteur.fr>
Date: Tue, 20 Aug 2024 16:13:46 +0200
Subject: [PATCH] Dependency test modification

---
 __main__.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/__main__.py b/__main__.py
index 2979cd1..763bdb7 100644
--- a/__main__.py
+++ b/__main__.py
@@ -125,13 +125,13 @@ from module.utils import (
     )
 
 def test_unique_dependency(name:str):
-    return subprocess.call(["command", "-v", name])
+    return shutil.which(name) is not None
 
 
 def test_multiple_dependencies(dependencies:List[str]):
     for dependency in dependencies:
-        rc = test_unique_dependency(dependency)
-        if rc == 1:
+        presence = test_unique_dependency(dependency)
+        if presence is not True:
             print(f'/!\\ Warning /!\\ : {dependency} missing in path!')
             sys.exit(-1)
 
-- 
GitLab