shelljs/shelljs

which() should not call path.resolve()

Open

#658 aperta il 10 feb 2017

Vedi su GitHub
 (1 commento) (0 reazioni) (0 assegnatari)JavaScript (777 fork)batch import
breakingfixhelp wantedtest coverage

Metriche repository

Star
 (14.062 star)
Metriche merge PR
 (Merge medio 3g 12h) (2 PR mergiate in 30 g)

Descrizione

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).

Guida contributor