From 9cccb49537b3db2a68fc4550c3596c384369c988 Mon Sep 17 00:00:00 2001 From: Rob Reynolds Date: Tue, 29 Dec 2015 10:14:50 -0600 Subject: [PATCH] (maint) add messages to package installers --- .../badpackage/1.0/tools/chocolateyInstall.ps1 | 12 +++++++----- .../badpackage/2.0/tools/chocolateyInstall.ps1 | 12 +++++++----- .../installpackage/1.0.0/tools/chocolateyinstall.ps1 | 7 ++++++- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/src/chocolatey.tests.integration/context/badpackage/1.0/tools/chocolateyInstall.ps1 b/src/chocolatey.tests.integration/context/badpackage/1.0/tools/chocolateyInstall.ps1 index cbb52a9316..c701a6d30b 100644 --- a/src/chocolatey.tests.integration/context/badpackage/1.0/tools/chocolateyInstall.ps1 +++ b/src/chocolatey.tests.integration/context/badpackage/1.0/tools/chocolateyInstall.ps1 @@ -1,9 +1,11 @@ -$packageName = 'badpackage' +try { -try { - - Write-Host "Ya!" - Write-Debug "A debug message" + Write-Output "This is $packageName v$packageVersion being installed to `n '$packageFolder'." + Write-Host "PowerShell Version is '$($PSVersionTable.PSVersion)' and CLR Version is '$($PSVersionTable.CLRVersion)'." + Write-Host "Execution Policy is '$(Get-ExecutionPolicy)'." + Write-Host "PSScriptRoot is '$PSScriptRoot'." + Write-Debug "A debug message." + Write-Verbose "Yo!" Write-Warning "A warning!" Write-Error "Oh no! An error" throw "We had an error captain!" diff --git a/src/chocolatey.tests.integration/context/badpackage/2.0/tools/chocolateyInstall.ps1 b/src/chocolatey.tests.integration/context/badpackage/2.0/tools/chocolateyInstall.ps1 index cbb52a9316..2e4b0d4244 100644 --- a/src/chocolatey.tests.integration/context/badpackage/2.0/tools/chocolateyInstall.ps1 +++ b/src/chocolatey.tests.integration/context/badpackage/2.0/tools/chocolateyInstall.ps1 @@ -1,9 +1,11 @@ -$packageName = 'badpackage' +try { -try { - - Write-Host "Ya!" - Write-Debug "A debug message" + Write-Output "This is $packageName v$packageVersion being installed to `n '$packageFolder'." + Write-Host "PowerShell Version is '$($PSVersionTable.PSVersion)' and CLR Version is '$($PSVersionTable.CLRVersion)'." + Write-Host "Execution Policy is '$(Get-ExecutionPolicy)'." + Write-Host "PSScriptRoot is '$PSScriptRoot'." + Write-Debug "A debug message." + Write-Verbose "Yo!" Write-Warning "A warning!" Write-Error "Oh no! An error" throw "We had an error captain!" diff --git a/src/chocolatey.tests.integration/context/installpackage/1.0.0/tools/chocolateyinstall.ps1 b/src/chocolatey.tests.integration/context/installpackage/1.0.0/tools/chocolateyinstall.ps1 index 2491151c21..53b064d5b7 100644 --- a/src/chocolatey.tests.integration/context/installpackage/1.0.0/tools/chocolateyinstall.ps1 +++ b/src/chocolatey.tests.integration/context/installpackage/1.0.0/tools/chocolateyinstall.ps1 @@ -1,5 +1,10 @@ $toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" "simple file" | Out-File "$toolsDir\simplefile.txt" -force -Write-Output "$env:PackageName $env:PackageVersion Installed" +Write-Output "This is $packageName v$packageVersion being installed to `n $packageFolder" +Write-Host "Ya!" +Write-Debug "A debug message" +Write-Verbose "Yo!" +Write-Warning "A warning!" +Write-Output "$packageName v$packageVersion has been installed to `n $packageFolder" \ No newline at end of file