зеркало из https://github.com/electron/electron.git
build: pass through value of unknown flag as well as the flag to make --grep work again (#17485)
This commit is contained in:
Родитель
a16dc13f85
Коммит
d2ad8efef4
|
@ -5,13 +5,22 @@ const crypto = require('crypto')
|
|||
const fs = require('fs')
|
||||
const { hashElement } = require('folder-hash')
|
||||
const path = require('path')
|
||||
const unknownArgs = []
|
||||
const unknownFlags = []
|
||||
|
||||
const args = require('minimist')(process.argv, {
|
||||
string: ['runners'],
|
||||
unknown: arg => unknownArgs.push(arg)
|
||||
unknown: arg => unknownFlags.push(arg)
|
||||
})
|
||||
|
||||
const unknownArgs = []
|
||||
for (const flag of unknownFlags) {
|
||||
unknownArgs.push(flag)
|
||||
const onlyFlag = flag.replace(/^-+/, '')
|
||||
if (args[onlyFlag]) {
|
||||
unknownArgs.push(args[onlyFlag])
|
||||
}
|
||||
}
|
||||
|
||||
const utils = require('./lib/utils')
|
||||
|
||||
const BASE = path.resolve(__dirname, '../..')
|
||||
|
|
Загрузка…
Ссылка в новой задаче