fix: update modules/virtual_environments/nu_msvs to work with nushell 0.91.0 (#784)

Fixed the `glob` related code as mentioned in title.
This commit is contained in:
neur1n 2024-03-11 10:25:44 +08:00 committed by GitHub
parent bc6273d971
commit 7fcbf543db
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,7 @@ A module for Using Microsoft Visual Studio (MSVS) command line tools from Nushel
## Prerequisites
- [nushell](https://github.com/nushell/nushell) >= 0.83.0
- [nushell](https://github.com/nushell/nushell) >= 0.91.0
- [vswhere](https://github.com/microsoft/vswhere) standalone or comes with VS

View File

@ -14,10 +14,10 @@ export-env {
$env.MSVS_MSVC_ROOT = (
if not ($"($env.MSVS_ROOT)/VC/Tools/MSVC/" | path exists) {
""
} else if (ls $"($env.MSVS_ROOT)/VC/Tools/MSVC/*" | is-empty) {
} else if (ls ($"($env.MSVS_ROOT)/VC/Tools/MSVC/*" | into glob) | is-empty) {
""
} else {
((ls $"($env.MSVS_ROOT)/VC/Tools/MSVC/*").name.0 | str replace -a '\\' '/')
((ls ($"($env.MSVS_ROOT)/VC/Tools/MSVC/*" | into glob)).name.0 | str replace -a '\\' '/')
})
$env.MSVS_MSDK_ROOT = (registry query --hklm 'SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0' InstallationFolder | get value)