From 1df5dea351ee073e999215bfae68e089d8dc9ebc Mon Sep 17 00:00:00 2001 From: "Mr. Outis" Date: Mon, 18 Mar 2019 19:51:58 -0600 Subject: [PATCH] cache: provide at least one value in parser Fix #1747 --- dvc/command/cache.py | 1 - tests/test_cache.py | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/dvc/command/cache.py b/dvc/command/cache.py index 3a3a974d9..42edab5cd 100644 --- a/dvc/command/cache.py +++ b/dvc/command/cache.py @@ -53,7 +53,6 @@ def add_parser(subparsers, parent_parser): ) cache_dir_parser.add_argument( "value", - nargs="?", default=None, help="Path to cache directory. Relative paths are resolved relative " "to the current directory and saved to config relative to the " diff --git a/tests/test_cache.py b/tests/test_cache.py index 5fb620225..26a896aff 100644 --- a/tests/test_cache.py +++ b/tests/test_cache.py @@ -128,6 +128,10 @@ class TestCacheLinkType(TestDvc): class TestCmdCacheDir(TestDvc): + def test(self): + ret = main(["cache", "dir"]) + self.assertEqual(ret, 254) + def test_abs_path(self): dname = os.path.join(os.path.dirname(self._root_dir), "dir") ret = main(["cache", "dir", dname])