Skip to content

Commit 6eaed42

Browse files
authored
Merge pull request #2613 from AdmiringWorm/2469-Remove-deprecated-Chocolatey-helper-functions
(#2469) Remove deprecated Chocolatey helper functions
2 parents 1623e5f + b3c562a commit 6eaed42

11 files changed

+29
-371
lines changed

GenerateDocs.ps1

-10
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,6 @@ These functions call other functions and many times may be the only thing you ne
5757
* [Install-ChocolateyPowershellCommand](xref:install-chocolateypowershellcommand)
5858
* [Install-ChocolateyVsixPackage](xref:install-chocolateyvsixpackage)
5959
60-
## Error / Success Functions
61-
62-
* [Write-ChocolateySuccess](xref:write-chocolateysuccess) - **DEPRECATED**
63-
* [Write-ChocolateyFailure](xref:write-chocolateyfailure) - **DEPRECATED**
64-
65-
You really don't need a try catch with Chocolatey PowerShell files anymore.
66-
6760
## More Functions
6861
6962
### Administrative Access Functions
@@ -86,13 +79,10 @@ These are the functions from above as one list.
8679
8780
* [Install-ChocolateyZipPackage](xref:install-chocolateyzippackage)
8881
* [Install-ChocolateyPowershellCommand](xref:install-chocolateypowershellcommand)
89-
* [Write-ChocolateySuccess](xref:write-chocolateysuccess)
90-
* [Write-ChocolateyFailure](xref:write-chocolateyfailure)
9182
* [Get-ChocolateyWebFile](xref:get-chocolateywebfile)
9283
* [Get-ChocolateyUnzip](xref:get-chocolateyunzip)
9384
* [Install-ChocolateyPath](xref:install-chocolateypath) - when specifying user path
9485
* [Install-ChocolateyEnvironmentVariable](xref:install-chocolateyenvironmentvariable) - when specifying user path
95-
* [Install-ChocolateyDesktopLink](xref:install-chocolateydesktoplink) - **DEPRECATED** - see [Install-ChocolateyShortcut](xref:install-chocolateyshortcut)
9686
* [Install-ChocolateyPinnedTaskBarItem](xref:install-chocolateypinnedtaskbaritem)
9787
* [Install-ChocolateyShortcut](xref:install-chocolateyshortcut) - v0.9.9+
9888
* [Update-SessionEnvironment](xref:update-sessionenvironment)

src/chocolatey.resources/chocolatey.resources.csproj

-4
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@
6969
<EmbeddedResource Include="helpers\functions\Get-VirusCheckValid.ps1" />
7070
<EmbeddedResource Include="helpers\functions\Get-WebFile.ps1" />
7171
<EmbeddedResource Include="helpers\functions\Get-WebHeaders.ps1" />
72-
<EmbeddedResource Include="helpers\functions\Install-ChocolateyDesktopLink.ps1" />
7372
<EmbeddedResource Include="helpers\functions\Install-ChocolateyEnvironmentVariable.ps1" />
7473
<EmbeddedResource Include="helpers\functions\Install-ChocolateyExplorerMenuItem.ps1" />
7574
<EmbeddedResource Include="helpers\functions\Install-ChocolateyFileAssociation.ps1" />
@@ -85,9 +84,6 @@
8584
<EmbeddedResource Include="helpers\functions\Uninstall-ChocolateyPackage.ps1" />
8685
<EmbeddedResource Include="helpers\functions\UnInstall-ChocolateyZipPackage.ps1" />
8786
<EmbeddedResource Include="helpers\functions\Update-SessionEnvironment.ps1" />
88-
<EmbeddedResource Include="helpers\functions\Write-ChocolateyFailure.ps1" />
89-
<EmbeddedResource Include="helpers\functions\Write-ChocolateySuccess.ps1" />
90-
<EmbeddedResource Include="helpers\functions\Write-FileUpdateLog.ps1" />
9187
<EmbeddedResource Include="redirects\choco.exe.ignore" />
9288
<EmbeddedResource Include="redirects\chocolatey.exe.ignore" />
9389
<EmbeddedResource Include="redirects\cinst.exe.ignore" />

src/chocolatey.resources/helpers/functions/Install-ChocolateyDesktopLink.ps1

-95
This file was deleted.

src/chocolatey.resources/helpers/functions/Install-ChocolateyShortcut.ps1

-3
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,6 @@ Install-ChocolateyShortcut `
110110
-RunAsAdmin `
111111
-PinToTaskbar
112112
113-
.LINK
114-
Install-ChocolateyDesktopLink
115-
116113
.LINK
117114
Install-ChocolateyExplorerMenuItem
118115

src/chocolatey.resources/helpers/functions/Write-ChocolateyFailure.ps1

-62
This file was deleted.

src/chocolatey.resources/helpers/functions/Write-ChocolateySuccess.ps1

-54
This file was deleted.

src/chocolatey.resources/helpers/functions/Write-FileUpdateLog.ps1

-83
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,13 @@
11
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
22

3-
try {
4-
"simple file" | Out-File "$toolsDir\simplefile.txt" -force
3+
"simple file" | Out-File "$toolsDir\simplefile.txt" -force
54

6-
Write-Output "This is $packageName v$packageVersion being installed to `n '$packageFolder'."
7-
Write-Host "PowerShell Version is '$($PSVersionTable.PSVersion)' and CLR Version is '$($PSVersionTable.CLRVersion)'."
8-
Write-Host "Execution Policy is '$(Get-ExecutionPolicy)'."
9-
Write-Host "PSScriptRoot is '$PSScriptRoot'."
10-
Write-Debug "A debug message."
11-
Write-Verbose "Yo!"
12-
Write-Warning "A warning!"
13-
Write-Error "Oh no! An error"
14-
throw "We had an error captain!"
15-
16-
Write-ChocolateySuccess "$packageName"
17-
} catch {
18-
Write-ChocolateyFailure "$packageName" "$($_.Exception.Message)"
19-
throw
20-
}
5+
Write-Output "This is $packageName v$packageVersion being installed to `n '$packageFolder'."
6+
Write-Host "PowerShell Version is '$($PSVersionTable.PSVersion)' and CLR Version is '$($PSVersionTable.CLRVersion)'."
7+
Write-Host "Execution Policy is '$(Get-ExecutionPolicy)'."
8+
Write-Host "PSScriptRoot is '$PSScriptRoot'."
9+
Write-Debug "A debug message."
10+
Write-Verbose "Yo!"
11+
Write-Warning "A warning!"
12+
Write-Error "Oh no! An error"
13+
throw "We had an error captain!"

0 commit comments

Comments
 (0)