File tree Expand file tree Collapse file tree 1 file changed +13
-14
lines changed
workspaces/arborist/lib/arborist Expand file tree Collapse file tree 1 file changed +13
-14
lines changed Original file line number Diff line number Diff line change @@ -136,27 +136,26 @@ module.exports = cls => class Builder extends cls {
136
136
process . emit ( 'time' , `build:${ type } ` )
137
137
138
138
await this [ _buildQueues ] ( nodes )
139
- if ( ! this [ _ignoreScripts ] ) {
140
- await this [ _runScripts ] ( 'preinstall' )
141
- }
142
- if ( this [ _binLinks ] && type !== 'links' ) {
143
- await this [ _linkAllBins ] ( )
144
- }
145
-
146
- // links should also run prepare scripts and only link bins after that
147
- if ( type === 'links' ) {
139
+ // links should run prepare scripts and only link bins after that
140
+ if ( type !== 'links' ) {
141
+ if ( ! this [ _ignoreScripts ] ) {
142
+ await this [ _runScripts ] ( 'preinstall' )
143
+ }
144
+ if ( this [ _binLinks ] ) {
145
+ await this [ _linkAllBins ] ( )
146
+ }
147
+ if ( ! this [ _ignoreScripts ] ) {
148
+ await this [ _runScripts ] ( 'install' )
149
+ await this [ _runScripts ] ( 'postinstall' )
150
+ }
151
+ } else {
148
152
await this [ _runScripts ] ( 'prepare' )
149
153
150
154
if ( this [ _binLinks ] ) {
151
155
await this [ _linkAllBins ] ( )
152
156
}
153
157
}
154
158
155
- if ( ! this [ _ignoreScripts ] ) {
156
- await this [ _runScripts ] ( 'install' )
157
- await this [ _runScripts ] ( 'postinstall' )
158
- }
159
-
160
159
process . emit ( 'timeEnd' , `build:${ type } ` )
161
160
}
162
161
You can’t perform that action at this time.
0 commit comments