Skip to content

Commit 90d8651

Browse files
refackbnoordhuis
authored andcommitted
win: run PS with -NoProfile
PR-URL: #1292 Refs: #1195 (comment) Reviewed-By: Ben Noordhuis <[email protected]>
1 parent 2da5f86 commit 90d8651

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/find-vs2017.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ function findVS2017(callback) {
66
var ps = path.join(process.env.SystemRoot, 'System32', 'WindowsPowerShell',
77
'v1.0', 'powershell.exe')
88
var csFile = path.join(__dirname, 'Find-VS2017.cs')
9-
var psArgs = ['-ExecutionPolicy', 'Unrestricted', '-Command',
10-
'&{Add-Type -Path \'' + csFile +
11-
'\'; [VisualStudioConfiguration.Main]::Query()}']
9+
var psArgs = ['-ExecutionPolicy', 'Unrestricted', '-NoProfile',
10+
'-Command', '&{Add-Type -Path \'' + csFile + '\';' +
11+
'[VisualStudioConfiguration.Main]::Query()}']
1212

1313
log.silly('find vs2017', 'Running', ps, psArgs)
1414
var child = execFile(ps, psArgs, { encoding: 'utf8' },

0 commit comments

Comments
 (0)