An error is raised during import when trying to use omas in a docker container and/or gitlab CI pipeline, where the default user is root and traditional configurations (.bashrc, .profile) might be a bit different. The issue is the USER env variable, which is not set in these environments. It works with this workaround:
Hi.
An error is raised during import when trying to use
omas
in a docker container and/or gitlab CI pipeline, where the default user is root and traditional configurations (.bashrc
,.profile
) might be a bit different. The issue is theUSER
env variable, which is not set in these environments. It works with this workaround:Proposed solution
The exception points to https://github.com/gafusion/omas/blob/master/omas/omas_utils.py#L869
I feel like this check could be replaced by a simpler one using only the
UID
(which is set in docker):Although I have not gurantee that this is more correct and universal (will try to google), it feels like it could be.
Or just to be sure, using
get()
would also help