aboutsummaryrefslogtreecommitdiffstats
path: root/dotfiles/repository.py
diff options
context:
space:
mode:
Diffstat (limited to 'dotfiles/repository.py')
-rw-r--r--dotfiles/repository.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/dotfiles/repository.py b/dotfiles/repository.py
index 474c9ba..a29c142 100644
--- a/dotfiles/repository.py
+++ b/dotfiles/repository.py
@@ -81,7 +81,11 @@ class Repository(object):
def _dotfile_target(self, path):
"""Return the expected repository target for the given symlink."""
- relpath = str(path.relative_to(self.homedir))
+ try:
+ relpath = str(path.relative_to(self.homedir))
+ except ValueError:
+ raise NotRootedInHome(path)
+
if self.remove_leading_dot:
return self.path / relpath[1:]
else: