mirror of
https://github.com/ChrisTitusTech/winutil
synced 2026-02-05 15:30: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:
@@ -1,9 +1,9 @@
|
||||
function Get-LatestHash {
|
||||
$shaUrl = ((Invoke-WebRequest $apiLatestUrl -UseBasicParsing | ConvertFrom-Json).assets | Where-Object { $_.name -match '^Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.txt$' }).browser_download_url
|
||||
|
||||
|
||||
$shaFile = Join-Path -Path $tempFolder -ChildPath 'Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.txt'
|
||||
$WebClient.DownloadFile($shaUrl, $shaFile)
|
||||
|
||||
|
||||
Get-Content $shaFile
|
||||
}
|
||||
|
||||
@@ -14,8 +14,6 @@ function Install-WinUtilWinget {
|
||||
.SYNOPSIS
|
||||
Installs Winget if it is not already installed
|
||||
|
||||
.DESCRIPTION
|
||||
This function will download the latest version of winget and install it. If winget is already installed, it will do nothing.
|
||||
#>
|
||||
Try{
|
||||
Write-Host "Checking if Winget is Installed..."
|
||||
@@ -40,8 +38,8 @@ function Install-WinUtilWinget {
|
||||
}
|
||||
|
||||
Write-Host "Running Alternative Installer and Direct Installing"
|
||||
Start-Process -Verb runas -FilePath powershell.exe -ArgumentList "choco install winget"
|
||||
|
||||
Start-Process -Verb runas -FilePath powershell.exe -ArgumentList "irm https://raw.githubusercontent.com/ChrisTitusTech/winutil/main/winget.ps1 | iex"
|
||||
|
||||
Write-Host "Winget Installed"
|
||||
}
|
||||
Catch{
|
||||
|
||||
Reference in New Issue
Block a user