mirror of
https://github.com/shivammathur/setup-php.git
synced 2025-07-24 15:49:07 +07:00
Fix pipe in get_sha256
This commit is contained in:
@ -110,11 +110,11 @@ release_lock() {
|
||||
# Function to get the SHA256 hash of a string.
|
||||
get_sha256() {
|
||||
local input=$1
|
||||
if command -v sha256sum >/dev/null 2>&1; then
|
||||
if command -v sha256sum >/dev/null; then
|
||||
printf '%s' "$input" | sha256sum | cut -d' ' -f1
|
||||
elif command -v shasum >/dev/null 2>&1; then
|
||||
elif command -v shasum >/dev/null; then
|
||||
printf '%s' "$input" | shasum -a 256 | cut -d' ' -f1
|
||||
elif command -v openssl >/dev/null 2>&1; then
|
||||
elif command -v openssl >/dev/null; then
|
||||
printf '%s' "$input" | openssl dgst -sha256 | cut -d' ' -f2
|
||||
fi
|
||||
}
|
||||
|
Reference in New Issue
Block a user