Skip to content

Commit 2fbd006

Browse files
Added wait to Popen call
Without the wait call, we'll end up building the addon before the action has finished. In a worse case, we'll end up running 2 actions at once.
1 parent 2ac5c53 commit 2fbd006

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

bpy_addon_build/build_context.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,11 @@ def action(self, action: str, folder: Path) -> None:
156156
if action in self.actions:
157157
import subprocess
158158

159+
# We call wait here to make sure
160+
# that the action has finished in
161+
# its entirity. Otherwise, the
162+
# addon will be built with a weird
163+
# result.
159164
subprocess.Popen(
160165
[
161166
"python",
@@ -164,4 +169,4 @@ def action(self, action: str, folder: Path) -> None:
164169
),
165170
],
166171
cwd=folder,
167-
)
172+
).wait()

0 commit comments

Comments
 (0)