Skip to content

Commit 1f75cbb

Browse files
committed
handle empty flags
1 parent 89d5320 commit 1f75cbb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backend/coreapp/compilers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -931,7 +931,7 @@ def available_platforms() -> List[Platform]:
931931
)
932932

933933
# Python alternative to the printf/xargs approach for quoted flags
934-
PYTHON_SHLEX = """mapfile -t FLAGS < <(python3 -c "import shlex,sys;print(*shlex.split(sys.argv[1]),sep='\\n')" "${COMPILER_FLAGS}") && """
934+
PYTHON_SHLEX = """[[ -n "${COMPILER_FLAGS}" ]] && mapfile -t FLAGS < <(python3 -c "import shlex,sys; print(*shlex.split(sys.argv[1]), sep='\\n')" "${COMPILER_FLAGS}"); """
935935

936936
EGCS1124 = GCCCompiler(
937937
id="egcs_1.1.2-4",

0 commit comments

Comments
 (0)