fix(scripts): find target folder near by node_modules folder
This commit is contained in:
parent
aa4f0661b3
commit
3b48e464cb
2 changed files with 3 additions and 17 deletions
scripts
|
@ -6,7 +6,6 @@ const os = require('os')
|
|||
const toml = require('toml')
|
||||
const fs = require('fs')
|
||||
|
||||
|
||||
let tomlContentString
|
||||
let tomlContent
|
||||
let moduleName
|
||||
|
@ -74,8 +73,10 @@ if (!parsedDist.ext) {
|
|||
subcommand = `${subcommand}.node`
|
||||
}
|
||||
|
||||
const pos = __dirname.indexOf('node_modules')
|
||||
|
||||
const dylibContent = fs.readFileSync(path.join(
|
||||
process.cwd(),
|
||||
__dirname.substring(0, pos),
|
||||
'target',
|
||||
targetDir,
|
||||
`${dylibName}${libExt}`,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue