Skip to content

Commit

Permalink
Print paths when non-ghar symlinks encountered
Browse files Browse the repository at this point in the history
Added extra path information when a non-ghar symlink is found so that user can understand where the problem is.

Before this commit it read: ".bashrc: can't handle non-ghar symlinks."
After this commit it reads: "Linking ~/.bashrc to ~/Projects/ghar/ghar/.bashrc: can't handle non-ghar symlinks."
  • Loading branch information
Ian2020 authored and philips committed Sep 29, 2019
1 parent 8193652 commit 6ab4f46
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/ghar
Expand Up @@ -199,7 +199,8 @@ class Repo:
new_path = os.path.join(path, fname)
dir_links += self.list_directory_links(new_path)
elif link_status.startswith("link to "):
print ("%s: can't handle non-ghar symlinks." % fname)
print ("Linking %s to %s: can't handle non-ghar symlinks." %
(link, os.path.join(path, fname)))
else:
dir_links.append(Link(os.path.join(path, fname), base=self.path, ignore=self.ignore))
return dir_links
Expand Down

0 comments on commit 6ab4f46

Please sign in to comment.