improve conflict error messages, add -v to usage
This commit is contained in:
@@ -63,9 +63,9 @@ func linkFile(src, dst string) error {
|
||||
if current == src {
|
||||
return nil
|
||||
}
|
||||
return fmt.Errorf("conflict at %s (points to %s)", dst, current)
|
||||
return fmt.Errorf("conflict at %s (symlink points to %s, expected %s). Run 'sigil unlink %s' to restore and remove the conflicting link", dst, current, src, dst)
|
||||
}
|
||||
return fmt.Errorf("conflict at %s (exists and is not a symlink)", dst)
|
||||
return fmt.Errorf("conflict at %s (file exists and is not a symlink). Back up or remove this file first", dst)
|
||||
} else if !errors.Is(err, os.ErrNotExist) {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user