entrypoint.sh checks "$(jotta-cli status)" =~ ERROR.* to determine if the user is logged in. This does not catch the error output, since this is sent to stderr, not stdout. This was probably changed recently.
jotta-cli status seems to give exit code 0 if it fails, so a more robust version could be
jotta-cli status >/dev/null 2>&1
if [ $? -ne 0 ]; then
echo "First time login"
Or, to keep the same solution:
if [[ "$(jotta-cli status 2>&1)" =~ ERROR.* ]];
echo "First time login"
The same problem exists at cliout=$(jotta-cli status | tail -1). It is easy to verify by running jotta-cli status | grep -c OK, which returns "OK" and "0". jotta-cli status 2>&1 | grep -c OK returns 1.
entrypoint.shchecks"$(jotta-cli status)" =~ ERROR.*to determine if the user is logged in. This does not catch the error output, since this is sent to stderr, not stdout. This was probably changed recently.jotta-cli statusseems to give exit code 0 if it fails, so a more robust version could beOr, to keep the same solution:
The same problem exists at
cliout=$(jotta-cli status | tail -1). It is easy to verify by runningjotta-cli status | grep -c OK, which returns "OK" and "0".jotta-cli status 2>&1 | grep -c OKreturns 1.