check where pathspec error comes from