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

Create the output directory if its missing and force is used, otherwise raise #295

Merged
merged 6 commits into from
Nov 18, 2023

Conversation

KrishanBhasin
Copy link
Contributor

@KrishanBhasin KrishanBhasin commented Nov 9, 2023

Description

I've had a couple of occasions where I've used conda-pack and asked it to output to a directory that doesn't exist by accident. The packing goes ahead and the operation eventually fails in the shutil.move() command right at the end.

I wanted to make it fail early instead or, if force was used, to create the directory.

I've gotten it into a 'good enough' working state, and can tidy it up further if you would be open to merging this change.

Checklist - did you ...

  • Add a file to the news directory (using the template) for the next release's release notes?
  • Add / update necessary tests?
  • Add / update outdated documentation?

@conda-bot
Copy link
Contributor

We require contributors to sign our Contributor License Agreement and we don't have one on file for @KrishanBhasin.

In order for us to review and merge your code, please e-sign the Contributor License Agreement PDF. We then need to manually verify your signature, merge the PR (conda/infrastructure#847), and ping the bot to refresh the PR.

@KrishanBhasin KrishanBhasin force-pushed the check-target-dir-early branch from 33dc024 to 8490ce5 Compare November 9, 2023 21:01
@KrishanBhasin KrishanBhasin marked this pull request as ready for review November 9, 2023 21:01
@KrishanBhasin KrishanBhasin requested review from xhochy and a team as code owners November 9, 2023 21:01
conda_pack/core.py Outdated Show resolved Hide resolved
@xhochy
Copy link
Collaborator

xhochy commented Nov 10, 2023

This is looking good and would happily merge 👍 Waiting for the CLA to be merged first though.

@dbast
Copy link
Member

dbast commented Nov 10, 2023

@conda-bot check

@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label Nov 10, 2023
@KrishanBhasin
Copy link
Contributor Author

@xhochy I have tidied it up a little bit and updated the docs/news; this is ready to review now

No rush or pressure, just let me know if there's any changes you'd prefer to see

@xhochy xhochy merged commit 11ab92a into conda:main Nov 18, 2023
18 checks passed
@xhochy
Copy link
Collaborator

xhochy commented Nov 18, 2023

Thanks!

@KrishanBhasin KrishanBhasin deleted the check-target-dir-early branch November 19, 2023 14:57
@github-actions github-actions bot added the locked [bot] locked due to inactivity label Nov 19, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla-signed [bot] added once the contributor has signed the CLA locked [bot] locked due to inactivity
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants