mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
+1
-1
@@ -59,7 +59,7 @@ def init(root_dir=os.curdir, no_scm=False, force=False):
|
||||
Raises:
|
||||
KeyError: Raises an exception.
|
||||
"""
|
||||
root_dir = os.path.abspath(root_dir)
|
||||
root_dir = os.path.realpath(root_dir)
|
||||
dvc_dir = os.path.join(root_dir, Repo.DVC_DIR)
|
||||
scm = SCM(root_dir)
|
||||
if isinstance(scm, NoSCM) and not no_scm:
|
||||
|
||||
@@ -42,10 +42,10 @@ class Git(Base):
|
||||
from git.exc import InvalidGitRepositoryError
|
||||
|
||||
try:
|
||||
self.git = git.Repo(root_dir)
|
||||
self.git = git.Repo(self.root_dir)
|
||||
except InvalidGitRepositoryError:
|
||||
msg = "{} is not a git repository"
|
||||
raise SCMError(msg.format(root_dir))
|
||||
raise SCMError(msg.format(self.root_dir))
|
||||
|
||||
# NOTE: fixing LD_LIBRARY_PATH for binary built by PyInstaller.
|
||||
# http://pyinstaller.readthedocs.io/en/stable/runtime-information.html
|
||||
|
||||
Reference in New Issue
Block a user