You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue is insufficient quoting in bash. login_ok is only set here and when testing without quotes a bare $login_ok becomes nothing and then it evaluates "== false" which causes an error. Need to add quotes around $login_ok.
I agree the script has this issue which should be fixed. However, i'm not sure that it is the reason that the build failed, as the script continued on and ran the rest of the build successfully. Also this unary error appears in the "good path" for ECR login, which is being hit pretty commonly across users of the product, and most people aren't seeing it result in build failure like this.
I'll open an internal ticket to fix this script, but the build failure is still a bit of a mystery to me in this case. It's probably more closely tied to this existing issue: #4297
Description of your issue:
== Unary operator expected line 349
Only happens when there is a cached build.
https://app.shippable.com/bitbucket/xeraflop/duber-rails/runs/3213/1/console
Issue is insufficient quoting in bash. login_ok is only set here and when testing without quotes a bare $login_ok becomes nothing and then it evaluates "== false" which causes an error. Need to add quotes around $login_ok.
login_out=$($docker_login_cmd 2>&1) || {
exec_cmd "echo 'Hub login failed'"
login_ok=false
}
if [ $login_ok == false ]; then
exec_cmd "echo -e 'ECR docker login failed\n\n'$login_out"
should_continue=false
return 127
else
exec_cmd "echo 'ECR docker login successful'"
is_success=true
fi
is_success=true
}
The text was updated successfully, but these errors were encountered: