2020-10-02 17:52:19 -04:00
|
|
|
const isWindows = require('./is-windows.js')
|
|
|
|
const getPrefix = require('./get-prefix.js')
|
|
|
|
const getNodeModules = require('./get-node-modules.js')
|
2022-01-20 22:08:53 +00:00
|
|
|
const { dirname } = require('path')
|
2020-10-02 17:52:19 -04:00
|
|
|
|
2022-01-20 22:08:53 +00:00
|
|
|
module.exports = ({ top, path }) =>
|
2020-10-02 17:52:19 -04:00
|
|
|
!top ? getNodeModules(path) + '/.bin'
|
2022-01-20 22:08:53 +00:00
|
|
|
: isWindows ? getPrefix(path)
|
|
|
|
: dirname(getPrefix(path)) + '/bin'
|