Skip to content

Commit 1b1f8f9

Browse files
committed
ui: error out for meaningless options for non-cloud dvc status
1 parent 0ad3548 commit 1b1f8f9

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

dvc/repo/status.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import logging
2+
from itertools import compress
23

34
from funcy.py3 import cat
45

6+
from dvc.exceptions import DvcException
57
from . import locked
68

79

@@ -113,4 +115,15 @@ def status(
113115
remote=remote,
114116
all_tags=all_tags,
115117
)
118+
119+
ignored = list(
120+
compress(
121+
["--all-branches", "--all-tags", "--jobs"],
122+
[all_branches, all_tags, jobs],
123+
)
124+
)
125+
if ignored:
126+
msg = "the following options are meaningless for local status: {}"
127+
raise DvcException(msg.format(", ".join(ignored)))
128+
116129
return _local_status(self, targets, with_deps=with_deps)

0 commit comments

Comments
 (0)