Remove --skip-version-validation option before passing the args on (#3386)

This commit is contained in:
Jaroslav Tulach 2022-04-08 04:20:51 +02:00 committed by GitHub
parent bade0c31de
commit 1b829e0a1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

5
run
View File

@ -13,7 +13,8 @@ let args = process.argv.slice(2)
let skip_validation = '--skip-version-validation'
async function init () {
if(!args.includes(skip_validation)) {
let skipValidationIndex = args.indexOf(skip_validation)
if (skip_validation === -1) {
cmd.section('Version Validation')
console.log("Use the `" + skip_validation + "` flag to skip it.")
console.log("Querying npm for the latest LTS versions.")
@ -24,6 +25,8 @@ async function init () {
await cmd.check_version('rustc','1.61.0-nightly',{
preprocess:(v)=>v.substring(6,20)
})
} else {
args.splice(skipValidationIndex, 1)
}
let initialized = fss.existsSync(paths.dist.buildInit)