Skip to content

Commit

Permalink
Fix config file search and inclusion in header
Browse files Browse the repository at this point in the history
  • Loading branch information
chrysle committed Jan 20, 2024
1 parent d673c8e commit 0385403
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions piptools/scripts/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ def _get_default_option(option_name: str) -> Any:
src_files = click.argument(
"src_files",
nargs=-1,
is_eager=True,
type=click.Path(exists=True, allow_dash=True),
)

Expand Down
2 changes: 1 addition & 1 deletion piptools/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ def select_config_file(src_files: tuple[str, ...]) -> Path | None:
# NOTE: input.
working_directory = Path.cwd()
src_files_as_paths = (
(working_directory / src_file).resolve() for src_file in src_files or (".",)
(working_directory / src_file).resolve() for src_file in src_files + (".",)
)
candidate_dirs = (src if src.is_dir() else src.parent for src in src_files_as_paths)
config_file_path = next(
Expand Down

0 comments on commit 0385403

Please sign in to comment.