Skip to content

Commit c4a83e8

Browse files
rashil2000se35710
authored andcommitted
refactor(COMSPEC): Deprecate use of subshell cmd.exe (ScoopInstaller#4692)
1 parent 28ca55c commit c4a83e8

4 files changed

Lines changed: 2 additions & 12 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
- **depends:** Keep bucket in 'Get-Dependency()' ([#4673](https://github.com/ScoopInstaller/Scoop/issues/4673))
3232
- **mklink:** Use 'New-Item' instead of 'mklink' ([#4690](https://github.com/ScoopInstaller/Scoop/issues/4690))
3333
- **rmdir:** Use 'Remove-Item' instead of 'rmdir' ([#4691](https://github.com/ScoopInstaller/Scoop/issues/4691))
34+
- **COMSPEC:** Deprecate use of subshell cmd.exe ([#4692](https://github.com/ScoopInstaller/Scoop/pull/4692))
3435

3536
### Builds
3637

lib/diagnostic.ps1

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,3 @@ function check_long_paths {
5555
return $true
5656
}
5757

58-
function check_envs_requirements {
59-
if ($null -eq $env:COMSPEC) {
60-
warn '$env:COMSPEC environment variable is missing.'
61-
Write-Host " By default the variable should point to the cmd.exe in Windows: '%SystemRoot%\system32\cmd.exe'."
62-
63-
return $false
64-
}
65-
66-
return $true
67-
}

lib/git.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ function git_proxy_cmd {
44
if($proxy -and $proxy -ne 'none') {
55
$cmd = "SET HTTPS_PROXY=$proxy&&SET HTTP_PROXY=$proxy&&$cmd"
66
}
7-
& "$env:COMSPEC" /d /c $cmd
7+
cmd.exe /d /c $cmd
88
}
99

1010
function git_clone {

libexec/scoop-checkup.ps1

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ $issues += !(check_windows_defender $false)
1212
$issues += !(check_windows_defender $true)
1313
$issues += !(check_main_bucket)
1414
$issues += !(check_long_paths)
15-
$issues += !(check_envs_requirements)
1615

1716
if (!(Test-HelperInstalled -Helper 7zip)) {
1817
error "'7-Zip' is not installed! It's required for unpacking most programs. Please Run 'scoop install 7zip' or 'scoop install 7zip-zstd'."

0 commit comments

Comments
 (0)