Skip to content

Commit

Permalink
[Fix] fix npx resolve by handling symlinks
Browse files Browse the repository at this point in the history
Fixes #315
  • Loading branch information
ljharb committed Sep 14, 2023
1 parent 98bd83b commit 6f96aee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/resolve
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ if (
!process.argv
|| process.argv.length < 2
|| (process.argv[1] !== __filename && fs.statSync(process.argv[1]).ino !== fs.statSync(__filename).ino)
|| (process.env._ && path.resolve(process.env._) !== __filename)
|| (process.env._ && fs.realpathSync(path.resolve(process.env._)) !== __filename)
)
) {
console.error('Error: `resolve` must be run directly as an executable');
Expand Down

0 comments on commit 6f96aee

Please sign in to comment.