Skip to content

Commit

Permalink
win: run PS with -NoProfile
Browse files Browse the repository at this point in the history
PR-URL: nodejs#1292
Refs: nodejs#1195 (comment)
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
  • Loading branch information
refack committed Sep 19, 2017
1 parent 7245415 commit 63f43c2
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 63f43c2

Please sign in to comment.