File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
modules/virtual_environments/nu_msvs Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ def --env find_msvs [] {
22 export-env {
33 $env .MSVS_BASE_PATH = $env .Path
44 $env .PATH_VAR = (if " Path" in $env { " Path" } else { " PATH" })
5+ $env .INCLUDE_BEFORE = ($env .INCLUDE | split row (char esep ))
56
67 # According to https://github.com/microsoft/vswhere/wiki/Installing, vswhere should always be in this location.
78 let vswhere_cmd = ($' ($env . " ProgramFiles(x86)" )\Microsoft Visual Studio\Installer\vswhere.exe' )
@@ -37,7 +38,7 @@ def --env find_msvs [] {
3738 $' ($env .MSVS_MSDK_ROOT )Include\($env .MSVS_MSDK_VER )\ucrt' ,
3839 $' ($env .MSVS_MSDK_ROOT )Include\($env .MSVS_MSDK_VER )\um' ,
3940 $' ($env .MSVS_MSDK_ROOT )Include\($env .MSVS_MSDK_VER )\winrt'
40- ] | str join (char esep ))
41+ ] | append $env .INCLUDE_BEFORE | str join (char esep ))
4142
4243 let esep_path_converter = {
4344 from_string : { |s | $s | split row (char esep ) }
@@ -179,10 +180,11 @@ export def --env deactivate [] {
179180
180181 load-env {
181182 $env .PATH_VAR : $env .MSVS_BASE_PATH ,
183+ INCLUDE : ($env .INCLUDE_BEFORE | path expand | str join (char esep )),
182184 }
183185
184- hide-env INCLUDE
185186 hide-env LIB
187+ hide-env INCLUDE_BEFORE
186188 hide-env MSVS_BASE_PATH
187189 hide-env MSVS_ROOT
188190 hide-env MSVS_MSVC_ROOT
You can’t perform that action at this time.
0 commit comments