v-php-func takes STDIN only if --stdin parameter is passed

This commit is contained in:
myvesta 2024-01-07 21:51:00 +01:00 committed by GitHub
commit 942b46a657
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 41 additions and 18 deletions

View file

@ -9,7 +9,7 @@
#----------------------------------------------------------#
if [ -p /dev/stdin ]; then
if [ "$1" == "--stdin" ] && [ -p /dev/stdin ]; then
STDIN=$(cat -)
if [ ! -z "$STDIN" ]; then
echo "$STDIN" | php /usr/local/vesta/func/bash-to-php-interpreter.php "$@"