diff --git a/bucket/gradle-bin.json b/bucket/gradle-bin.json index 337c55a8062e4..1c6a5992aca22 100644 --- a/bucket/gradle-bin.json +++ b/bucket/gradle-bin.json @@ -10,10 +10,10 @@ "hash": "544c35d6bd849ae8a5ed0bcea39ba677dc40f49df7d1835561582da2009b961d", "extract_dir": "gradle-8.7", "post_install": [ - "$current_env = env GRADLE_USER_HOME $global", + "$current_env = Get-EnvVar -Name GRADLE_USER_HOME -Global:$global", "If ($null -eq $current_env) {", " $path = \"$dir\\.gradle\"", - " env GRADLE_USER_HOME $global $path", + " Set-EnvVar -Name GRADLE_USER_HOME -Value $path -Global:$global", " $Env:GRADLE_USER_HOME = $path", " Write-Host \"Environment variable 'GRADLE_USER_HOME' set to '$path'\"", "}" diff --git a/bucket/gradle.json b/bucket/gradle.json index fb4b0eaf04939..0846fcb99fb3b 100644 --- a/bucket/gradle.json +++ b/bucket/gradle.json @@ -10,10 +10,10 @@ "hash": "194717442575a6f96e1c1befa2c30e9a4fc90f701d7aee33eb879b79e7ff05c0", "extract_dir": "gradle-8.7", "post_install": [ - "$current_env = env GRADLE_USER_HOME $global", + "$current_env = Get-EnvVar -Name GRADLE_USER_HOME -Global:$global", "If ($null -eq $current_env) {", " $path = \"$dir\\.gradle\"", - " env GRADLE_USER_HOME $global $path", + " Set-EnvVar -Name GRADLE_USER_HOME -Value $path -Global:$global", " $Env:GRADLE_USER_HOME = $path", " Write-Host \"Environment variable 'GRADLE_USER_HOME' set to '$path'\"", "}" diff --git a/bucket/python.json b/bucket/python.json index 12c2732948a2a..ce7149cb2f4fb 100644 --- a/bucket/python.json +++ b/bucket/python.json @@ -55,8 +55,8 @@ "}", "Remove-Item \"$dir\\_tmp\", \"$dir\\setup.exe\" -Force -Recurse", "if ($global) {", - " $pathext = (env 'PATHEXT' $true) -replace ';.PYW?', ''", - " env 'PATHEXT' $true \"$pathext;.PY;.PYW\"", + " $pathext = (Get-EnvVar -Name PATHEXT -Global:$true) -replace ';.PYW?', ''", + " Set-EnvVar -Name PATHEXT -Value \"$pathext;.PY;.PYW\" -Global:$true", "}" ] }, @@ -67,8 +67,8 @@ "uninstaller": { "script": [ "if ($global) {", - " $pathext = (env 'PATHEXT' $true) -replace ';.PYW?', ''", - " env 'PATHEXT' $true \"$pathext\"", + " $pathext = (Get-EnvVar -Name PATHEXT -Global:$true) -replace ';.PYW?', ''", + " Set-EnvVar -Name PATHEXT -Value \"$pathext\" -Global:$true", "}" ] }, diff --git a/bucket/tesseract.json b/bucket/tesseract.json index 343bcbd8a7c95..ce324782d5f60 100644 --- a/bucket/tesseract.json +++ b/bucket/tesseract.json @@ -20,7 +20,7 @@ "post_install": [ "$langdir = versiondir tesseract-languages current $global", "if (Test-Path $langdir) {", - " env \"TESSDATA_PREFIX\" $global $langdir", + " Set-EnvVar -Name TESSDATA_PREFIX -Value $langdir -Global:$global", "}" ], "env_set": {