File: env.ps1

package info (click to toggle)
neovim 0.11.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 64,320 kB
  • sloc: ansic: 264,714; python: 1,472; lisp: 1,237; sh: 1,137; makefile: 383; xml: 85; ruby: 6
file content (17 lines) | stat: -rw-r--r-- 721 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# This script enables Developer Command Prompt
# See https://github.com/microsoft/vswhere/wiki/Start-Developer-Command-Prompt#using-powershell
if ($env:BUILD_ARCH -eq "arm64") {
  $arch = "arm64"
  $installationPath = vswhere.exe -latest -requires Microsoft.VisualStudio.Component.VC.Tools.arm64 -property installationPath
} else {
  $arch = "x64"
  $installationPath = vswhere.exe -latest -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath
}

if ($installationPath) {
  & "${env:COMSPEC}" /s /c "`"$installationPath\Common7\Tools\vsdevcmd.bat`" -arch=$arch -no_logo && set" |
    ForEach-Object {
      $name, $value = $_ -split '=', 2
      "$name=$value" >> $env:GITHUB_ENV
    }
}