mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-17 20:34:51 +08:00
why does exec work but output=$(...) doesn't?
This commit is contained in:
parent
2ac5438f6b
commit
39ffb8d99d
@ -31,10 +31,14 @@ done
|
||||
output=$(zig cc $TARGET $COMPILER_EXTRA "${PARSED_ARGS[@]}" 2>&1)
|
||||
status=$?
|
||||
|
||||
if [[ $status -ne 0 ]] && grep -q "version '.*' in target triple" <<< "$output"; then
|
||||
output=$(grep -v "version '.*' in target triple" <<< "$output")
|
||||
status=0
|
||||
fi
|
||||
if [[ $status -eq 0 ]]; then
|
||||
echo "$output"
|
||||
exit 0
|
||||
else
|
||||
if grep -q "version '.*' in target triple" <<< "$output"; then
|
||||
output=$(grep -v "version '.*' in target triple" <<< "$output")
|
||||
status=0
|
||||
fi
|
||||
|
||||
echo "$output"
|
||||
exit $status
|
||||
exec zig cc $TARGET $COMPILER_EXTRA "${PARSED_ARGS[@]}"
|
||||
fi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user