Sorry to hijack this conversation, but it seems to be addressing something I am having difficulty with:
Do I understand correctly that the environment in which the snap executes is supposed to inherit from the user running the snap? E.g., in the case of rocketchat-server, where the root user runs the daemon, are the root user’s environment variables (possibly defined in .bashrc or .profile) inherited into the snap environment?
In my specific case, I need to set NODE_EXTRA_CA_CERTS so that nodejs can trust a corporate CA certificate, but I cannot see any way of setting this in the snap environment. Setting it for the root user has not helped either.