mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-17 20:34:51 +08:00
Reapply "just strip out the error and return the output instead of executing again without version"
This reverts commit 1d29ac228c42531a5f008e480c3cb538e7769e36.
This commit is contained in:
parent
bd25de15cc
commit
2564da2615
@ -72,21 +72,13 @@ else
|
||||
status=$?
|
||||
|
||||
if [ $status -eq 0 ]; then
|
||||
echo "$output" | grep -v "version '.*' in target triple"
|
||||
echo "$output"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if echo "$output" | grep -q "version '.*' in target triple"; then
|
||||
TARGET_FALLBACK="${SPC_TARGET}-${SPC_LIBC}"
|
||||
output=$(zig cc -target "$TARGET_FALLBACK" -lstdc++ ${COMPILER_EXTRA} "${PARSED_ARGS[@]}" 2>&1)
|
||||
status=$?
|
||||
|
||||
if [ $status -eq 0 ]; then
|
||||
echo "$output"
|
||||
exit 0
|
||||
else
|
||||
exec zig cc -target "$TARGET_FALLBACK" ${COMPILER_EXTRA} "${PARSED_ARGS[@]}"
|
||||
fi
|
||||
echo "$output" | grep -v "version '.*' in target triple"
|
||||
exit 0
|
||||
else
|
||||
exec zig cc -target "$TARGET" ${COMPILER_EXTRA} "${PARSED_ARGS[@]}"
|
||||
fi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user