mirror of
https://github.com/ChrisTitusTech/winutil
synced 2026-02-05 07:20:09 +00:00
Comment Spacing, Indentation, and Capitalization (#1084)
* Comment Spacing, Indentation, and Capitalization * Comment Grammar and Spacing Makes grammar in comments better and more consistent Adds space before comment and centers word in `Write-Host` commands * More Grammar and Formatting * Add some comments * Populate PlaceHolder comments in functions Files I found that has issues: Get-WinUtilRegistry.ps1 Install-WinUtilWinget.ps1 Invoke-WinUtilDarkMode.ps1 Remove-WinUtilAPPX.ps1 Test-WinUtilPackageManager.ps1 Update-WinUtilProgramWinget.ps1 Invoke-WPFUpdatessecurity.ps1 * Tweak a few more comments * Tweak another write-host statement * Undo Catch statement adjustment It's outside of the scope of this pull request
This commit is contained in:
@@ -7,23 +7,24 @@ function Install-WinUtilChoco {
|
||||
|
||||
#>
|
||||
|
||||
try {
|
||||
try{
|
||||
Write-Host "Checking if Chocolatey is Installed..."
|
||||
|
||||
if((Test-WinUtilPackageManager -choco)){
|
||||
Write-Host "Chocolatey Already Installed"
|
||||
return
|
||||
}
|
||||
|
||||
Write-Host "Seems Chocolatey is not installed, installing now"
|
||||
Set-ExecutionPolicy Bypass -Scope Process -Force; Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) -ErrorAction Stop
|
||||
powershell choco feature enable -n allowGlobalConfirmation
|
||||
|
||||
|
||||
Write-Host "Seems Chocolatey is not installed, installing now?"
|
||||
# Let user decide if they want to install Chocolatey
|
||||
$confirmation = Read-Host "Are you Sure You Want To Proceed:(y/n)"
|
||||
if ($confirmation -eq 'y') {
|
||||
Set-ExecutionPolicy Bypass -Scope Process -Force; Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) -ErrorAction Stop
|
||||
powershell choco feature enable -n allowGlobalConfirmation
|
||||
}
|
||||
}
|
||||
Catch {
|
||||
Write-Host "==========================================="
|
||||
Write-Host "-- Chocolatey failed to install ---"
|
||||
Write-Host "==========================================="
|
||||
Catch{
|
||||
throw [ChocoFailedInstall]::new('Failed to install')
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user