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

fix: create parent dir if not present in the ouput param path #161

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Vipulkr1698
Copy link

When using the command of the below format
poetry export -o package/lib/requirements.txt

In the above example, if the package/lib directory doesn't exist, the above command would fail. With the fix, the tool would create all the necessary intermediate folders to the file path provided and export the dependencies to the file provided.

@sonarcloud
Copy link

sonarcloud bot commented Nov 14, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Copy link
Member

@neersighted neersighted left a comment

Choose a reason for hiding this comment

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

Pathlib functions should be used instead of os.path; e.g. output.parent. However, that isn't sufficient -- this is too naive. Tests should be written, which should reveal where more thought is needed.

Also, this is very clearly a new feature and not a fix; Poetry has never claimed to create these paths before.

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.

None yet

2 participants