Skip to content

Conversation

anki-code
Copy link
Contributor

@anki-code anki-code commented Aug 22, 2024

Hey!
Instead of changing global config (it's bad pattern) I suggest to wrap your changes into the context manager.

@anki-code
Copy link
Contributor Author

@74th please take a look.

@con-f-use
Copy link
Collaborator

con-f-use commented Aug 22, 2024

We want the changes to persist for the entire shell session. Wouldn't the context manager undo them at the end of the function?

Edit: Nevermind, it just undoes the $UPDATE_OS_ENVIRON=True.

@con-f-use con-f-use self-assigned this Aug 22, 2024
@con-f-use con-f-use self-requested a review August 22, 2024 19:23
@con-f-use
Copy link
Collaborator

con-f-use commented Aug 22, 2024

@anki-code Thanks for finding and PR-ing. Please bump the patch version and add a release note to README.md

@anki-code
Copy link
Contributor Author

anki-code commented Aug 23, 2024

Thank you for review @con-f-use !

Please bump the patch version and add a release note to README.md

Done.

Edit: Nevermind, it just undoes the $UPDATE_OS_ENVIRON=True.

It returns UPDATE_OS_ENVIRON to the previous state. It's the right pattern.

Copy link
Owner

@74th 74th left a comment

Choose a reason for hiding this comment

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

Thank you for PR!
I will release this patch now.

@74th 74th merged commit a8e3bec into 74th:master Aug 23, 2024
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.

3 participants