Fix reading msvs version on Windows (#2644)

* fix: fix reading msvs version on windows
This commit is contained in:
James Cook 2023-06-25 08:35:41 -07:00 committed by GitHub
parent b030555cdb
commit 53c99ae573
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 2 deletions

View file

@ -38,4 +38,13 @@ describe('options', function () {
assert.strictEqual(g.opts['force-process-config'], 'true')
})
it('options with msvs_version', () => {
process.env.npm_config_msvs_version = '2017'
const g = gyp()
g.parseArgv(['rebuild']) // Also sets opts.argv.
assert.strictEqual(g.opts['msvs-version'], '2017')
})
})