Skip to content
This repository has been archived by the owner on Jan 16, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1 from RaddishIoW/master
Browse files Browse the repository at this point in the history
feat: Add option to pass the project directory to Poetry
  • Loading branch information
Diaoul authored Jul 12, 2020
2 parents 0483cf7 + 9f825f9 commit 7f16e8c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pre_commit_hooks/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ def main(argv: Optional[Sequence[str]] = None) -> int:
action="store_true",
help="Include credentials for extra indices.",
)
parser.add_argument(
"--project-directory",
action="store",
help="Directory which includes the pyproject.toml file.",
)
parser.add_argument("filename", help="Filename to check.")
args = parser.parse_args(argv)

Expand All @@ -35,7 +40,7 @@ def main(argv: Optional[Sequence[str]] = None) -> int:
with open(args.filename, "w") as req:
exporter.export(
fmt="requirements.txt",
cwd=None,
cwd=args.project_directory,
output=req,
with_hashes=not args.without_hashes,
dev=args.dev,
Expand Down

0 comments on commit 7f16e8c

Please sign in to comment.