From 879a3a6c0b8a04fb25fd6eda29036d293627601e Mon Sep 17 00:00:00 2001 From: Obijuan Date: Fri, 15 Mar 2024 12:16:06 +0100 Subject: [PATCH] util.py refactoring --- apio/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apio/util.py b/apio/util.py index 2afe1cd7..f4d422eb 100644 --- a/apio/util.py +++ b/apio/util.py @@ -814,7 +814,7 @@ def get_bin_dir() -> Path: # In this case the main file is: venv/Scripts/apio.exe/__main__.py! # This is not good because venv/Scripts/apio.exe is not a directory # So here we go with the workaround: - if str(bin_dir).endswith(".exe"): + if bin_dir.suffix == ".exe": return bin_dir.parent return bin_dir