Skip to content

Commit 12f32d4

Browse files
committed
apply reviews
1 parent 87142b3 commit 12f32d4

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

modules/virtual_environments/nu_msvs/nu_msvs.nu

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@ def --env find_msvs [] {
33
$env.MSVS_BASE_PATH = $env.Path
44
$env.PATH_VAR = (if "Path" in $env { "Path" } else { "PATH" })
55

6-
# This is a total hack because nushell doesn't like parentheses in an environment variable like `$env.ProgramFiles(x86)`
7-
let programfiles = $env | transpose name value | where name starts-with Program and name ends-with '(x86)' | get value.0 | str trim
86
# According to https://github.com/microsoft/vswhere/wiki/Installing, vswhere should always be in this location.
9-
let vswhere_cmd = ($'($programfiles)\Microsoft Visual Studio\Installer\vswhere.exe')
7+
let vswhere_cmd = ($'($env."ProgramFiles(x86)")\Microsoft Visual Studio\Installer\vswhere.exe')
108
let info = (
119
if ($vswhere_cmd | path exists) {
1210
(^$vswhere_cmd -prerelease -products '*' -format json -nocolor -utf8 -sort | from json)

0 commit comments

Comments
 (0)