-
Couldn't load subscription status.
- Fork 415
feat: Use ZDOTDIR if set and fallback to HOME #3933
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
base: main
Are you sure you want to change the base?
Conversation
libmamba/src/core/shell_init.cpp
Outdated
| fs::u8path zshrc_path = home / ".zshrc"; | ||
| fs::u8path zshrc_path | ||
| // use ZDOTDIR if set and fallback to HOME | ||
| const char* zdotdir = std::getenv("ZDOTDIR"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have util::get_env to properly read from the environment.
libmamba/src/core/shell_init.cpp
Outdated
| fs::u8path zshrc_path | ||
| // use ZDOTDIR if set and fallback to HOME | ||
| const char* zdotdir = std::getenv("ZDOTDIR"); | ||
| if (zdotdir != nullptr && zdotdir[0] != '\0') | ||
| { | ||
| zshrc_path = fs::u8path(zdotdir) / ".zshrc"; | ||
| } else { | ||
| zshrc_path = home / ".zshrc"; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the repeated logic could be factored into a simple function.
which return ZDOTDIR if set else HOME
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3933 +/- ##
=======================================
Coverage 64.14% 64.15%
=======================================
Files 303 303
Lines 38853 38870 +17
Branches 2883 2876 -7
=======================================
+ Hits 24923 24937 +14
- Misses 13863 13866 +3
Partials 67 67 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@AntoinePrv, do you have any pointers to fix the windows build and also the integration tests on UNIX platforms? |
No description provided.