build: pass through value of unknown flag as well as the flag to make --grep work again (#17485)
This commit is contained in:
parent
a16dc13f85
commit
d2ad8efef4
1 changed files with 11 additions and 2 deletions
|
@ -5,13 +5,22 @@ const crypto = require('crypto')
|
||||||
const fs = require('fs')
|
const fs = require('fs')
|
||||||
const { hashElement } = require('folder-hash')
|
const { hashElement } = require('folder-hash')
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
const unknownArgs = []
|
const unknownFlags = []
|
||||||
|
|
||||||
const args = require('minimist')(process.argv, {
|
const args = require('minimist')(process.argv, {
|
||||||
string: ['runners'],
|
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 utils = require('./lib/utils')
|
||||||
|
|
||||||
const BASE = path.resolve(__dirname, '../..')
|
const BASE = path.resolve(__dirname, '../..')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue