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 argument checks in env plugin #988

Merged
merged 2 commits into from
Jan 14, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions dissect/target/plugins/apps/other/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@

if not env_path:
self.target.log.error("No ``--path`` provided!")
return

Check warning on line 34 in dissect/target/plugins/apps/other/env.py

View check run for this annotation

Codecov / codecov/patch

dissect/target/plugins/apps/other/env.py#L34

Added line #L34 was not covered by tests

if not (path := self.target.fs.path(env_path)).exists():
self.target.log.error("Provided path %s does not exist!", path)
return

Check warning on line 38 in dissect/target/plugins/apps/other/env.py

View check run for this annotation

Codecov / codecov/patch

dissect/target/plugins/apps/other/env.py#L38

Added line #L38 was not covered by tests

for file in path.glob("**/*." + extension):
if not file.is_file():
Expand Down
Loading