From 5e59844cf5800eb6ecb04fdc802babf3d6c85c28 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Mon, 12 Jun 2023 10:00:15 +0200 Subject: [PATCH] Fix incorrect directory check --- src/pretix/_build.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pretix/_build.py b/src/pretix/_build.py index 6a9506671..28f94aadd 100644 --- a/src/pretix/_build.py +++ b/src/pretix/_build.py @@ -45,7 +45,7 @@ def npm_install(): class CustomBuild(build): def run(self): - if "pretix" not in os.listdir("."): + if "src" not in os.listdir(".") or "pretix" not in os.listdir("src"): # Only run this command on the pretix module, not on other modules even if it's registered globally # in some cases return build.run(self) @@ -72,7 +72,7 @@ class CustomBuild(build): class CustomBuildExt(build_ext): def run(self): - if "pretix" not in os.listdir("."): + if "src" not in os.listdir(".") or "pretix" not in os.listdir("src"): # Only run this command on the pretix module, not on other modules even if it's registered globally # in some cases return build_ext.run(self)