Skip to content

Commit

Permalink
Fixing a bug and testing the original code again.
Browse files Browse the repository at this point in the history
  • Loading branch information
jhbeskow committed Nov 7, 2023
1 parent 2b20d7b commit 44de710
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,17 +135,17 @@ jobs:
echo "API/Config OK."
echo "*****ADMIN*****"
curl -Lks https://bitwarden.localhost/admin -w httpcode=%{http_code}
curl -Lks https://bitwarden.localhost/admin | lynx -stdin -dump -width=100
admin=$(curl -Lks https://bitwarden.localhost/admin -w httpcode=%{http_code})
echo $admin | lynx -stdin -dump -width=100
httpCode=$(echo "${admin}" | grep -Po 'httpcode=\K(\d\d\d)')
bodyCheck=$(echo "${admin}" | grep -Po 'We'll email you a secure login link')
bodyCheck=$(echo "${admin}" | grep -Po "We'll email you a secure login link")
if [[ ${httpCode} -ne 200 ]]; then
echo "::error::ERROR: Home page failed to load. HTTP code was $httpCode"
exit 1
fi
if [[ "$bodyCheck" != 'We'll email you a secure login link' ]]; then
if [[ "$bodyCheck" != "We'll email you a secure login link" ]]; then
echo "::error::ERROR: Admin page failed to load. Please check body output above."
exit 1
fi
Expand Down

0 comments on commit 44de710

Please sign in to comment.