Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 13 additions & 14 deletions workspaces/arborist/lib/arborist/rebuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,27 +136,26 @@ module.exports = cls => class Builder extends cls {
process.emit('time', `build:${type}`)

await this[_buildQueues](nodes)
if (!this[_ignoreScripts]) {
await this[_runScripts]('preinstall')
}
if (this[_binLinks] && type !== 'links') {
await this[_linkAllBins]()
}

// links should also run prepare scripts and only link bins after that
if (type === 'links') {
// links should run prepare scripts and only link bins after that
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the comment sounds off now 🤔 maybe just remove it

if (type !== 'links') {
if (!this[_ignoreScripts]) {
await this[_runScripts]('preinstall')
}
if (this[_binLinks]) {
await this[_linkAllBins]()
}
if (!this[_ignoreScripts]) {
await this[_runScripts]('install')
await this[_runScripts]('postinstall')
}
} else {
await this[_runScripts]('prepare')

if (this[_binLinks]) {
await this[_linkAllBins]()
}
}

if (!this[_ignoreScripts]) {
await this[_runScripts]('install')
await this[_runScripts]('postinstall')
}

process.emit('timeEnd', `build:${type}`)
}

Expand Down