From 33752d99f9eb9c60958c8cc2e330cbe2d0675d14 Mon Sep 17 00:00:00 2001 From: James Upjohn Date: Thu, 15 Jul 2021 21:41:23 +1200 Subject: [PATCH] chore(installer-pwsh): replace tabs with spaces --- Install.ps1 | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/Install.ps1 b/Install.ps1 index 9730f27..a7eb91f 100644 --- a/Install.ps1 +++ b/Install.ps1 @@ -83,9 +83,9 @@ function Check-LeptonInstallFiles { param ([string[]]$Files) foreach ($item in $Files) { - if (-not (Test-Path $item)) { - return $false - } + if (-not (Test-Path $item)) { + return $false + } } return $true @@ -105,9 +105,9 @@ function Get-LeptonInstallType { $IsTypeRelease = Check-LeptonInstallFiles $ReleaseFiles if ($IsTypeLocal) { - return $InstallType.Local + return $InstallType.Local } elseif ($IsTypeRelease) { - return $InstallType.Release + return $InstallType.Release } return $InstallType.Network @@ -123,14 +123,14 @@ function Select-LeptonDistributionPrompt { $SelectedBranch = "" while ($SelectedBranch -eq "") { - $SelectedInput = Read-Host "Enter a distribution number (1, 2, 3)" - - switch ($SelectedInput) { - "1" { $SelectedBranch = "master"; break } - "2" { $SelectedBranch = "photon-style"; break } - "3" { $SelectedBranch = "proton-style"; break } - default { Write-Host "Invalid option, reselect please." } - } + $SelectedInput = Read-Host "Enter a distribution number (1, 2, 3)" + + switch ($SelectedInput) { + "1" { $SelectedBranch = "master"; break } + "2" { $SelectedBranch = "photon-style"; break } + "3" { $SelectedBranch = "proton-style"; break } + default { Write-Host "Invalid option, reselect please." } + } } Write-Host "" @@ -144,22 +144,22 @@ function Select-LeptonDistribution { $FoundInstallType = Get-LeptonInstallType switch ($FoundInstallType) { - $InstallType.Release { break } - $InstallType.Network { $SelectedDistribution = Select-LeptonDistributionPrompt; break } - $InstallType.Local { - $SelectedDistribution = Select-LeptonDistributionPrompt - $GitInstalled=$((Get-Command -ErrorAction SilentlyContinue "git").Length -eq 0) - if ($GitInstalled && Test-Path ".git" && $PSCmdlet.ShouldProcess(".git")) { - git checkout $LeptonBranchName - } - break - } - default { throw } + $InstallType.Release { break } + $InstallType.Network { $SelectedDistribution = Select-LeptonDistributionPrompt; break } + $InstallType.Local { + $SelectedDistribution = Select-LeptonDistributionPrompt + $GitInstalled=$((Get-Command -ErrorAction SilentlyContinue "git").Length -eq 0) + if ($GitInstalled && Test-Path ".git" && $PSCmdlet.ShouldProcess(".git")) { + git checkout $LeptonBranchName + } + break + } + default { throw } } return @{ - Type = $InstallType.Network; - Dist = $SelectedDistribution; + Type = $InstallType.Network; + Dist = $SelectedDistribution; } }