mirror of
https://github.com/RGBCube/nu_scripts
synced 2025-08-02 15:17:47 +00:00
use $env.
instead of let-env
(#543)
related to nushell/nushell#9574 Commands used ```nushell sd --string-mode "let-env " '$env.' **/* git rst before_v0.60/ ```
This commit is contained in:
parent
c37fd0449f
commit
a61256da0e
32 changed files with 98 additions and 98 deletions
|
@ -1,5 +1,5 @@
|
|||
export-env {
|
||||
let-env MSVS_BASE_PATH = $env.Path
|
||||
$env.MSVS_BASE_PATH = $env.Path
|
||||
|
||||
let info = (
|
||||
if not (which vswhere | is-empty) {
|
||||
|
@ -9,9 +9,9 @@ export-env {
|
|||
}
|
||||
)
|
||||
|
||||
let-env MSVS_ROOT = ($info.installationPath.0 | str replace -a '\\' '/')
|
||||
$env.MSVS_ROOT = ($info.installationPath.0 | str replace -a '\\' '/')
|
||||
|
||||
let-env MSVS_MSVC_ROOT = (
|
||||
$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) {
|
||||
|
@ -20,13 +20,13 @@ export-env {
|
|||
((ls $"($env.MSVS_ROOT)/VC/Tools/MSVC/*").name.0 | str replace -a '\\' '/')
|
||||
})
|
||||
|
||||
let-env MSVS_MSDK_ROOT = (REG QUERY 'HKLM\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0' /v "InstallationFolder" | str replace '(.|\n)+REG_SZ\s+(.+)' "$2")
|
||||
let-env MSVS_MSDK_ROOT = ($env.MSVS_MSDK_ROOT | str replace -a '\\' '/')
|
||||
$env.MSVS_MSDK_ROOT = (REG QUERY 'HKLM\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0' /v "InstallationFolder" | str replace '(.|\n)+REG_SZ\s+(.+)' "$2")
|
||||
$env.MSVS_MSDK_ROOT = ($env.MSVS_MSDK_ROOT | str replace -a '\\' '/')
|
||||
|
||||
let-env MSVS_MSDK_VER = (REG QUERY 'HKLM\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0' /v "ProductVersion" | str replace '(.|\n)+REG_SZ\s+(.+)' "$2")
|
||||
let-env MSVS_MSDK_VER = $"($env.MSVS_MSDK_VER).0"
|
||||
$env.MSVS_MSDK_VER = (REG QUERY 'HKLM\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0' /v "ProductVersion" | str replace '(.|\n)+REG_SZ\s+(.+)' "$2")
|
||||
$env.MSVS_MSDK_VER = $"($env.MSVS_MSDK_VER).0"
|
||||
|
||||
let-env MSVS_INCLUDE_PATH = ([
|
||||
$env.MSVS_INCLUDE_PATH = ([
|
||||
$"($env.MSVS_ROOT)/Include/($env.MSVS_MSDK_VER)/cppwinrt/winrt",
|
||||
$"($env.MSVS_MSVC_ROOT)/include",
|
||||
$"($env.MSVS_MSDK_ROOT)Include/($env.MSVS_MSDK_VER)/cppwinrt/winrt",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue