From 497ce3f79ea7bb6ca681a26274bbb4d75091dbe0 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Wed, 16 Feb 2022 20:12:45 -0600 Subject: [PATCH] [buildcore] Fix pybb mkdir --- base.mk | 1 - scripts/pybb.py | 12 +++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/base.mk b/base.mk index 8339238..0941ff2 100644 --- a/base.mk +++ b/base.mk @@ -137,7 +137,6 @@ endif .PHONY: conan conan: ${ENV_RUN} ${PYBB} conan-install ${PROJECT_NAME} - #@mkdir -p .conanbuild && cd .conanbuild && conan install ../ --build=missing -pr=${PROJECT_NAME} endif # USE_VCPKG ############################################### .PHONY: configure-xcode diff --git a/scripts/pybb.py b/scripts/pybb.py index 12f64f7..16d0b05 100755 --- a/scripts/pybb.py +++ b/scripts/pybb.py @@ -31,9 +31,15 @@ def cat(paths: str) -> int: def mkdir(path: str) -> int: - if not os.path.exists(path) and os.path.isdir(path): - os.mkdir(path) - return 0 + if not os.path.exists(path): + try: + os.mkdir(path) + except: + return 1 + return 0 + if os.path.isdir(path): + return 0 + return 1 # this exists because Windows is utterly incapable of providing a proper rm -rf