From 87f7ddf4492710408d938938358edf881b2d66fb Mon Sep 17 00:00:00 2001 From: David Refoua Date: Sun, 16 Oct 2022 16:13:26 +0330 Subject: [PATCH] formatting and case conventions --- scripts/pack.ps1 | 2 +- scripts/utils.ps1 | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/pack.ps1 b/scripts/pack.ps1 index be5df37..6cdd376 100644 --- a/scripts/pack.ps1 +++ b/scripts/pack.ps1 @@ -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 } diff --git a/scripts/utils.ps1 b/scripts/utils.ps1 index ca22479..4cfb477 100644 --- a/scripts/utils.ps1 +++ b/scripts/utils.ps1 @@ -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 }