mirror of
https://github.com/taiki-e/install-action.git
synced 2026-05-10 06:30:32 +00:00
8
main.sh
8
main.sh
@@ -654,10 +654,10 @@ case "${host_os}" in
|
|||||||
jq() { "${install_action_dir}/jq/bin/jq.exe" -b "$@"; }
|
jq() { "${install_action_dir}/jq/bin/jq.exe" -b "$@"; }
|
||||||
elif type -P jq >/dev/null; then
|
elif type -P jq >/dev/null; then
|
||||||
# https://github.com/jqlang/jq/issues/1854
|
# https://github.com/jqlang/jq/issues/1854
|
||||||
_tmp=$(jq -r .a <<<'{}')
|
_tmp=$(jq -r .a <<<'{}' | wc -c)
|
||||||
if [[ "${_tmp}" != "null" ]]; then
|
if [[ "${_tmp}" != 5 ]]; then
|
||||||
_tmp=$(jq -b -r .a 2>/dev/null <<<'{}' || true)
|
_tmp=$({ jq -b -r .a 2>/dev/null <<<'{}' || true; } | wc -c)
|
||||||
if [[ "${_tmp}" == "null" ]]; then
|
if [[ "${_tmp}" == 5 ]]; then
|
||||||
jq() { command jq -b "$@"; }
|
jq() { command jq -b "$@"; }
|
||||||
else
|
else
|
||||||
jq() { command jq "$@" | tr -d '\r'; }
|
jq() { command jq "$@" | tr -d '\r'; }
|
||||||
|
|||||||
Reference in New Issue
Block a user