mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
Merge pull request #1749 from mroutis/fix-1747
cache: provide at least one value in parser
This commit is contained in:
@@ -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 "
|
||||
|
||||
@@ -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])
|
||||
|
||||
Reference in New Issue
Block a user