More robust env.sh | Fix conda activate if in subshell#1653
Merged
abejgonzalez merged 1 commit intomainfrom Nov 7, 2023
Merged
More robust env.sh | Fix conda activate if in subshell#1653abejgonzalez merged 1 commit intomainfrom
abejgonzalez merged 1 commit intomainfrom
Conversation
jerryz123
approved these changes
Nov 7, 2023
Contributor
jerryz123
left a comment
There was a problem hiding this comment.
LGTM, but perhaps someone more familiar with Conda should review as well
Contributor
Author
The extra conda lines were merged into / taken from FireSim so they should already be fairly robust. The replacement stuff should be pretty self-explanatory. I'll go ahead and merge and we can fix it along the way if things break. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
env.shis now not appended too. Instead, it replaces its text like howconda init bashreplaces text in a comment block. Additionally, fixes the wayconda activateis called so that it works on any system that has conda setup properly (whether or notcondais in thePATHas a function or not).Code adapted from: https://github.com/conda/conda/blob/e69b2353c2f14fbfc9fd3aa448ebc991b28ca136/conda/core/initialize.py and from https://github.com/firesim/firesim/blob/70f5ac37ed74e7411ec5a77e422339b880f79a54/build-setup-nolog.sh#L121
Related PRs / Issues:
Fixes #1651.
Type of change:
Impact:
Contributor Checklist:
mainas the base branch?changelog:<topic>label?changelog:label?.conda-lock.ymlfile if you updated the conda requirements file?Please Backport?