File tree Expand file tree Collapse file tree 1 file changed +15
-9
lines changed Expand file tree Collapse file tree 1 file changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -93,18 +93,24 @@ async function configure (gyp, argv) {
93
93
'build dir' , '"build" dir needed to be created?' , isNew ? 'Yes' : 'No'
94
94
)
95
95
if ( win ) {
96
- let gypFormatIndex = argv . indexOf ( '-f' )
97
- if ( gypFormatIndex === - 1 ) {
98
- gypFormatIndex = argv . indexOf ( '--format' )
99
- }
100
- if ( gypFormatIndex === - 1 || ! argv [ gypFormatIndex + 1 ] || argv [ gypFormatIndex + 1 ] . startsWith ( 'msvs' ) ) {
101
- const vsInfo = await findVisualStudio ( release . semver , gyp . opts [ 'msvs-version' ] )
102
- return createConfigFile ( vsInfo )
96
+ let usingMakeGenerator = false
97
+ for ( let i = argv . length - 1 ; i >= 0 ; -- i ) {
98
+ const arg = argv [ i ]
99
+ if ( arg === '-f' || arg === '--format' ) {
100
+ const format = argv [ i + 1 ]
101
+ if ( typeof format === 'string' && format . startsWith ( 'make' ) ) {
102
+ usingMakeGenerator = true
103
+ break
104
+ }
105
+ } else if ( arg . startsWith ( '--format=make' ) ) {
106
+ usingMakeGenerator = true
107
+ break
108
+ }
103
109
}
104
110
let vsInfo = { }
105
- try {
111
+ if ( ! usingMakeGenerator ) {
106
112
vsInfo = await findVisualStudio ( release . semver , gyp . opts [ 'msvs-version' ] )
107
- } catch ( _ ) { }
113
+ }
108
114
return createConfigFile ( vsInfo )
109
115
}
110
116
return createConfigFile ( null )
You can’t perform that action at this time.
0 commit comments