Skip to content

Commit d5f49a3

Browse files
authored
bugfix(cli): prevent pre-commit hook error for non-dataset files (#3197)
1 parent 2f7f936 commit d5f49a3

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

renku/core/dataset/dataset.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,7 @@ def update_datasets(
570570
check_data_directory: bool,
571571
update_all: bool,
572572
dry_run: bool,
573+
plain: bool,
573574
dataset_gateway: IDatasetGateway,
574575
) -> Tuple[List[DatasetViewModel], List[DatasetFileViewModel]]:
575576
"""Update dataset files.
@@ -587,6 +588,7 @@ def update_datasets(
587588
check_data_directory(bool): Whether to check the dataset's data directory for new files.
588589
update_all(bool): Whether to update all datasets.
589590
dry_run(bool): Whether to return a preview of what would be updated.
591+
plain(bool): Whether plain output should be produced.
590592
dataset_gateway(IDatasetGateway): Injected dataset gateway.
591593
"""
592594
from renku.core.dataset.providers.renku import RenkuProvider
@@ -680,7 +682,7 @@ def update_datasets(
680682
)
681683

682684
if not records:
683-
if must_match_records:
685+
if must_match_records and not plain:
684686
raise errors.ParameterError("No files matched the criteria.")
685687
return imported_dataset_updates_view_models, []
686688

renku/ui/cli/dataset.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1128,6 +1128,7 @@ def update(
11281128
check_data_directory=check_data_directory,
11291129
update_all=update_all,
11301130
dry_run=dry_run,
1131+
plain=plain,
11311132
)
11321133
)
11331134

0 commit comments

Comments
 (0)