mirror of
https://passt.top/passt
synced 2024-12-22 21:55:22 +00:00
test: term: When checking if status line is a number, hide errors
We use the [ "$x" -eq "$x" ] syntax to check if $x is a number. The behaviour is clearly implied by POSIX, but some shells might actually report the (intended) error, and dash floods script.log with "Illegal number" error messages. Hide them. Signed-off-by: Stefano Brivio <sbrivio@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
9fc476af6e
commit
b323e5f439
@ -232,7 +232,7 @@ pane_status() {
|
|||||||
[ ${DEMO} -eq 1 ] && return 0
|
[ ${DEMO} -eq 1 ] && return 0
|
||||||
|
|
||||||
__status="$(pane_parse "${1}")"
|
__status="$(pane_parse "${1}")"
|
||||||
while ! [ "${__status}" -eq "${__status}" ]; do
|
while ! [ "${__status}" -eq "${__status}" ] 2>/dev/null; do
|
||||||
sleep 1
|
sleep 1
|
||||||
pane_run "${1}" 'echo $?'
|
pane_run "${1}" 'echo $?'
|
||||||
pane_wait "${1}"
|
pane_wait "${1}"
|
||||||
|
Loading…
Reference in New Issue
Block a user