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

Remove created prefix if aborted with --platform #2738

Merged
merged 3 commits into from
Aug 8, 2023

Conversation

Hind-M
Copy link
Member

@Hind-M Hind-M commented Aug 7, 2023

Fix #2736

@jonashaag
Copy link
Collaborator

Thanks, LGTM, although I wonder if we can't create the file only after successful creation?

Otherwise instead of prompting the user which might be confusing, can we detect if the env folder was created by Mamba and if yes delete it?

@Hind-M Hind-M self-assigned this Aug 7, 2023
@Hind-M
Copy link
Member Author

Hind-M commented Aug 8, 2023

Thanks, LGTM, although I wonder if we can't create the file only after successful creation?

I suppose we theoretically can, but it would probably be more prone to future bugs? The prefix directory is created to update the given platform info in the .mambarc file which could be required somehow, somewhere...

Otherwise instead of prompting the user which might be confusing, can we detect if the env folder was created by Mamba and if yes delete it?

Yeah I changed it now to detect creation and avoid passing config too...

Copy link
Collaborator

@jonashaag jonashaag left a comment

Choose a reason for hiding this comment

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

Thanks! I suggest renaming to remove_prefix_on_failure or something like that because we don't remove it in all cases

@Hind-M Hind-M merged commit beebd7e into mamba-org:main Aug 8, 2023
20 checks passed
@Hind-M Hind-M deleted the fix_dir_rm branch August 8, 2023 11:51
Hind-M added a commit to Hind-M/mamba that referenced this pull request Aug 8, 2023
Hind-M added a commit to Hind-M/mamba that referenced this pull request Aug 8, 2023
cvanelteren pushed a commit to cvanelteren/mamba that referenced this pull request Aug 29, 2023
* Remove created prefix if aborted

* Add bool to remove created dir

* Rename flag to be more explicit
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.

"Non-conda folder exists at prefix" after aborted env creation with --platform
2 participants