Skip to content

Automatically create directory if not exist #43

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

Merged
merged 1 commit into from
Apr 21, 2025

Conversation

dodyirawan85
Copy link
Contributor

Test: get-apks and non-existance directory automatically created.

Test: get-apks and non-existance directory automatically created.
@mhils
Copy link
Member

mhils commented Apr 21, 2025

Thanks!

@mhils mhils merged commit 88759c8 into mitmproxy:main Apr 21, 2025
@@ -363,6 +363,8 @@ def get_apks(package: str, outdir: Path) -> None:
if not package_info.startswith("package:"):
raise RuntimeError(f"Unxepected output from pm path: {package_info!r}")
apks = [p.removeprefix("package:") for p in package_info.splitlines()]
if not outdir.exists():
Path.mkdir(outdir)
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this instead be outdir.mkdir()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, just notice that. should i make another pr ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah please do.

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.

3 participants