Skip to content

Commit

Permalink
feat: adds environment variable to allow PowerShell executable to be …
Browse files Browse the repository at this point in the history
…specified
  • Loading branch information
brianpursley committed Oct 5, 2021
1 parent 0a67dcd commit e8b39d4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/find-visualstudio.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@ VisualStudioFinder.prototype = {
findVisualStudio2017OrNewer: function findVisualStudio2017OrNewer (cb) {
var ps = path.join(process.env.SystemRoot, 'System32',
'WindowsPowerShell', 'v1.0', 'powershell.exe')
if (process.env.NODE_GYP_POWERSHELL_PATH) {
ps = path.resolve(process.env.NODE_GYP_POWERSHELL_PATH)
this.addLog('PowerShell path has been set by NODE_GYP_POWERSHELL_PATH:', ps)
}
var csFile = path.join(__dirname, 'Find-VisualStudio.cs')
var psArgs = [
'-ExecutionPolicy',
Expand Down

0 comments on commit e8b39d4

Please sign in to comment.