Simply replacing the line above with: REALHOME=${SNAP_REAL_HOME} makes the issue go away.
I'm not sure what was the purpose of the getent call, but clearly it has problems with accessing the passwd database inside the snap sandbox.
Simply replacing the line above with: ${SNAP_ REAL_HOME}
REALHOME=
makes the issue go away.
I'm not sure what was the purpose of the getent call, but clearly it has problems with accessing the passwd database inside the snap sandbox.