checkout: Expose --allow-missing arg. (#9919)

This commit is contained in:
David de la Iglesia Castro
2023-09-07 09:55:50 +00:00
committed by GitHub
parent 784f5a5d63
commit 7fb8a9a427
2 changed files with 8 additions and 0 deletions
+7
View File
@@ -37,6 +37,7 @@ class CmdCheckout(CmdBase):
force=self.args.force,
relink=self.args.relink,
recursive=self.args.recursive,
allow_missing=self.args.allow_missing,
)
except CheckoutError as _exc:
exc = _exc
@@ -101,6 +102,12 @@ def add_parser(subparsers, parent_parser):
default=False,
help="Recreate links or copies from cache to workspace.",
)
checkout_parser.add_argument(
"--allow-missing",
action="store_true",
default=False,
help="Ignore errors if some of the files or directories are missing.",
)
checkout_parser.add_argument(
"targets",
nargs="*",
+1
View File
@@ -16,6 +16,7 @@ def test_checkout(tmp_dir, dvc, mocker):
recursive=False,
relink=True,
with_deps=True,
allow_missing=False,
)