PR-URL: https://github.com/nodejs/node/pull/41621 Reviewed-By: Ruy Adorno <ruyadorno@github.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com>
10 lines
329 B
JavaScript
10 lines
329 B
JavaScript
const isWindows = require('./is-windows.js')
|
|
const getPrefix = require('./get-prefix.js')
|
|
const getNodeModules = require('./get-node-modules.js')
|
|
const { dirname } = require('path')
|
|
|
|
module.exports = ({ top, path }) =>
|
|
!top ? getNodeModules(path) + '/.bin'
|
|
: isWindows ? getPrefix(path)
|
|
: dirname(getPrefix(path)) + '/bin'
|