shelljs/shelljs

which() should not call path.resolve()

Open

#658 aberto em 10 de fev. de 2017

Ver no GitHub
 (1 comment) (0 reactions) (0 assignees)JavaScript (777 forks)batch import
breakingfixhelp wantedtest coverage

Métricas do repositório

Stars
 (14.062 stars)
Métricas de merge de PR
 (Mesclagem média 3d 12h) (2 fundiu PRs em 30d)

Description

Not sure why we're calling path.resolve() on this line, but I don't think it's correct.

If we're given a correct absolute path, then we should return the absolute path. If we're given a correct relative path, we should return the same relative path. path.resolve() makes it so we're always returning an absolute path.

This is verified on Linux (both bash and zsh).

Guia do colaborador