Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

different error msg for svn or git not in path #7194

Merged
merged 1 commit into from Jun 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions conans/client/tools/scm.py
Expand Up @@ -15,8 +15,8 @@
pyinstaller_bundle_env_cleaned


def _check_repo(cmd, folder, msg=None):
msg = msg or "Not a valid '{}' repository".format(cmd[0])
def _check_repo(cmd, folder):
msg = "Not a valid '{0}' repository or '{0}' not found.".format(cmd[0])
try:
ret = muted_runner(cmd, folder=folder)
except Exception:
Expand Down
10 changes: 5 additions & 5 deletions conans/test/unittests/client/tools/scm/test_git.py
Expand Up @@ -394,16 +394,16 @@ def test_in_branch_with_tag(self):
self.assertIsNone(tag)

def test_get_tag_no_git_repo(self):
"""
Try to get tag out of a git repo
"""
# Try to get tag out of a git repo
git = Git(folder=temp_folder())
with six.assertRaisesRegex(self, ConanException, "Not a valid 'git' repository"):
with six.assertRaisesRegex(self, ConanException,
"Not a valid 'git' repository or 'git' not found"):
git.get_tag()

def test_excluded_files(self):
folder = temp_folder()
save(os.path.join(folder, "file"), "some contents")
git = Git(folder)
with tools.environment_append({"PATH": ""}):
git.excluded_files()
excluded = git.excluded_files()
self.assertEqual(excluded, [])