formatting and case conventions

This commit is contained in:
David Refoua 2022-10-16 16:13:26 +03:30
parent d94fe86b2a
commit 87f7ddf449
2 changed files with 4 additions and 4 deletions

View File

@ -52,7 +52,7 @@ Push-Location -Path $cmderRoot
Delete-Existing "$cmderRoot\Version*"
Delete-Existing "$cmderRoot\build\*"
If(-not (Test-Path -PathType container $saveTo)) {
if (-not (Test-Path -PathType container $saveTo)) {
(New-Item -ItemType Directory -Path $saveTo) | Out-Null
}

View File

@ -9,13 +9,13 @@ function Ensure-Exists($path) {
function Ensure-Executable($command) {
try { Get-Command $command -ErrorAction Stop > $null }
catch {
If( ($command -eq "7z") -and (Test-Path "$env:programfiles\7-zip\7z.exe") ){
if( ($command -eq "7z") -and (Test-Path "$env:programfiles\7-zip\7z.exe") ){
Set-Alias -Name "7z" -Value "$env:programfiles\7-zip\7z.exe" -Scope script
}
ElseIf( ($command -eq "7z") -and (Test-Path "$env:programw6432\7-zip\7z.exe") ) {
elseif( ($command -eq "7z") -and (Test-Path "$env:programw6432\7-zip\7z.exe") ) {
Set-Alias -Name "7z" -Value "$env:programw6432\7-zip\7z.exe" -Scope script
}
Else {
else {
Write-Error "Missing $command! Ensure it is installed and on in the PATH"
exit 1
}