mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-13 20:05:35 +08:00
Revert "just strip out the error and return the output instead of executing again without version"
This reverts commit d588e6e4fd.
This commit is contained in:
@@ -72,13 +72,21 @@ else
|
|||||||
status=$?
|
status=$?
|
||||||
|
|
||||||
if [ $status -eq 0 ]; then
|
if [ $status -eq 0 ]; then
|
||||||
echo "$output"
|
echo "$output" | grep -v "version '.*' in target triple"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if echo "$output" | grep -q "version '.*' in target triple"; then
|
if echo "$output" | grep -q "version '.*' in target triple"; then
|
||||||
echo "$output" | grep -v "version '.*' in target triple"
|
TARGET_FALLBACK="${SPC_TARGET}-${SPC_LIBC}"
|
||||||
exit 0
|
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
|
||||||
else
|
else
|
||||||
exec zig cc -target "$TARGET" ${COMPILER_EXTRA} "${PARSED_ARGS[@]}"
|
exec zig cc -target "$TARGET" ${COMPILER_EXTRA} "${PARSED_ARGS[@]}"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user