diff --git a/Custom_Hooks/eb_hooks.py b/Custom_Hooks/eb_hooks.py index 537d6a7be851dcd51958096d339b009e22e3de81..20973f47595bcce36da6db1c45dd8541e34a493f 100644 --- a/Custom_Hooks/eb_hooks.py +++ b/Custom_Hooks/eb_hooks.py @@ -1,4 +1,5 @@ import os +import pwd import re import subprocess @@ -140,11 +141,15 @@ def get_user_info(): if name and email: return [name, email] else: - print_warning( - f"\n'jutil' is not present and 'SITE_CONTACT_NAME' or 'SITE_CONTACT_EMAIL' are not defined\n" - "Please defined both in your environment and try again\n" - ) - exit(1) + if install_path().lower().startswith('/p/software'): + print_warning( + f"\n'jutil' is not present and 'SITE_CONTACT_NAME' or 'SITE_CONTACT_EMAIL' are not defined\n" + "Please defined both in your environment and try again\n" + ) + exit(1) + # Assume user installations, contact data is not critical + else: + return [pwd.getpwuid(os.getuid())[4], '???'] else: return ['CI user', 'ci_user@fz-juelich.de']