Skip to content

Commit

Permalink
win: run PS with -NoProfile
Browse files Browse the repository at this point in the history
PR-URL: #1292
Refs: #1195 (comment)
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
  • Loading branch information
refack authored and bnoordhuis committed Jun 8, 2018
1 parent 2da5f86 commit 90d8651
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/find-vs2017.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ function findVS2017(callback) {
var ps = path.join(process.env.SystemRoot, 'System32', 'WindowsPowerShell',
'v1.0', 'powershell.exe')
var csFile = path.join(__dirname, 'Find-VS2017.cs')
var psArgs = ['-ExecutionPolicy', 'Unrestricted', '-Command',
'&{Add-Type -Path \'' + csFile +
'\'; [VisualStudioConfiguration.Main]::Query()}']
var psArgs = ['-ExecutionPolicy', 'Unrestricted', '-NoProfile',
'-Command', '&{Add-Type -Path \'' + csFile + '\';' +
'[VisualStudioConfiguration.Main]::Query()}']

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

0 comments on commit 90d8651

Please sign in to comment.