system: add a better message if symlink failed

This commit is contained in:
Ruslan Kuprieiev
2018-11-07 21:21:45 +02:00
committed by GitHub
parent 3700fbf99d
commit 7e1b584479
+2 -1
View File
@@ -38,7 +38,8 @@ class System(object):
os.symlink(source, link_name)
return
except Exception as exc:
raise DvcException('symlink', cause=exc)
msg = "Failed to symlink '{}' -> '{}': {}"
raise DvcException(msg.format(source, link_name, str(exc)))
flags = 0
if source is not None and os.path.isdir(source):