Skip to content

Commit 685bcba

Browse files
committed
Fix config file search and inclusion in header
1 parent d673c8e commit 685bcba

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

piptools/scripts/options.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ def _get_default_option(option_name: str) -> Any:
245245
src_files = click.argument(
246246
"src_files",
247247
nargs=-1,
248+
is_eager=True,
248249
type=click.Path(exists=True, allow_dash=True),
249250
)
250251

@@ -328,7 +329,6 @@ def _get_default_option(option_name: str) -> Any:
328329
f"Read configuration from TOML file. By default, looks for the following "
329330
f"files in the given order: {', '.join(DEFAULT_CONFIG_FILE_NAMES)}."
330331
),
331-
is_eager=True,
332332
callback=override_defaults_from_config_file,
333333
)
334334

piptools/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ def select_config_file(src_files: tuple[str, ...]) -> Path | None:
630630
# NOTE: input.
631631
working_directory = Path.cwd()
632632
src_files_as_paths = (
633-
(working_directory / src_file).resolve() for src_file in src_files or (".",)
633+
(working_directory / src_file).resolve() for src_file in src_files + (".",)
634634
)
635635
candidate_dirs = (src if src.is_dir() else src.parent for src in src_files_as_paths)
636636
config_file_path = next(

0 commit comments

Comments
 (0)