Skip to content

Conversation

@boegel
Copy link

@boegel boegel commented May 30, 2024

@Micket one more for easybuilders#4486

if not key.endswith('%')) + '\n')

# unset environment variables in current environment if they're not defined in environment used to run command
fid.write('\n'.join(f'unset {key}' for key in os.environ if key not in env and not key.endswith('%')))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm, this isn't really correct though? When a user sources this, they will likely have other variables set.
It should unset everything the user has as the point where they enter this environment?

unset $(env | cut -d= -f1)

I suppose we should maybe always do that (first) since the user might be bringing in their own extra stuff when they source env.sh.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point, fixed in a2b9e06

Copy link
Owner

@Micket Micket left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@Micket Micket merged commit d906c88 into Micket:cmdlog Jun 1, 2024
@boegel boegel deleted the cmdlog branch June 1, 2024 14:59
Micket pushed a commit that referenced this pull request Apr 14, 2025
move `CWD_NOTFOUND_ERROR` constant to `tools.build_log`
Micket pushed a commit that referenced this pull request Oct 11, 2025
extend `test_toy_cuda_sanity_check` to also check whether shared libraries under `lib/python*/site-packages` are being checked in CUDA sanity check
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.

2 participants