From 1fcdd51ad4a5b34d0c1538477bde7a6a5c26fc48 Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Mon, 13 Jun 2022 09:51:41 -0300 Subject: [PATCH] kibot-check: fixed path returned for plugins at system --- src/kibot-check | 4 ++-- src/kibot-check.in | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/kibot-check b/src/kibot-check index e1773837..770e3378 100755 --- a/src/kibot-check +++ b/src/kibot-check @@ -680,7 +680,7 @@ ver_re = re.compile(r'(\d+)\.(\d+)(?:\.(\d+))?(?:[\.-](\d+))?') def run_command(cmd, only_first_line=True, pre_ver_text=None, no_err_2=False): global last_ok try: - cmd_output = subprocess.check_output(cmd, stderr=subprocess.STDOUT) + cmd_output = subprocess.check_output(cmd, stderr=subprocess.DEVNULL) except FileNotFoundError as e: last_ok = False return NOT_AVAIL @@ -711,7 +711,7 @@ def simple_run_command(cmd): def search_as_plugin(cmd, names): """ If a command isn't in the path look for it in the KiCad plugins """ if which(cmd) is not None: - return cmd + return which(cmd) for dir in kicad_plugins_dirs: for name in names: fname = os.path.join(dir, name, cmd) diff --git a/src/kibot-check.in b/src/kibot-check.in index 7d9f30be..6031ce0d 100755 --- a/src/kibot-check.in +++ b/src/kibot-check.in @@ -37,7 +37,7 @@ ver_re = re.compile(r'(\d+)\.(\d+)(?:\.(\d+))?(?:[\.-](\d+))?') def run_command(cmd, only_first_line=True, pre_ver_text=None, no_err_2=False): global last_ok try: - cmd_output = subprocess.check_output(cmd, stderr=subprocess.STDOUT) + cmd_output = subprocess.check_output(cmd, stderr=subprocess.DEVNULL) except FileNotFoundError as e: last_ok = False return NOT_AVAIL @@ -68,7 +68,7 @@ def simple_run_command(cmd): def search_as_plugin(cmd, names): """ If a command isn't in the path look for it in the KiCad plugins """ if which(cmd) is not None: - return cmd + return which(cmd) for dir in kicad_plugins_dirs: for name in names: fname = os.path.join(dir, name, cmd)