Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using whoami when USER is not defined instead of default user #241

Merged
merged 2 commits into from
Jun 7, 2022

Conversation

lobis
Copy link
Member

@lobis lobis commented Jun 6, 2022

lobis Ok: 12

Currently if the USER environment variable is not set, defaultUser is set as USER.

This PR makes use of whoami (which also exists on windows apparently) to get the current username, which is not always present in the environtment variable. The USER env variable will still take precendence.

If for some reason whoami is not found, it will still use defaultUser and it won't raise an exception.

@lobis lobis marked this pull request as ready for review June 6, 2022 10:00
@lobis lobis requested review from juanangp, nkx111 and jgalan and removed request for juanangp June 6, 2022 10:00
@lobis
Copy link
Member Author

lobis commented Jun 6, 2022

pipeline is failing due to some other reason. This works locally.

@nkx111
Copy link
Member

nkx111 commented Jun 6, 2022

pipeline is failing due to some other reason. This works locally.

This is because I mistakenly merged the PR rest-for-physics/restG4#49 in restG4. It changes a variables which is available in PR #231. So it should be merged only after the framework PR is merged. Shall we revert restG4 or merge the framework?

@lobis lobis requested review from cmargalejo, DavidDiezIb, glorialuzon and a team June 7, 2022 07:44
@lobis lobis merged commit cb3bc8e into master Jun 7, 2022
@lobis lobis deleted the lobis-default-user branch June 7, 2022 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants