-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
repo: raise exception if root_dir is not a directory path (#3295)
* repo: throw if root_dir in Repo.__init__() is not a directory path When Repo is instantiated with invalid urls such as 'http://github.com/iterative/dvc.git', it does os.path.realpath which is not intelligent enough and just concatenates with current working directory, which is then traversed outward. It might happen that the outward folder is a dvc directory which is not really what we want. So, a check for root to be a directory is added. Otherwise, NotDvcRepoError is thrown with a custom message. * repo: set message from raise for NotDvcRepoError
- Loading branch information
Showing
2 changed files
with
15 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters