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 {
136136 process . emit ( 'time' , `build:${ type } ` )
137137
138138 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 {
148152 await this [ _runScripts ] ( 'prepare' )
149153
150154 if ( this [ _binLinks ] ) {
151155 await this [ _linkAllBins ] ( )
152156 }
153157 }
154158
155- if ( ! this [ _ignoreScripts ] ) {
156- await this [ _runScripts ] ( 'install' )
157- await this [ _runScripts ] ( 'postinstall' )
158- }
159-
160159 process . emit ( 'timeEnd' , `build:${ type } ` )
161160 }
162161
You can’t perform that action at this time.
0 commit comments