Skip to content

Commit

Permalink
Better debugging when in macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
jordimas committed Jan 21, 2024
1 parent ce8f68b commit 8d9f1b6
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/builder/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import datetime
import logging
import os
import platform
from concurrent.futures import ProcessPoolExecutor

from .project import Project
Expand Down Expand Up @@ -75,7 +76,14 @@ def add_project(self, project_dto, add_source):
logging.debug(project_dto)

def _download_all_projects(self):
if os.environ.get("SINGLE_THREAD_DOWNLOAD") == "1":
single_thread = os.environ.get("SINGLE_THREAD_DOWNLOAD") == "1"
if (
platform.system() == "Darwin"
and os.environ.get("LOGLEVEL", "INFO").upper() == "DEBUG"
):
single_thread = True

if single_thread:
with ProcessPoolExecutor() as executor:
for project in self.projects:
project.do()
Expand Down

0 comments on commit 8d9f1b6

Please sign in to comment.