diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000000..61b1273293 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,4 @@ +packages.config @chocolatey/chocolatey-credits-reviewers +CREDITS.md @chocolatey/chocolatey-credits-reviewers +/src/chocolatey.resources/tools/ @chocolatey/chocolatey-credits-reviewers +/lib/ @chocolatey/chocolatey-credits-reviewers \ No newline at end of file diff --git a/.teamcity/settings.kts b/.teamcity/settings.kts index b1649afdfc..8f52dbb633 100644 --- a/.teamcity/settings.kts +++ b/.teamcity/settings.kts @@ -13,6 +13,7 @@ project { buildType(Chocolatey) buildType(ChocolateySchd) buildType(ChocolateyQA) + buildType(ChocolateySign) buildType(ChocolateyDockerWin) buildType(ChocolateyPosix) } @@ -21,6 +22,8 @@ object Chocolatey : BuildType({ id = AbsoluteId("Chocolatey") name = "Chocolatey CLI (Built with Unit Tests)" + templates(AbsoluteId("SlackNotificationTemplate")) + artifactRules = """ """.trimIndent() @@ -85,6 +88,7 @@ object Chocolatey : BuildType({ requirements { doesNotExist("docker.server.version") + doesNotContain("teamcity.agent.name", "Docker") } }) @@ -92,6 +96,8 @@ object ChocolateySchd : BuildType({ id = AbsoluteId("ChocolateySchd") name = "Chocolatey CLI (Scheduled Integration Testing)" + templates(AbsoluteId("SlackNotificationTemplate")) + artifactRules = """ """.trimIndent() @@ -125,15 +131,10 @@ object ChocolateySchd : BuildType({ } } - step { - name = "Include Signing Keys" - type = "PrepareSigningEnvironment" - } - script { name = "Call Cake" scriptContent = """ - build.official.bat --verbosity=diagnostic --target=CI --testExecutionType=all --shouldRunOpenCover=false --shouldRunAnalyze=false --shouldRunIlMerge=false --shouldObfuscateOutputAssemblies=false --shouldRunChocolatey=false --shouldRunNuGet=false + build.official.bat --verbosity=diagnostic --target=CI --testExecutionType=all --shouldRunOpenCover=false --shouldRunAnalyze=false --shouldRunIlMerge=false --shouldObfuscateOutputAssemblies=false --shouldRunChocolatey=false --shouldRunNuGet=false --shouldAuthenticodeSignMsis=false --shouldAuthenticodeSignOutputAssemblies=false --shouldAuthenticodeSignPowerShellScripts=false """.trimIndent() } } @@ -154,6 +155,7 @@ object ChocolateySchd : BuildType({ requirements { doesNotExist("docker.server.version") + doesNotContain("teamcity.agent.name", "Docker") } }) @@ -161,6 +163,8 @@ object ChocolateyQA : BuildType({ id = AbsoluteId("ChocolateyQA") name = "Chocolatey CLI (SonarQube)" + templates(AbsoluteId("SlackNotificationTemplate")) + artifactRules = """ """.trimIndent() @@ -195,15 +199,10 @@ object ChocolateyQA : BuildType({ } } - step { - name = "Include Signing Keys" - type = "PrepareSigningEnvironment" - } - script { name = "Call Cake" scriptContent = """ - build.official.bat --verbosity=diagnostic --target=CI --testExecutionType=none --shouldRunAnalyze=false --shouldRunIlMerge=false --shouldObfuscateOutputAssemblies=false --shouldRunChocolatey=false --shouldRunNuGet=false --shouldRunSonarQube=true --shouldRunDependencyCheck=true + build.official.bat --verbosity=diagnostic --target=CI --testExecutionType=none --shouldRunAnalyze=false --shouldRunIlMerge=false --shouldObfuscateOutputAssemblies=false --shouldRunChocolatey=false --shouldRunNuGet=false --shouldRunSonarQube=true --shouldRunDependencyCheck=true --shouldAuthenticodeSignMsis=false --shouldAuthenticodeSignOutputAssemblies=false --shouldAuthenticodeSignPowerShellScripts=false """.trimIndent() } } @@ -225,6 +224,80 @@ object ChocolateyQA : BuildType({ requirements { doesNotExist("docker.server.version") + doesNotContain("teamcity.agent.name", "Docker") + } +}) + +object ChocolateySign : BuildType({ + id = AbsoluteId("ChocolateySign") + name = "Chocolatey CLI (Script Signing)" + + templates(AbsoluteId("SlackNotificationTemplate")) + + artifactRules = """ + """.trimIndent() + + params { + param("env.vcsroot.branch", "%vcsroot.branch%") + param("env.Git_Branch", "%teamcity.build.vcs.branch.Chocolatey_ChocolateyVcsRoot%") + param("env.FORCE_OFFICIAL_AUTHENTICODE_SIGNATURE", "true") + param("teamcity.git.fetchAllHeads", "true") + password("env.GITHUB_PAT", "%system.GitHubPAT%", display = ParameterDisplay.HIDDEN, readOnly = true) + } + + vcs { + root(DslContext.settingsRoot) + + branchFilter = """ + +:* + """.trimIndent() + } + + steps { + powerShell { + name = "Prerequisites" + scriptMode = script { + content = """ + if ((Get-WindowsFeature -Name NET-Framework-Features).InstallState -ne 'Installed') { + Install-WindowsFeature -Name NET-Framework-Features + } + + choco install windows-sdk-7.1 netfx-4.0.3-devpack dotnet-6.0-runtime --confirm --no-progress + exit ${'$'}LastExitCode + """.trimIndent() + } + } + + step { + name = "Include Signing Keys" + type = "PrepareSigningEnvironment" + } + + script { + name = "Call Cake" + scriptContent = """ + build.official.bat --verbosity=diagnostic --target=Sign-PowerShellScripts --exclusive + """.trimIndent() + } + } + + triggers { + vcs { + triggerRules = """ + +:nuspec/**/*.ps1 + +:nuspec/**/*.psm1 + +:nuspec/**/*.psd1 + +:src/chocolatey.resources/**/*.ps1 + +:src/chocolatey.resources/**/*.psm1 + +:src/chocolatey.resources/**/*.psd1 + """.trimIndent() + branchFilter = "+:develop" + } + } + + requirements { + doesNotExist("docker.server.version") + doesNotContain("teamcity.agent.name", "Docker") } }) @@ -232,6 +305,8 @@ object ChocolateyDockerWin : BuildType({ id = AbsoluteId("ChocolateyDockerWin") name = "Docker (Windows)" + templates(AbsoluteId("SlackNotificationTemplate")) + params { // TeamCity has suggested "${Chocolatey.depParamRefs.buildNumber}" param("env.CHOCOLATEY_VERSION", "%dep.Chocolatey.build.number%") @@ -279,6 +354,7 @@ object ChocolateyDockerWin : BuildType({ requirements { contains("docker.server.osType", "windows") exists("docker.server.version") + contains("teamcity.agent.name", "Docker") } }) @@ -286,6 +362,8 @@ object ChocolateyPosix : BuildType({ id = AbsoluteId("ChocolateyPosix") name = "Docker (Linux)" + templates(AbsoluteId("SlackNotificationTemplate")) + params { param("env.CAKE_NUGET_SOURCE", "") // The Cake version we use has issues with authing to our private source on Linux param("env.PRIMARY_NUGET_SOURCE", "") // As above there are issues with authing to our private source on Linux @@ -391,5 +469,6 @@ object ChocolateyPosix : BuildType({ requirements { contains("docker.server.osType", "linux") exists("docker.server.version") + contains("teamcity.agent.name", "Docker") } }) diff --git a/.templates/default/issue-note.sbn b/.templates/default/issue-note.sbn index 10c10a97d3..03dc651968 100644 --- a/.templates/default/issue-note.sbn +++ b/.templates/default/issue-note.sbn @@ -1,6 +1,6 @@ {{ if issue_label == "Bug" || issue_label == "Bug Fix" || issue_label == "Bug Fixes" -}}- Fix - {{ issue.title }} - see [#{{ issue.number }}]({{ issue.html_url }}). +}}- Fix - {{ issue.title }} - see [#{{ issue.public_number }}]({{ issue.html_url }}). {{ else -}}- {{ issue.title }} - see [#{{ issue.number }}]({{ issue.html_url }}). +}}- {{ issue.title }} - see [#{{ issue.public_number }}]({{ issue.html_url }}). {{ end -}} diff --git a/.templates/default/release-info.sbn b/.templates/default/release-info.sbn index 8410ca5ad4..2b495d2138 100644 --- a/.templates/default/release-info.sbn +++ b/.templates/default/release-info.sbn @@ -1,9 +1,9 @@ {{ if issues.count > 0 if commits.count > 0 -}}As part of this release we had [{{ commits.count }} {{ commits.count | string.pluralize "commit" "commits" }}]({{ commits.html_url }}) which resulted in [{{ issues.count }} {{ issues.count | string.pluralize "issue" "issues" }}]({{ milestone.target.html_url }}?closed=1) being closed. +}}As part of this release we had [{{ commits.count }} {{ commits.count | string.pluralize "commit" "commits" }}]({{ commits.html_url }}) which resulted in [{{ issues.count }} {{ issues.count | string.pluralize "issue" "issues" }}]({{ milestone.target.html_url }}?{{ milestone.query_string }}) being closed. {{ else -}}As part of this release we had [{{ issues.count }} {{ issues.count | string.pluralize "issue" "issues" }}]({{ milestone.target.html_url }}?closed=1) closed. +}}As part of this release we had [{{ issues.count }} {{ issues.count | string.pluralize "issue" "issues" }}]({{ milestone.target.html_url }}?{{ milestone.query_string }}) closed. {{ end else if commits.count > 0 }}As part of this release we had [{{ commits.count }} {{ commits.count | string.pluralize "commit" "commits" }}]({{ commits.html_url }}). diff --git a/COMMITTERS.md b/COMMITTERS.md index a57979dade..ca8272fe35 100644 --- a/COMMITTERS.md +++ b/COMMITTERS.md @@ -152,3 +152,57 @@ References * [http://pivotallabs.com/git-rebase-onto/ (Archive)](https://web.archive.org/web/20150709101404/http://pivotallabs.com:80/git-rebase-onto/) * http://git-scm.com/book/ch3-6.html + +## Generating and Updating Cmdlet Documentation + +Documentation for the cmdlets in the Chocolatey.PowerShell project is maintained as `*.md` files in the [chocolatey/docs](https://github.com/chocolatey/docs) repository, under `input/en-us/create/cmdlets`. +When making changes to a cmdlet or adding a new one, we need to ensure that those Markdown files get updated, and that those changes are propagated back to this repository in the [`Chocolatey.PowerShell.dll-help.xml`](./src/Chocolatey.PowerShell/Chocolatey.PowerShell.dll-Help.xml) file in the repository. + +Before working with this, be sure to clone the `chocolatey/docs` repository locally. +If your local copy of the docs repository is not located at `../docs` relative to this folder, you will need to specify the `-DocsRepositoryPath` parameter whenever calling the `update-cmdlet-documentation.ps1` script. + +### Generating Documentation for a new Cmdlet + +Run the `update-cmdlet-documentation.ps1` script with the `-NewCommand` parameter, specifying the name of the cmdlet(s) that you've added: + +```powershell +./update-cmdlet-documentation.ps1 -NewCommand Test-NewChocolateyCommand +``` + +Once this completes, you will get a warning that the documentation template needs to be filled out and the newly-generated documentation file will open in your default editor for `*.md` files. + +### Updating Documentation For an Existing Cmdlet + +Run the `update-cmdlet-documentation.ps1` script: + +```powershell +./update-cmdlet-documentation.ps1 +``` + +### Generating the `Chocolatey.PowerShell.dll-help.xml` External Help Documentation + +Once new files have been generated, in the `chocolatey/docs` repository, make any additional changes needed to the files. +Note that these files will need to be compatible both with PlatyPS and the docs repository Markdown formatting. +As such, for new files you will need to sure the additional frontmatter is added. +A complete frontmatter block for these files looks like this: + +```md +--- +Description: Information on Cmdlet-Name cmdlet +external help file: Chocolatey.PowerShell.dll-Help.xml +Module Name: Chocolatey.PowerShell +online version: https://docs.chocolatey.org/en-us/create/functions/cmdlet-name +Order: 70 +schema: 2.0.0 +Title: Cmdlet-Name +xref: cmdlet-name +--- +``` + +Some files may also have a `RedirectFrom: [ ... ]` frontmatter entry. +This is not required for new files, but existing files (or files added for a cmdlet that is a rewrite of a pre-existing command) should retain their existing redirects. + +Run the `update-cmdlet-documentation.ps1` script once more, and add the changes to the `Chocolatey.PowerShell.dll-help.xml` file to a commit. + +Finally, add the changes to a commit on a new branch in the `docs` repository and submit a PR for any changes there as well, alongside the PR to any changes made in this repository. +If you are rewriting a cmdlet from a pre-existing script command, ensure you remove the old documentation file from `input/en-us/create/commands` as well, so that there are no duplicate xrefs. diff --git a/GenerateDocs.ps1 b/GenerateDocs.ps1 index 36b7197d9a..7a2636699d 100644 --- a/GenerateDocs.ps1 +++ b/GenerateDocs.ps1 @@ -25,28 +25,29 @@ $psModuleLocation = [System.IO.Path]::GetFullPath("$thisDirectory\src\chocolatey $docsFolder = [System.IO.Path]::GetFullPath("$thisDirectory\docs\generated") $mergedDirectory = [System.IO.Path]::GetFullPath("$thisDirectory\code_drop\temp\_PublishedApps\choco_merged") $chocoExe = "$mergedDirectory\choco.exe" + +Write-Host "Running choco.exe from $chocoExe" + $lineFeed = "`r`n" $sourceLocation = 'https://github.com/chocolatey/choco/blob/master/' $sourceCommands = $sourceLocation + 'src/chocolatey/infrastructure.app/commands' $sourceFunctions = $sourceLocation + 'src/chocolatey.resources/helpers/functions' $global:powerShellReferenceTOC = @' --- -Order: 40 +order: 40 xref: powershell-reference -Title: PowerShell Reference -Description: PowerShell Functions aka Helpers Reference -RedirectFrom: - - docs/helpers-reference - - docs/HelpersReference +title: PowerShell Reference +description: PowerShell Functions aka Helpers Reference --- +import Xref from '@components/Xref.astro'; # PowerShell Functions aka Helpers Reference - +{/* This documentation file is automatically generated from the files at $sourceFunctions using $($sourceLocation)GenerateDocs.ps1. Contributions are welcome at the original location(s). */} ## Summary -In your Chocolatey packaging, you have the ability to use these functions (and others with Chocolatey's [PowerShell Extensions](xref:extensions)) to work with all aspects of software management. Keep in mind Chocolatey's automation scripts are just PowerShell, so you can do manage anything you want. +In your Chocolatey packaging, you have the ability to use these functions (and others with Chocolatey's ) to work with all aspects of software management. Keep in mind Chocolatey's automation scripts are just PowerShell, so you can do manage anything you want. > :choco-info: **NOTE** > @@ -54,12 +55,12 @@ In your Chocolatey packaging, you have the ability to use these functions (and o ## Main Functions -These functions call other functions and many times may be the only thing you need in your [chocolateyInstall.ps1 file](xref:chocolatey-install-ps1). +These functions call other functions and many times may be the only thing you need in your . -* [Install-ChocolateyPackage](xref:install-chocolateypackage) -* [Install-ChocolateyZipPackage](xref:install-chocolateyzippackage) -* [Install-ChocolateyPowershellCommand](xref:install-chocolateypowershellcommand) -* [Install-ChocolateyVsixPackage](xref:install-chocolateyvsixpackage) +* +* +* +* ## More Functions @@ -67,13 +68,13 @@ These functions call other functions and many times may be the only thing you ne When creating packages that need to run one of the following commands below, one should add the tag `admin` to the nuspec. -* [Install-ChocolateyPackage](xref:install-chocolateypackage) -* [Start-ChocolateyProcessAsAdmin](xref:start-chocolateyprocessasadmin) -* [Install-ChocolateyInstallPackage](xref:install-chocolateyinstallpackage) -* [Install-ChocolateyPath](xref:install-chocolateypath) - when specifying machine path -* [Install-ChocolateyEnvironmentVariable](xref:install-chocolateyenvironmentvariable) - when specifying machine path -* [Install-ChocolateyExplorerMenuItem](xref:install-chocolateyexplorermenuitem) -* [Install-ChocolateyFileAssociation](xref:install-chocolateyfileassociation) +* +* +* +* - when specifying machine path +* - when specifying machine path +* +* ### Non-Administrator Safe Functions @@ -81,17 +82,17 @@ When you have a need to run Chocolatey without Administrative access required (n These are the functions from above as one list. -* [Install-ChocolateyZipPackage](xref:install-chocolateyzippackage) -* [Install-ChocolateyPowershellCommand](xref:install-chocolateypowershellcommand) -* [Get-ChocolateyPath](xref:get-chocolateypath) -* [Get-ChocolateyWebFile](xref:get-chocolateywebfile) -* [Get-ChocolateyUnzip](xref:get-chocolateyunzip) -* [Install-ChocolateyPath](xref:install-chocolateypath) - when specifying user path -* [Install-ChocolateyEnvironmentVariable](xref:install-chocolateyenvironmentvariable) - when specifying user path -* [Install-ChocolateyPinnedTaskBarItem](xref:install-chocolateypinnedtaskbaritem) -* [Install-ChocolateyShortcut](xref:install-chocolateyshortcut) -* [Update-SessionEnvironment](xref:update-sessionenvironment) -* [Get-PackageParameters](xref:get-packageparameters) +* +* +* +* +* +* - when specifying user path +* - when specifying user path +* +* +* +* ## Complete List (alphabetical order) @@ -142,9 +143,9 @@ function Replace-CommonItems($text) { $text = $text -replace '(Pro[fessional]\s?/\s?Business)', '[$1](https://chocolatey.org/compare)' $text = $text -replace '([Ll]icensed editions)', '[$1](https://chocolatey.org/compare)' $text = $text -replace '([Ll]icensed versions)', '[$1](https://chocolatey.org/compare)' - $text = $text -replace '\(https://docs.chocolatey.org/en-us/create/automatic-packages\)', '(xref:automatic-packaging)' - $text = $text -replace 'Learn more about using this at https://docs.chocolatey.org/en-us/guides/create/parse-packageparameters-argument', '[Learn more](xref:parse-package-parameters)' - $text = $text -replace 'at https://docs.chocolatey.org/en-us/guides/create/parse-packageparameters-argument#step-3---use-core-community-extension', 'in [the docs](xref:parse-package-parameters#step-3-use-core-community-extension)' + $text = $text -replace '\[automatic packaging\]\(https://docs.chocolatey.org/en-us/create/automatic-packages\)', '' + $text = $text -replace 'Learn more about using this at https://docs.chocolatey.org/en-us/guides/create/parse-packageparameters-argument', '' + $text = $text -replace 'at https://docs.chocolatey.org/en-us/guides/create/parse-packageparameters-argument#step-3---use-core-community-extension', 'in ' $text = $text -replace 'https://docs.chocolatey.org/en-us/guides/create/parse-packageparameters-argument', 'https://docs.chocolatey.org/en-us/guides/create/parse-packageparameters-argument' $text = $text -replace '\[community feed\)\]\(https://community.chocolatey.org/packages\)', '[community feed](https://community.chocolatey.org/packages))' @@ -204,7 +205,7 @@ function Convert-Parameter($objItem, $commandName) { $aliases = [string]((Get-Command -Name $commandName).parameters."$($objItem.Name)".Aliases -join ', ') $required = [string]($objItem.required) $position = [string]($objItem.position) - $defValue = [string]($objItem.defaultValue) + $defValue = [string]($objItem.defaultValue -replace '@{Headers = @{}', '`@{Headers = @{}`' ) $acceptPipeline = [string]($objItem.pipelineInput) $padding = ($aliases.Length, $required.Length, $position.Length, $defValue.Length, $acceptPipeline.Length | Measure-Object -Maximum).Maximum @@ -242,11 +243,11 @@ function Convert-CommandText { $commandText = $commandText -replace '^(Windows Features|Ruby|Cygwin|Python)\s*$', '### $1' $commandText = $commandText -replace '(? :choco-info: **NOTE**' $commandText = $commandText -replace '(? :choco-warning: **WARNING**' - $commandText = $commandText -replace '\*> :choco-(info|warning): \*\*(INFO|WARNING)\*\*\*', '> :choco-$1: **$2**' - $commandText = $commandText -replace 'the command reference', '[how to pass arguments](xref:choco-commands#how-to-pass-options-switches)' + $commandText = $commandText -replace '\*> :choco-(info|warning): \*\*(INFO|WARNING|NOTE)\*\*\*', '> :choco-$1: **$2**' + $commandText = $commandText -replace 'the command reference', '' $commandText = $commandText -replace '(community feed[s]?|community repository)', '[$1](https://community.chocolatey.org/packages)' #$commandText = $commandText -replace '\`(apikey|install|upgrade|uninstall|list|search|info|outdated|pin)\`', '[[`$1`|Commands$1]]' - $commandText = $commandText -replace '\`([choco\s]*)(apikey|install|upgrade|uninstall|list|search|info|outdated|pin)\`', '[`$1$2`](xref:choco-command-$2)' + $commandText = $commandText -replace '\`([choco\s]*)(apikey|install|upgrade|uninstall|list|search|info|outdated|pin)\`', '' $commandText = $commandText -replace '^(.+):\s(.+.gif)$', '![$1]($2)' $commandText = $commandText -replace '^(\s+)\<\?xml', "~~~xml$lineFeed`$1', "`$1$lineFeed~~~" @@ -254,21 +255,21 @@ function Convert-CommandText { $commandText = $commandText -replace '(Pro[fessional]\s?/\s?Business)', '[$1](https://chocolatey.org/compare)' $commandText = $commandText -replace '([Ll]icensed editions)', '[$1](https://chocolatey.org/compare)' $commandText = $commandText -replace '([Ll]icensed versions)', '[$1](https://chocolatey.org/compare)' - $commandText = $commandText -replace 'https://raw.githubusercontent.com/wiki/chocolatey/choco/images', '/assets/images' + $commandText = $commandText -replace 'https://raw.githubusercontent.com/wiki/chocolatey/choco/images', '/images' $commandText = $commandText -replace 'https://chocolatey.org/docs/features-automatically-recompile-packages', 'https://docs.chocolatey.org/en-us/guides/create/recompile-packages' $commandText = $commandText -replace 'https://chocolatey.org/docs/features-private-cdn', 'https://docs.chocolatey.org/en-us/features/private-cdn' $commandText = $commandText -replace 'https://chocolatey.org/docs/features-virus-check', 'https://docs.chocolatey.org/en-us/features/virus-check' $commandText = $commandText -replace 'https://chocolatey.org/docs/features-synchronize', 'https://docs.chocolatey.org/en-us/features/package-synchronization' $commandText = $commandText -replace 'explicity', 'explicit' $commandText = $commandText -replace 'https://chocolatey.org/docs/features-create-packages-from-installers', 'https://docs.chocolatey.org/en-us/features/package-builder' - $commandText = $commandText -replace 'See https://chocolatey.org/docs/features-create-packages-from-installers', 'See more information about [Package Builder features](xref:package-builder)' - $commandText = $commandText -replace 'See https://docs.chocolatey.org/en-us/features/package-builder', 'See more information about [Package Builder features](xref:package-builder)' + $commandText = $commandText -replace 'See https://chocolatey.org/docs/features-create-packages-from-installers', 'See more information about ' + $commandText = $commandText -replace 'See https://docs.chocolatey.org/en-us/features/package-builder', 'See more information about ' $commandText = $commandText -replace 'https://chocolatey.org/docs/features-install-directory-override', 'https://docs.chocolatey.org/en-us/features/install-directory-override' $commandText = $commandText -replace 'y.org/docs/features-package-reducer', 'y.org/docs/en-us/features/package-reducer' $commandText = $commandText -replace 'https://chocolatey.org/docs/features-package-reducer', 'https://docs.chocolatey.org/en-us/features/package-reducer' $commandText = $commandText -replace 'https://chocolatey.org/docs/en-us/features/package-reducer', 'https://docs.chocolatey.org/en-us/features/package-reducer' $commandText = $commandText -replace '\[community feed\)\]\(https://community.chocolatey.org/packages\)', '[community feed](https://community.chocolatey.org/packages))' - $commandText = $commandText -replace '> :choco-(info|warning): \*\*(INFO|WARNING)\*\*\s', '> :choco-$1: **$2** + $commandText = $commandText -replace '> :choco-(info|warning): \*\*(INFO|WARNING|NOTE)\*\*\s', '> :choco-$1: **$2** > > ' @@ -283,7 +284,7 @@ function Convert-CommandText { try to install version 1.0.0 of every package passed. So please split out multiple package calls when wanting to pass specific options. -Includes [default options/switches](xref:choco-commands#default-options-and-switches) (included below for completeness). +Includes (included below for completeness). ~~~ '@ @@ -315,32 +316,30 @@ function Convert-CommandReferenceSpecific($commandText) { param($m) $commandName = $m.Groups[1].Value $commandNameUpper = $($commandName.Substring(0, 1).ToUpper() + $commandName.Substring(1)) - " * [$commandName](xref:choco-command-$($commandName)) -" + " * -" } ) #$commandText = $commandText -replace '\s?\s?\*\s(\w+)\s\-', ' * [[$1|Commands$1]] -' - $commandText = $commandText.Replace("## Default Options and Switches", "## See Help Menu In Action$lineFeed$lineFeed![choco help in action](/assets/images/gifs/choco_help.gif)$lineFeed$lineFeed## Default Options and Switches") + $commandText = $commandText.Replace("## Default Options and Switches", "## See Help Menu In Action$lineFeed$lineFeed![choco help in action](/images/gifs/choco_help.gif)$lineFeed$lineFeed## Default Options and Switches") Write-Output $commandText } function Generate-TopLevelCommandReference { Write-Host "Generating Top Level Command Reference" - $fileName = "$docsFolder\choco\commands\index.md" + $fileName = "$docsFolder\choco\commands\index.mdx" $commandOutput = @("---") - $commandOutput += @("Order: 40") + $commandOutput += @("order: 40") $commandOutput += @("xref: choco-commands") - $commandOutput += @("Title: Commands") - $commandOutput += @("Description: Full list of all available Chocolatey commands") - $commandOutput += @("RedirectFrom:") - $commandOutput += @(" - docs/commandsreference") - $commandOutput += @(" - docs/commands-reference") - $commandOutput += @("---$lineFeed") + $commandOutput += @("title: Commands") + $commandOutput += @("description: Full list of all available Chocolatey commands") + $commandOutput += @("---") + $commandOutput += @("import Xref from '@components/Xref.astro';$lineFeed") $commandOutput += @("# Command Reference$lineFeed") - $commandOutput += @(" $lineFeed") + $commandOutput += @("{/* This file is automatically generated based on output from the files at $sourceCommands using $($sourceLocation)GenerateDocs.ps1. Contributions are welcome at the original location(s). */} $lineFeed") $commandOutput += $(& $chocoExe -? -r) $commandOutput += @("$lineFeed~~~$lineFeed") - $commandOutput += @("$lineFeed$lineFeed*NOTE:* This documentation has been automatically generated from ``choco -h``. $lineFeed") + $commandOutput += @("$lineFeed$lineFeed> :choco-info: **NOTE**$lineFeed>$lineFeed> This documentation has been automatically generated from ``choco -h``. $lineFeed") $commandOutput | ForEach-Object { Convert-CommandText($_) } | @@ -353,51 +352,50 @@ function Move-GeneratedFiles { New-Item -ItemType Directory -Path "$docsFolder\create\commands" -ErrorAction Continue | Out-Null } - Move-Item -Path "$docsFolder\choco\commands\apikey.md" -Destination "$docsFolder\create\commands\api-key.md" - Move-Item -Path "$docsFolder\choco\commands\new.md" -Destination "$docsFolder\create\commands\new.md" - Move-Item -Path "$docsFolder\choco\commands\pack.md" -Destination "$docsFolder\create\commands\pack.md" - Move-Item -Path "$docsFolder\choco\commands\push.md" -Destination "$docsFolder\create\commands\push.md" - Move-Item -Path "$docsFolder\choco\commands\template.md" -Destination "$docsFolder\create\commands\template.md" - Move-Item -Path "$docsFolder\choco\commands\templates.md" -Destination "$docsFolder\create\commands\templates.md" - Move-Item -Path "$docsFolder\choco\commands\convert.md" -Destination "$docsFolder\create\commands\convert.md" + Move-Item -Path "$docsFolder\choco\commands\apikey.mdx" -Destination "$docsFolder\create\commands\api-key.mdx" + Move-Item -Path "$docsFolder\choco\commands\new.mdx" -Destination "$docsFolder\create\commands\new.mdx" + Move-Item -Path "$docsFolder\choco\commands\pack.mdx" -Destination "$docsFolder\create\commands\pack.mdx" + Move-Item -Path "$docsFolder\choco\commands\push.mdx" -Destination "$docsFolder\create\commands\push.mdx" + Move-Item -Path "$docsFolder\choco\commands\template.mdx" -Destination "$docsFolder\create\commands\template.mdx" + Move-Item -Path "$docsFolder\choco\commands\templates.mdx" -Destination "$docsFolder\create\commands\templates.mdx" + Move-Item -Path "$docsFolder\choco\commands\convert.mdx" -Destination "$docsFolder\create\commands\convert.mdx" } function Generate-CommandReference($commandName, $order) { if (-not(Test-Path "$docsFolder\choco\commands")) { New-Item -ItemType Directory -Path "$docsFolder\choco\commands" -ErrorAction Continue | Out-Null } - $fileName = Join-Path "$docsFolder\choco\commands" "$($commandName.ToLower()).md" + $fileName = Join-Path "$docsFolder\choco\commands" "$($commandName.ToLower()).mdx" $commandNameLower = $commandName.ToLower() Write-Host "Generating $fileName ..." $commandOutput += @("---") - $commandOutput += @("Order: $order") + $commandOutput += @("order: $order") $commandOutput += @("xref: choco-command-$commandNameLower") - $commandOutput += @("Title: $commandName") - $commandOutput += @("Description: $commandName Command (choco $commandNameLower)") - $commandOutput += @("RedirectFrom:") - $commandOutput += @(" - docs/commands$commandNameLower") - $commandOutput += @(" - docs/commands-$commandNameLower") + $commandOutput += @("title: $commandName") + $commandOutput += @("description: $commandName Command (choco $commandNameLower)") if ($commandName -eq 'Features') { - $commandOutput += @("ShowInNavbar: false") $commandOutput += @("ShowInSidebar: false") } if ($commandName -eq 'Templates') { - $commandOutput += @("ShowInNavbar: false") $commandOutput += @("ShowInSidebar: false") } - $commandOutput += @("---$lineFeed") - $commandOutput += @(" $lineFeed") + $commandOutput += @("---") + $commandOutput += @("import Xref from '@components/Xref.astro';$lineFeed") + $commandOutput += @("{/* This file is automatically generated based on output from $($sourceCommands)/Chocolatey$($commandName)Command.cs using $($sourceLocation)GenerateDocs.ps1. Contributions are welcome at the original location(s). If the file is not found, it is not part of the open source edition of Chocolatey or the name of the file is different. */} $lineFeed") $commandOutput += $(& $chocoExe $commandName.ToLower() -h -r) - $commandOutput += @("$lineFeed~~~$lineFeed$lineFeed[Command Reference](xref:choco-commands)") + $commandOutput += @("$lineFeed~~~$lineFeed$lineFeed") $commandOutput += @("$lineFeed$lineFeed*NOTE:* This documentation has been automatically generated from ``choco $($commandName.ToLower()) -h``. $lineFeed") - $commandOutput | + $fileContent = $commandOutput | ForEach-Object { Convert-CommandText $_ $commandName.ToLower() } | - Out-File $fileName -Encoding UTF8 -Force + Out-String + # Surround indented blocks with code blocks (intended for Usage and Examples sections), ignoring sections we are putting in code blocks in other ways + $fileContent = $fileContent -replace '(\r?\n( {4}[^ <-].+\r?\n?)+)',"`r`n~~~`$0~~~`r`n`r`n" + $fileContent | Out-File $fileName -Encoding UTF8 -Force } try { @@ -423,8 +421,8 @@ try { $helperOrder = 10; Get-Command -Module $psModuleName -CommandType Function | ForEach-Object -Process { Get-Help $_ -Full } | ForEach-Object -Process { ` $commandName = $_.Name - $fileName = Join-Path "$docsFolder\create\functions" "$($_.Name.ToLower()).md" - $global:powerShellReferenceTOC += "$lineFeed * [$commandName](xref:$([System.IO.Path]::GetFileNameWithoutExtension($fileName)))" + $fileName = Join-Path "$docsFolder\create\functions" "$($_.Name.ToLower()).mdx" + $global:powerShellReferenceTOC += "$lineFeed * " $hasCmdletBinding = (Get-Command -Name $commandName).CmdLetBinding Write-Host "Generating $fileName ..." @@ -443,18 +441,16 @@ try { @" --- -Order: $($helperOrder) +order: $($helperOrder) xref: $($_.Name.ToLower()) -Title: $($_.Name) -Description: Information on $($_.Name) function -RedirectFrom: - - docs/helpers-$($FormattedName) - - docs/helpers$($NameNoHyphen.ToLower()) +title: $($_.Name) +description: Information on $($_.Name) function --- +import Xref from '@components/Xref.astro'; # $($_.Name) - +{/* This documentation is automatically generated from $sourceFunctions/$($_.Name)`.ps1 using $($sourceLocation)GenerateDocs.ps1. Contributions are welcome at the original location(s). */} $(Replace-CommonItems $_.Synopsis) @@ -478,9 +474,9 @@ $( if ($_.ReturnValues -ne $null -and $_.ReturnValues.Length -gt 0 -and -not $_. ## Parameters $( if ($_.parameters.parameter.count -gt 0) { $_.parameters.parameter | ForEach-Object { Convert-Parameter $_ $commandName }}) $( if ($hasCmdletBinding) { "$lineFeed### <CommonParameters>$lineFeed$($lineFeed)This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see ``about_CommonParameters`` http://go.microsoft.com/fwlink/p/?LinkID=113216 ." } ) -$( if ($_.relatedLinks -ne $null) {Write-Output "$lineFeed## Links$lineFeed$lineFeed"; $_.relatedLinks.navigationLink | Where-Object { $_.linkText -ne $null} | ForEach-Object { Write-Output "* [$($_.LinkText)](xref:$($_.LinkText.ToLower()))$lineFeed" }}) +$( if ($_.relatedLinks -ne $null) {Write-Output "$lineFeed## Links$lineFeed$lineFeed"; $_.relatedLinks.navigationLink | Where-Object { $_.linkText -ne $null} | ForEach-Object { Write-Output "* $lineFeed" }}) -[Function Reference](xref:powershell-reference) + > :choco-info: **NOTE** > @@ -492,17 +488,17 @@ View the source for [$($_.Name)]($sourceFunctions/$($_.Name)`.ps1) } Write-Host "Generating Top Level PowerShell Reference" - $fileName = Join-Path "$docsFolder\create\functions" 'index.md' + $fileName = Join-Path "$docsFolder\create\functions" 'index.mdx' $global:powerShellReferenceTOC += @' ## Chocolatey for Business Functions - * [Install-ChocolateyWindowsService](xref:install-chocolateywindowsservice) - * [Start-ChocolateyWindowsService](xref:start-chocolateywindowsservice) - * [Stop-ChocolateyWindowsService](xref:stop-chocolateywindowsservice) - * [Uninstall-ChocolateyWindowsService](xref:uninstall-chocolateywindowsservice) +* +* +* +* ## Variables @@ -512,24 +508,24 @@ There are also a number of environment variables providing access to some values Chocolatey makes a number of environment variables available (You can access any of these with $env:TheVariableNameBelow): - * TEMP/TMP - Overridden to the CacheLocation, but may be the same as the original TEMP folder - * ChocolateyInstall - Top level folder where Chocolatey is installed - * ChocolateyPackageName - The name of the package, equivalent to the `` field in the nuspec - * ChocolateyPackageTitle - The title of the package, equivalent to the `` field in the nuspec - * ChocolateyPackageVersion - The version of the package, equivalent to the `<version />` field in the nuspec +* TEMP/TMP - Overridden to the CacheLocation, but may be the same as the original TEMP folder +* ChocolateyInstall - Top level folder where Chocolatey is installed +* ChocolateyPackageName - The name of the package, equivalent to the `<id />` field in the nuspec +* ChocolateyPackageTitle - The title of the package, equivalent to the `<title />` field in the nuspec +* ChocolateyPackageVersion - The version of the package, equivalent to the `<version />` field in the nuspec #### Advanced Environment Variables The following are more advanced settings: - * ChocolateyPackageParameters - Parameters to use with packaging, not the same as install arguments (which are passed directly to the native installer). Based on `--package-parameters`. - * CHOCOLATEY_VERSION - The version of Choco you normally see. Use if you are 'lighting' things up based on choco version, otherwise take a dependency on the specific version you need. - * ChocolateyForceX86 = If available and set to 'true', then user has requested 32bit version. Automatically handled in built in Choco functions. - * OS_PLATFORM - Like Windows, macOS, Linux. - * OS_VERSION - The version of OS, like 6.1 something something for Windows. - * OS_NAME - The reported name of the OS. - * IS_PROCESSELEVATED = Is the process elevated? - * ChocolateyPackageInstallLocation - Install location of the software that the package installs. Displayed at the end of the package install. +* ChocolateyPackageParameters - Parameters to use with packaging, not the same as install arguments (which are passed directly to the native installer). Based on `--package-parameters`. +* CHOCOLATEY_VERSION - The version of Choco you normally see. Use if you are 'lighting' things up based on choco version, otherwise take a dependency on the specific version you need. +* ChocolateyForceX86 = If available and set to 'true', then user has requested 32bit version. Automatically handled in built in Choco functions. +* OS_PLATFORM - Like Windows, macOS, Linux. +* OS_VERSION - The version of OS, like 6.1 something something for Windows. +* OS_NAME - The reported name of the OS. +* IS_PROCESSELEVATED = Is the process elevated? +* ChocolateyPackageInstallLocation - Install location of the software that the package installs. Displayed at the end of the package install. #### Set By Options and Configuration @@ -599,6 +595,7 @@ The following are experimental or use not recommended: Generate-CommandReference 'Optimize' '90' Generate-CommandReference 'Outdated' '100' Generate-CommandReference 'Pin' '110' + Generate-CommandReference 'Rule' '115' Generate-CommandReference 'Search' '120' Generate-CommandReference 'SetApiKey' '130' Generate-CommandReference 'Source' '140' diff --git a/Invoke-Tests.ps1 b/Invoke-Tests.ps1 index 4dbbbec82d..d6ce96f030 100644 --- a/Invoke-Tests.ps1 +++ b/Invoke-Tests.ps1 @@ -1,4 +1,4 @@ -#Requires -Module @{ ModuleName = 'pester'; ModuleVersion = '5.3.1' } +#Requires -Module @{ ModuleName = 'pester'; ModuleVersion = '5.3.1' } #Requires -RunAsAdministrator <# .SYNOPSIS @@ -22,7 +22,11 @@ param( # Indicate to skip packaging all of the tests packages. Useful for running tests after you've performed the tests previously. [switch] - $SkipPackaging + $SkipPackaging, + + # Specific tag(s) of tests to run + [string[]] + $Tag ) $packageRegex = 'chocolatey\.\d.*\.nupkg' @@ -50,7 +54,7 @@ else { if (-not (Test-Path "$TestPath/packages") -or -not $SkipPackaging) { $null = New-Item -Path "$TestPath/packages" -ItemType Directory -Force # Get and pack packages - $nuspecs = Get-ChildItem -Path $PSScriptRoot/src/chocolatey.tests.integration, $PSScriptRoot/tests/packages -Recurse -Include *.nuspec + $nuspecs = Get-ChildItem -Path $PSScriptRoot/src/chocolatey.tests.integration, $PSScriptRoot/tests/packages -Recurse -Include *.nuspec | Where-Object FullName -notmatch 'bin' Get-ChildItem -Path $PSScriptRoot/tests/packages -Recurse -Include *.nupkg | Copy-Item -Destination "$TestPath/packages" foreach ($file in $nuspecs) { @@ -124,11 +128,15 @@ try { } } + if ($Tag) { + $PesterConfiguration.Filter.Tag = $Tag + } + Invoke-Pester -Configuration $PesterConfiguration } finally { # For some reason we need to import this again... I'm not 100% sure on why... - Import-Module $TestPath/Chocolatey/tools/ChocolateyInstall/helpers/chocolateyInstaller.psm1 + Import-Module $TestPath/Chocolatey/tools/ChocolateyInstall/helpers/chocolateyInstaller.psm1 -Force # Put back Path and Chocolatey Set-EnvironmentVariable -Name 'PATH' -Scope 'User' -Value $environmentVariables.UserPath Set-EnvironmentVariable -Name 'ChocolateyInstall' -Scope 'User' -Value $environmentVariables.UserChocolateyInstall diff --git a/README.md b/README.md index ef882edff2..c0e3865bd7 100644 --- a/README.md +++ b/README.md @@ -120,6 +120,9 @@ Submitting a ticket: ## Contributing If you would like to contribute code or help squash a bug or two, that's awesome. Please familiarize yourself with [CONTRIBUTING](https://github.com/chocolatey/choco/blob/develop/CONTRIBUTING.md). +This project uses an [.editorconfig](https://editorconfig.org) file in order to help maintain consistency of code. +Errors and warnings produced by not following these defined conventions will in future be enforced at build time, so ensure your contributions adhere to the rules defined in it and produce no warnings or errors in Visual Studio. + ## Committers Committers, you should be very familiar with [COMMITTERS](https://github.com/chocolatey/choco/blob/develop/COMMITTERS.md). @@ -166,8 +169,7 @@ export PKG_CONFIG_PATH=/opt/local/lib/pkgconfig:/Library/Frameworks/Mono.framewo * Set your permissions correctly: ```sh -chmod +x build.sh -chmod +x zip.sh +chmod +x *.sh ``` ##### Build Process: diff --git a/TESTING.md b/TESTING.md index 30d443e02c..ff9bc9142d 100644 --- a/TESTING.md +++ b/TESTING.md @@ -139,4 +139,8 @@ The Pester tests have been modelled in a way to be testable without installing C To run them locally on your system: Open an administrative PowerShell prompt to the root of the repository, and run `./Invoke-Tests.ps1`. This script will then "install" Chocolatey to a temporary test directory, run the tests, and when complete attempt to restore the system as close to when it started as possible. The script takes the following parameters: `TestPath` The location to use as the base for the Chocolatey Tests, defaults to `$env:TEMP\chocolateyTests`. `TestPackage` The path to the `.nupkg` package to run tests against, defaults to `$chocolateyRepository\code_drop\Packages\Chocolatey\chocolatey.<version>.nupkg`. `SkipPackaging` Optionally skip the packaging of the test packages. -To use the `Vagrantfile` you need to change directory into the `tests` directory, then run `vagrant up`. The Vagrantfile has been tested with VirtualBox. The [box being used](https://app.vagrantup.com/StefanScherer/boxes/windows_2019) is currently only updated for vmware_desktop and virtualbox providers, but there is a dated hyperv one that should work. +#### Using the provided Vagrantfile + +To use the `Vagrantfile` you need to change directory into the `tests` directory, then run `vagrant up`. The Vagrantfile has been tested with VirtualBox. The [box being used](https://app.vagrantup.com/StefanScherer/boxes/windows_2019) is currently only updated for vmware_desktop and virtualbox providers, but there is a dated hyperv one that may work. + +Once the Vagrant box is booted, you can re-run just the tests by running `vagrant provision default --provision-with test`. If you would like to clear the packages and run fresh tests, you can run `vagrant provision default --provision-with clear-packages,test`. diff --git a/docker/Dockerfile.linux b/docker/Dockerfile.linux index 4becb323b9..db18977635 100644 --- a/docker/Dockerfile.linux +++ b/docker/Dockerfile.linux @@ -14,7 +14,7 @@ ENV GITHUB_BASE_REF=$github_base_ref ENV GITHUB_HEAD_REF=$github_head_ref ENV GITHUB_RUN_NUMBER=$github_run_number -RUN echo deb http://deb.debian.org/debian buster-backports main | tee /etc/apt/sources.list.d/buster-backports.list; \ +RUN echo deb http://archive.debian.org/debian buster-backports main | tee /etc/apt/sources.list.d/buster-backports.list; \ apt-get update && apt-get install -t buster-backports git -y RUN curl -o packages-microsoft-prod.deb https://packages.microsoft.com/config/debian/10/packages-microsoft-prod.deb; \ diff --git a/nuspec/chocolatey/chocolatey/tools/chocolateyInstall.ps1 b/nuspec/chocolatey/chocolatey/tools/chocolateyInstall.ps1 index 18bf36aad0..f1ab51971f 100644 --- a/nuspec/chocolatey/chocolatey/tools/chocolateyInstall.ps1 +++ b/nuspec/chocolatey/chocolatey/tools/chocolateyInstall.ps1 @@ -1,76 +1,288 @@ -$toolsPath = Split-Path -Parent $MyInvocation.MyCommand.Definition - -# Ensure module loading preference is on -$PSModuleAutoLoadingPreference = "All" - -$licensedAssembly = [System.AppDomain]::CurrentDomain.GetAssemblies() | - Where-Object { $_.GetName().Name -eq 'chocolatey.licensed' } | - Select-Object -First 1 - -if ($null -ne $licensedAssembly) { - # The licensed assembly is installed, check its supported Chocolatey versions and/or the assembly - # version so we can attempt to determine whether it's compatible with this version of Chocolatey. - $attributeData = $licensedAssembly.GetCustomAttributes($true) - - $minVersion = $attributeData | - Where-Object { $_.TypeId -like '*MinimumChocolateyVersion*' } | - Select-Object -ExpandProperty Version -First 1 - - $borderWidth = 70 - try { - $borderWidth = [System.Console]::BufferWidth - 10 - } - catch { - # Do nothing. This means we're in a non-interactive environment without a console attached. - } - - $messageBorder = '=' * $borderWidth - $extensionVersionWarning = @" -$messageBorder - -You are installing a version of Chocolatey that may not be compatible with the currently installed version of the chocolatey.extension package. -Running Chocolatey with the current version of the chocolatey.extension package is an unsupported configuration. -See https://ch0.co/compatibility for more information. - -If you are also modifying the chocolatey.extension package, you can ignore this warning. - -$messageBorder -"@ - - if ($null -ne $minVersion) { - # Found an explicit attribute declaring what version(s) of Chocolatey the current licensed - # assembly is known to work with. - # Check what Chocolatey version we're installing in Major.Minor.Patch form, stripping off any prerelease suffix - $packageVersion = $env:ChocolateyPackageVersion -replace '-.+$' -as [System.Version] - - if ($packageVersion -lt $minVersion) { - Write-Warning $extensionVersionWarning - } - } - else { - $version = $attributeData | - Where-Object { $_.TypeId -like '*AssemblyInformationalVersion*' } | - Select-Object -ExpandProperty InformationalVersion -First 1 - - # Strip off quotes and prerelease suffix if present, that's not critical for this check. - $version = $version -replace '-.+$' -as [System.Version] - - if ($version.Major -lt 4) { - Write-Warning $extensionVersionWarning - } - } -} - -$modules = Get-ChildItem $toolsPath -Filter *.psm1 -$modules | ForEach-Object { - $psm1File = $_.FullName - $moduleName = [System.IO.Path]::GetFileNameWithoutExtension($psm1File) - - if (Get-Module $moduleName) { - Remove-Module $moduleName -ErrorAction SilentlyContinue - } - - Import-Module -Name $psm1File -} - -Initialize-Chocolatey +$toolsPath = Split-Path -Parent $MyInvocation.MyCommand.Definition + +# Ensure module loading preference is on +$PSModuleAutoLoadingPreference = "All" + +$licensedAssembly = [System.AppDomain]::CurrentDomain.GetAssemblies() | + Where-Object { $_.GetName().Name -eq 'chocolatey.licensed' } | + Select-Object -First 1 + +if ($null -ne $licensedAssembly) { + # The licensed assembly is installed, check its supported Chocolatey versions and/or the assembly + # version so we can attempt to determine whether it's compatible with this version of Chocolatey. + $attributeData = $licensedAssembly.GetCustomAttributes($true) + + $minVersion = $attributeData | + Where-Object { $_.TypeId -like '*MinimumChocolateyVersion*' } | + Select-Object -ExpandProperty Version -First 1 + + $borderWidth = 70 + try { + $borderWidth = [System.Console]::BufferWidth - 10 + } + catch { + # Do nothing. This means we're in a non-interactive environment without a console attached. + } + + $messageBorder = '=' * $borderWidth + $extensionVersionWarning = @" +$messageBorder + +You are installing a version of Chocolatey that may not be compatible with the currently installed version of the chocolatey.extension package. +Running Chocolatey with the current version of the chocolatey.extension package is an unsupported configuration. +See https://ch0.co/compatibility for more information. + +If you are also modifying the chocolatey.extension package, you can ignore this warning. + +$messageBorder +"@ + + if ($null -ne $minVersion) { + # Found an explicit attribute declaring what version(s) of Chocolatey the current licensed + # assembly is known to work with. + # Check what Chocolatey version we're installing in Major.Minor.Patch form, stripping off any prerelease suffix + $packageVersion = $env:ChocolateyPackageVersion -replace '-.+$' -as [System.Version] + + if ($packageVersion -lt $minVersion) { + Write-Warning $extensionVersionWarning + } + } + else { + $version = $attributeData | + Where-Object { $_.TypeId -like '*AssemblyInformationalVersion*' } | + Select-Object -ExpandProperty InformationalVersion -First 1 + + # Strip off quotes and prerelease suffix if present, that's not critical for this check. + $version = $version -replace '-.+$' -as [System.Version] + + if ($version.Major -lt 4) { + Write-Warning $extensionVersionWarning + } + } +} + +$modules = Get-ChildItem $toolsPath -Filter *.psm1 +$modules | ForEach-Object { + $psm1File = $_.FullName + $moduleName = [System.IO.Path]::GetFileNameWithoutExtension($psm1File) + + if (Get-Module $moduleName) { + Remove-Module $moduleName -ErrorAction SilentlyContinue + } + + Import-Module -Name $psm1File +} + +Initialize-Chocolatey + +# SIG # Begin signature block +# MIInKwYJKoZIhvcNAQcCoIInHDCCJxgCAQExDzANBglghkgBZQMEAgEFADB5Bgor +# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAC2zftLYpmqtE9 +# 5VS2OXKJJZvvSMLWAFLPVru6KnvwjKCCIK4wggWNMIIEdaADAgECAhAOmxiO+dAt +# 5+/bUOIIQBhaMA0GCSqGSIb3DQEBDAUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK +# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV +# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0yMjA4MDEwMDAwMDBa +# Fw0zMTExMDkyMzU5NTlaMGIxCzAJBgNVBAYTAlVTMRUw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PN/WzduFsJKa09/4csElhSRLlX8J6NoIBzMiN6 +# 6RmS0tesyCHo5OIAp/SAQ48QMdLfxpmcA1r6ga3T7hGftt86dq06tB0rEjuqJOiO +# cLzTzctW+CHIb/v2mfqza41QAcQaMgObbmqMTbAaHA/SAnNdSp1RnVprVlrZtO1u +# vEnLreD9wf7JtDlaM4k+NhDHONSaUlWCtY/VfLY5UgA4fhHbGHMklL0TFrvzFKmq +# 2pcYcM/sA1nzrJce9uzDGiLHRfj2kYQ4R+y1K+pm5v+3PnjIHrYUMgrIvG+1bbUB +# 5vIpRlekYvruQpyMFC9BEo9O8G968b3K3X5jjFFab36Ny+qNlHuZ2p8iX97z34Ov +# 6ol35N9Doy5geapKN1LdLinvKwyC3ahPa8umXH0T2FW2MlyVQhEDmhfu1zR8f4Af +# bAadn1u5BgYgz81GB2hfAXD+wxjB7YWcWR9I1JQc8vIEPmTvo/Th0EaH81Ni2a8= +# SIG # End signature block diff --git a/nuspec/chocolatey/chocolatey/tools/chocolateysetup.psm1 b/nuspec/chocolatey/chocolatey/tools/chocolateysetup.psm1 index 66c25928b5..0034cbe82f 100644 --- a/nuspec/chocolatey/chocolatey/tools/chocolateysetup.psm1 +++ b/nuspec/chocolatey/chocolatey/tools/chocolateysetup.psm1 @@ -1,843 +1,1086 @@ -$thisScriptFolder = (Split-Path -Parent $MyInvocation.MyCommand.Definition) -$chocoInstallVariableName = "ChocolateyInstall" -$sysDrive = $env:SystemDrive -$tempDir = $env:TEMP -$defaultChocolateyPathOld = "$sysDrive\Chocolatey" - -$originalForegroundColor = $host.ui.RawUI.ForegroundColor - -function Write-ChocolateyWarning { - param ( - [string]$message = '' - ) - - try { - Write-Host "WARNING: $message" -ForegroundColor "Yellow" -ErrorAction "Stop" - } - catch { - Write-Output "WARNING: $message" - } -} - -function Write-ChocolateyError { - param ( - [string]$message = '' - ) - - try { - Write-Host "ERROR: $message" -ForegroundColor "Red" -ErrorAction "Stop" - } - catch { - Write-Output "ERROR: $message" - } -} - -function Remove-ShimWithAuthenticodeSignature { - param ( - [string] $filePath - ) - if (!(Test-Path $filePath)) { - return - } - - $signature = Get-AuthenticodeSignature $filePath -ErrorAction SilentlyContinue - - if (!$signature -or !$signature.SignerCertificate) { - Write-ChocolateyWarning "Shim found in $filePath, but was not signed. Ignoring removal..." - return - } - - $possibleSignatures = @( - 'RealDimensions Software, LLC' - 'Chocolatey Software, Inc\.' - ) - - $possibleSignatures | ForEach-Object { - if ($signature.SignerCertificate.Subject -match "$_") { - Write-Output "Removing shim $filePath" - $null = Remove-Item "$filePath" - - if (Test-Path "$filePath.ignore") { - $null = Remove-Item "$filePath.ignore" - } - - if (Test-Path "$filePath.old") { - $null = Remove-Item "$filePath.old" - } - } - } - - # This means the file was found, however did not get removed as it contained a authenticode signature that - # is not ours. - if (Test-Path $filePath) { - Write-ChocolateyWarning "Shim found in $filePath, but did not match our signature. Ignoring removal..." - return - } -} - -function Remove-UnsupportedShimFiles { - param([string[]]$Paths) - - $shims = @("cpack.exe", "cver.exe", "chocolatey.exe", "cinst.exe", "clist.exe", "cpush.exe", "cuninst.exe", "cup.exe") - - $Paths | ForEach-Object { - $path = $_ - $shims | ForEach-Object { Join-Path $path $_ } | Where-Object { Test-Path $_ } | ForEach-Object { - $shimPath = $_ - Write-Debug "Removing shim from '$shimPath'." - - try { - Remove-ShimWithAuthenticodeSignature -filePath $shimPath - } - catch { - Write-ChocolateyWarning "Unable to remove '$shimPath'. Please remove the file manually." - } - } - } -} - -function Initialize-Chocolatey { - <# - .DESCRIPTION - This will initialize the Chocolatey tool by - a) setting up the "chocolateyPath" (the location where all chocolatey nuget packages will be installed) - b) Installs chocolatey into the "chocolateyPath" - c) Installs .net 4.8 if needed - d) Adds Chocolatey to the PATH environment variable so you have access to the choco commands. - .PARAMETER ChocolateyPath - Allows you to override the default path of (C:\ProgramData\chocolatey\) by specifying a directory chocolatey will install nuget packages. - - .EXAMPLE - C:\PS> Initialize-Chocolatey - - Installs chocolatey into the default C:\ProgramData\Chocolatey\ directory. - - .EXAMPLE - C:\PS> Initialize-Chocolatey -chocolateyPath "D:\ChocolateyInstalledNuGets\" - - Installs chocolatey into the custom directory D:\ChocolateyInstalledNuGets\ - -#> - param( - [Parameter(Mandatory = $false)][string]$chocolateyPath = '' - ) - Write-Debug "Initialize-Chocolatey" - - $installModule = Join-Path $thisScriptFolder 'chocolateyInstall\helpers\chocolateyInstaller.psm1' - Import-Module $installModule -Force - - Install-DotNet48IfMissing - - if ($chocolateyPath -eq '') { - $programData = [Environment]::GetFolderPath("CommonApplicationData") - $chocolateyPath = Join-Path "$programData" 'chocolatey' - } - - # variable to allow insecure directory: - $allowInsecureRootInstall = $false - if ($env:ChocolateyAllowInsecureRootDirectory -eq 'true') { - $allowInsecureRootInstall = $true - } - - # if we have an already environment variable path, use it. - $alreadyInitializedNugetPath = Get-ChocolateyInstallFolder - if ($alreadyInitializedNugetPath -and $alreadyInitializedNugetPath -ne $chocolateyPath -and ($allowInsecureRootInstall -or $alreadyInitializedNugetPath -ne $defaultChocolateyPathOld)) { - $chocolateyPath = $alreadyInitializedNugetPath - } - else { - Set-ChocolateyInstallFolder $chocolateyPath - } - Create-DirectoryIfNotExists $chocolateyPath - Ensure-Permissions $chocolateyPath - - #set up variables to add - $chocolateyExePath = Join-Path $chocolateyPath 'bin' - $chocolateyLibPath = Join-Path $chocolateyPath 'lib' - - if ($tempDir -eq $null) { - $tempDir = Join-Path $chocolateyPath 'temp' - Create-DirectoryIfNotExists $tempDir - } - - $yourPkgPath = [System.IO.Path]::Combine($chocolateyLibPath, "yourPackageName") - @" -We are setting up the Chocolatey package repository. -The packages themselves go to `'$chocolateyLibPath`' - (i.e. $yourPkgPath). -A shim file for the command line goes to `'$chocolateyExePath`' - and points to an executable in `'$yourPkgPath`'. - -Creating Chocolatey folders if they do not already exist. - -"@ | Write-Output - - #create the base structure if it doesn't exist - Create-DirectoryIfNotExists $chocolateyExePath - Create-DirectoryIfNotExists $chocolateyLibPath - - $possibleShimPaths = @( - Join-Path "$chocolateyPath" "redirects" - Join-Path "$thisScriptFolder" "chocolateyInstall\redirects" - ) - Remove-UnsupportedShimFiles -Paths $possibleShimPaths - - Install-ChocolateyFiles $chocolateyPath - Ensure-ChocolateyLibFiles $chocolateyLibPath - - Install-ChocolateyBinFiles $chocolateyPath $chocolateyExePath - - $chocolateyExePathVariable = $chocolateyExePath.ToLower().Replace($chocolateyPath.ToLower(), "%DIR%..\").Replace("\\", "\") - Initialize-ChocolateyPath $chocolateyExePath $chocolateyExePathVariable - Process-ChocolateyBinFiles $chocolateyExePath $chocolateyExePathVariable - - $realModule = Join-Path $chocolateyPath "helpers\chocolateyInstaller.psm1" - Import-Module "$realModule" -Force - - if (-not $allowInsecureRootInstall -and (Test-Path($defaultChocolateyPathOld))) { - Upgrade-OldChocolateyInstall $defaultChocolateyPathOld $chocolateyPath - Install-ChocolateyBinFiles $chocolateyPath $chocolateyExePath - } - - Add-ChocolateyProfile - Invoke-Chocolatey-Initial - if ($env:ChocolateyExitCode -eq $null -or $env:ChocolateyExitCode -eq '') { - $env:ChocolateyExitCode = 0 - } - - @" -Chocolatey (choco.exe) is now ready. -You can call choco from anywhere, command line or powershell by typing choco. -Run choco /? for a list of functions. -You may need to shut down and restart powershell and/or consoles - first prior to using choco. -"@ | Write-Output - - if (-not $allowInsecureRootInstall) { - Remove-OldChocolateyInstall $defaultChocolateyPathOld - } - - Remove-UnsupportedShimFiles -Paths $chocolateyExePath -} - -function Set-ChocolateyInstallFolder { - param( - [string]$folder - ) - Write-Debug "Set-ChocolateyInstallFolder" - - $environmentTarget = [System.EnvironmentVariableTarget]::User - # removing old variable - Install-ChocolateyEnvironmentVariable -variableName "$chocoInstallVariableName" -variableValue $null -variableType $environmentTarget - if (Test-ProcessAdminRights) { - Write-Debug "Administrator installing so using Machine environment variable target instead of User." - $environmentTarget = [System.EnvironmentVariableTarget]::Machine - # removing old variable - Install-ChocolateyEnvironmentVariable -variableName "$chocoInstallVariableName" -variableValue $null -variableType $environmentTarget - } - else { - Write-ChocolateyWarning "Setting ChocolateyInstall Environment Variable on USER and not SYSTEM variables.`n This is due to either non-administrator install OR the process you are running is not being run as an Administrator." - } - - Write-Output "Creating $chocoInstallVariableName as an environment variable (targeting `'$environmentTarget`') `n Setting $chocoInstallVariableName to `'$folder`'" - Write-ChocolateyWarning "It's very likely you will need to close and reopen your shell `n before you can use choco." - Install-ChocolateyEnvironmentVariable -variableName "$chocoInstallVariableName" -variableValue "$folder" -variableType $environmentTarget -} - -function Get-ChocolateyInstallFolder() { - Write-Debug "Get-ChocolateyInstallFolder" - [Environment]::GetEnvironmentVariable($chocoInstallVariableName) -} - -function Create-DirectoryIfNotExists($folderName) { - Write-Debug "Create-DirectoryIfNotExists" - if (![System.IO.Directory]::Exists($folderName)) { - [System.IO.Directory]::CreateDirectory($folderName) | Out-Null - } -} - -function Get-LocalizedWellKnownPrincipalName { - param ( - [Parameter(Mandatory = $true)] - [Security.Principal.WellKnownSidType] $WellKnownSidType - ) - $sid = New-Object -TypeName 'System.Security.Principal.SecurityIdentifier' -ArgumentList @($WellKnownSidType, $null) - $account = $sid.Translate([Security.Principal.NTAccount]) - - return $account.Value -} - -function Ensure-Permissions { - param( - [string]$folder - ) - Write-Debug "Ensure-Permissions" - - $defaultInstallPath = "$env:SystemDrive\ProgramData\chocolatey" - try { - $defaultInstallPath = Join-Path ([Environment]::GetFolderPath("CommonApplicationData")) 'chocolatey' - } - catch { - # keep first setting - } - - if ($folder.ToLower() -ne $defaultInstallPath.ToLower()) { - Write-ChocolateyWarning "Installation folder is not the default. Not changing permissions. Please ensure your installation is secure." - return - } - - # Everything from here on out applies to the default installation folder - - if (!(Test-ProcessAdminRights)) { - throw "Installation of Chocolatey to default folder requires Administrative permissions. Please run from elevated prompt. Please see https://chocolatey.org/install for details and alternatives if needing to install as a non-administrator." - } - - $currentEA = $ErrorActionPreference - $ErrorActionPreference = 'Stop' - try { - # get current acl - $acl = Get-Acl $folder - - Write-Debug "Removing existing permissions." - $acl.Access | ForEach-Object { $acl.RemoveAccessRuleAll($_) } - - $inheritanceFlags = ([Security.AccessControl.InheritanceFlags]::ContainerInherit -bor [Security.AccessControl.InheritanceFlags]::ObjectInherit) - $propagationFlags = [Security.AccessControl.PropagationFlags]::None - - $rightsFullControl = [Security.AccessControl.FileSystemRights]::FullControl - $rightsModify = [Security.AccessControl.FileSystemRights]::Modify - $rightsReadExecute = [Security.AccessControl.FileSystemRights]::ReadAndExecute - $rightsWrite = [Security.AccessControl.FileSystemRights]::Write - - Write-Output "Restricting write permissions to Administrators" - $builtinAdmins = Get-LocalizedWellKnownPrincipalName -WellKnownSidType ([Security.Principal.WellKnownSidType]::BuiltinAdministratorsSid) - $adminsAccessRule = New-Object System.Security.AccessControl.FileSystemAccessRule($builtinAdmins, $rightsFullControl, $inheritanceFlags, $propagationFlags, "Allow") - $acl.SetAccessRule($adminsAccessRule) - $localSystem = Get-LocalizedWellKnownPrincipalName -WellKnownSidType ([Security.Principal.WellKnownSidType]::LocalSystemSid) - $localSystemAccessRule = New-Object System.Security.AccessControl.FileSystemAccessRule($localSystem, $rightsFullControl, $inheritanceFlags, $propagationFlags, "Allow") - $acl.SetAccessRule($localSystemAccessRule) - $builtinUsers = Get-LocalizedWellKnownPrincipalName -WellKnownSidType ([Security.Principal.WellKnownSidType]::BuiltinUsersSid) - $usersAccessRule = New-Object System.Security.AccessControl.FileSystemAccessRule($builtinUsers, $rightsReadExecute, $inheritanceFlags, $propagationFlags, "Allow") - $acl.SetAccessRule($usersAccessRule) - - $allowCurrentUser = $env:ChocolateyInstallAllowCurrentUser -eq 'true' - if ($allowCurrentUser) { - # get current user - $currentUser = [Security.Principal.WindowsIdentity]::GetCurrent() - - if ($currentUser.Name -ne $localSystem) { - $userAccessRule = New-Object System.Security.AccessControl.FileSystemAccessRule($currentUser.Name, $rightsModify, $inheritanceFlags, $propagationFlags, "Allow") - Write-ChocolateyWarning 'Adding Modify permission for current user due to $env:ChocolateyInstallAllowCurrentUser. This could lead to escalation of privilege attacks. Consider not allowing this.' - $acl.SetAccessRule($userAccessRule) - } - } - else { - Write-Debug 'Current user no longer set due to possible escalation of privileges - set $env:ChocolateyInstallAllowCurrentUser="true" if you require this.' - } - - Write-Debug "Set Owner to Administrators" - $builtinAdminsSid = New-Object System.Security.Principal.SecurityIdentifier([Security.Principal.WellKnownSidType]::BuiltinAdministratorsSid, $null) - $acl.SetOwner($builtinAdminsSid) - - Write-Debug "Default Installation folder - removing inheritance with no copy" - $acl.SetAccessRuleProtection($true, $false) - - # enact the changes against the actual - Set-Acl -Path $folder -AclObject $acl - - # set an explicit append permission on the logs folder - Write-Debug "Allow users to append to log files." - $logsFolder = "$folder\logs" - Create-DirectoryIfNotExists $logsFolder - $logsAcl = Get-Acl $logsFolder - $usersAppendAccessRule = New-Object System.Security.AccessControl.FileSystemAccessRule($builtinUsers, $rightsWrite, [Security.AccessControl.InheritanceFlags]::ObjectInherit, [Security.AccessControl.PropagationFlags]::InheritOnly, "Allow") - $logsAcl.SetAccessRule($usersAppendAccessRule) - $logsAcl.SetAccessRuleProtection($false, $true) - Set-Acl -Path $logsFolder -AclObject $logsAcl - } - catch { - Write-ChocolateyWarning "Not able to set permissions for $folder." - } - $ErrorActionPreference = $currentEA -} - -function Upgrade-OldChocolateyInstall { - param( - [string]$chocolateyPathOld = "$sysDrive\Chocolatey", - [string]$chocolateyPath = "$($env:ALLUSERSPROFILE)\chocolatey" - ) - - Write-Debug "Upgrade-OldChocolateyInstall" - - if (Test-Path $chocolateyPathOld) { - Write-Output "Attempting to upgrade `'$chocolateyPathOld`' to `'$chocolateyPath`'." - Write-ChocolateyWarning "Copying the contents of `'$chocolateyPathOld`' to `'$chocolateyPath`'. `n This step may fail if you have anything in this folder running or locked." - Write-Output 'If it fails, just manually copy the rest of the items out and then delete the folder.' - Write-ChocolateyWarning "!!!! ATTN: YOU WILL NEED TO CLOSE AND REOPEN YOUR SHELL !!!!" - #-ForegroundColor Magenta -BackgroundColor Black - - $chocolateyExePathOld = Join-Path $chocolateyPathOld 'bin' - 'Machine', 'User' | - ForEach-Object { - $path = Get-EnvironmentVariable -Name 'PATH' -Scope $_ - $updatedPath = [System.Text.RegularExpressions.Regex]::Replace($path, [System.Text.RegularExpressions.Regex]::Escape($chocolateyExePathOld) + '(?>;)?', '', [System.Text.RegularExpressions.RegexOptions]::IgnoreCase) - if ($updatedPath -ne $path) { - Write-Output "Updating `'$_`' PATH to reflect removal of '$chocolateyPathOld'." - try { - Set-EnvironmentVariable -Name 'Path' -Value $updatedPath -Scope $_ -ErrorAction Stop - } - catch { - Write-ChocolateyWarning "Was not able to remove the old environment variable from PATH. You will need to do this manually" - } - } - } - - Copy-Item "$chocolateyPathOld\lib\*" "$chocolateyPath\lib" -Force -Recurse - - $from = "$chocolateyPathOld\bin" - $to = "$chocolateyPath\bin" - # TODO: This exclusion list needs to be updated once shims are removed - $exclude = @("choco.exe", "RefreshEnv.cmd") - Get-ChildItem -Path $from -Recurse -Exclude $exclude | - ForEach-Object { - Write-Debug "Copying $_ `n to $to" - if ($_.PSIsContainer) { - Copy-Item $_ -Destination (Join-Path $to $_.Parent.FullName.Substring($from.length)) -Force -ErrorAction SilentlyContinue - } - else { - $fileToMove = (Join-Path $to $_.FullName.Substring($from.length)) - try { - Copy-Item $_ -Destination $fileToMove -Exclude $exclude -Force -ErrorAction Stop - } - catch { - Write-ChocolateyWarning "Was not able to move `'$fileToMove`'. You may need to reinstall the shim" - } - } - } - } -} - -function Remove-OldChocolateyInstall { - param( - [string]$chocolateyPathOld = "$sysDrive\Chocolatey" - ) - Write-Debug "Remove-OldChocolateyInstall" - - if (Test-Path $chocolateyPathOld) { - Write-ChocolateyWarning "This action will result in Log Errors, you can safely ignore those. `n You may need to finish removing '$chocolateyPathOld' manually." - try { - Get-ChildItem -Path "$chocolateyPathOld" | ForEach-Object { - if (Test-Path $_.FullName) { - Write-Debug "Removing $_ unless matches .log" - Remove-Item $_.FullName -Exclude *.log -Recurse -Force -ErrorAction SilentlyContinue - } - } - - Write-Output "Attempting to remove `'$chocolateyPathOld`'. This may fail if something in the folder is being used or locked." - Remove-Item "$($chocolateyPathOld)" -Force -Recurse -ErrorAction Stop - } - catch { - Write-ChocolateyWarning "Was not able to remove `'$chocolateyPathOld`'. You will need to manually remove it." - } - } -} - -function Install-ChocolateyFiles { - param( - [string]$chocolateyPath - ) - Write-Debug "Install-ChocolateyFiles" - - Write-Debug "Removing install files in chocolateyInstall, helpers, redirects, and tools" - "$chocolateyPath\chocolateyInstall", "$chocolateyPath\helpers", "$chocolateyPath\redirects", "$chocolateyPath\tools" | ForEach-Object { - #Write-Debug "Checking path $_" - - if (Test-Path $_) { - Get-ChildItem -Path "$_" | ForEach-Object { - #Write-Debug "Checking child path $_ ($($_.FullName))" - if (Test-Path $_.FullName) { - Write-Debug "Removing $_ unless matches .log" - Remove-Item $_.FullName -Exclude *.log -Recurse -Force -ErrorAction SilentlyContinue - } - } - } - } - - Write-Debug "Attempting to move choco.exe to choco.exe.old so we can place the new version here." - # rename the currently running process / it will be locked if it exists - $chocoExe = Join-Path $chocolateyPath 'choco.exe' - if (Test-Path ($chocoExe)) { - Write-Debug "Renaming '$chocoExe' to '$chocoExe.old'" - try { - Remove-Item "$chocoExe.old" -Force -ErrorAction SilentlyContinue - Move-Item $chocoExe "$chocoExe.old" -Force -ErrorAction SilentlyContinue - } - catch { - Write-ChocolateyWarning "Was not able to rename `'$chocoExe`' to `'$chocoExe.old`'." - } - } - - # remove pdb file if it is found - $chocoPdb = Join-Path $chocolateyPath 'choco.pdb' - if (Test-Path ($chocoPdb)) { - Remove-Item "$chocoPdb" -Force -ErrorAction SilentlyContinue - } - - Write-Debug "Unpacking files required for Chocolatey." - $chocoInstallFolder = Join-Path $thisScriptFolder "chocolateyInstall" - $chocoExe = Join-Path $chocoInstallFolder 'choco.exe' - $chocoExeDest = Join-Path $chocolateyPath 'choco.exe' - Copy-Item $chocoExe $chocoExeDest -Force - - Write-Debug "Copying the contents of `'$chocoInstallFolder`' to `'$chocolateyPath`'." - Copy-Item $chocoInstallFolder\* $chocolateyPath -Recurse -Force -} - -function Ensure-ChocolateyLibFiles { - param( - [string]$chocolateyLibPath - ) - Write-Debug "Ensure-ChocolateyLibFiles" - $chocoPkgDirectory = Join-Path $chocolateyLibPath 'chocolatey' - - Create-DirectoryIfNotExists $chocoPkgDirectory - - if (!(Test-Path("$chocoPkgDirectory\chocolatey.nupkg"))) { - Write-Output "chocolatey.nupkg file not installed in lib.`n Attempting to locate it from bootstrapper." - $chocoZipFile = Join-Path $tempDir "chocolatey\chocoInstall\chocolatey.zip" - - Write-Debug "First the zip file at '$chocoZipFile'." - Write-Debug "Then from a neighboring chocolatey.*nupkg file '$thisScriptFolder/../../'." - - if (Test-Path("$chocoZipFile")) { - Write-Debug "Copying '$chocoZipFile' to '$chocoPkgDirectory\chocolatey.nupkg'." - Copy-Item "$chocoZipFile" "$chocoPkgDirectory\chocolatey.nupkg" -Force -ErrorAction SilentlyContinue - } - - if (!(Test-Path("$chocoPkgDirectory\chocolatey.nupkg"))) { - $chocoPkg = Get-ChildItem "$thisScriptFolder/../../" | - Where-Object { $_.name -match "^chocolatey.*nupkg" } | - Sort-Object name -Descending | - Select-Object -First 1 - if ($chocoPkg -ne '') { - $chocoPkg = $chocoPkg.FullName - } - "$chocoZipFile", "$chocoPkg" | ForEach-Object { - if ($_ -ne $null -and $_ -ne '') { - if (Test-Path $_) { - Write-Debug "Copying '$_' to '$chocoPkgDirectory\chocolatey.nupkg'." - Copy-Item $_ "$chocoPkgDirectory\chocolatey.nupkg" -Force -ErrorAction SilentlyContinue - } - } - } - } - } -} - -function Install-ChocolateyBinFiles { - param( - [string] $chocolateyPath, - [string] $chocolateyExePath - ) - Write-Debug "Install-ChocolateyBinFiles" - Write-Debug "Installing the bin file redirects" - $redirectsPath = Join-Path $chocolateyPath 'redirects' - if (!(Test-Path "$redirectsPath")) { - Write-ChocolateyWarning "$redirectsPath does not exist" - return - } - - $exeFiles = Get-ChildItem "$redirectsPath" -Include @("*.exe", "*.cmd") -Recurse - foreach ($exeFile in $exeFiles) { - $exeFilePath = $exeFile.FullName - $exeFileName = [System.IO.Path]::GetFileName("$exeFilePath") - $binFilePath = Join-Path $chocolateyExePath $exeFileName - $binFilePathRename = $binFilePath + '.old' - $batchFilePath = $binFilePath.Replace(".exe", ".bat") - $bashFilePath = $binFilePath.Replace(".exe", "") - if (Test-Path ($batchFilePath)) { - Remove-Item $batchFilePath -Force -ErrorAction SilentlyContinue - } - if (Test-Path ($bashFilePath)) { - Remove-Item $bashFilePath -Force -ErrorAction SilentlyContinue - } - if (Test-Path ($binFilePathRename)) { - try { - Write-Debug "Attempting to remove $binFilePathRename" - Remove-Item $binFilePathRename -Force -ErrorAction Stop - } - catch { - Write-ChocolateyWarning "Was not able to remove `'$binFilePathRename`'. This may cause errors." - } - } - if (Test-Path ($binFilePath)) { - try { - Write-Debug "Attempting to rename $binFilePath to $binFilePathRename" - Move-Item -Path $binFilePath -Destination $binFilePathRename -Force -ErrorAction Stop - } - catch { - Write-ChocolateyWarning "Was not able to rename `'$binFilePath`' to `'$binFilePathRename`'." - } - } - - try { - Write-Debug "Attempting to copy $exeFilePath to $binFilePath" - Copy-Item -Path $exeFilePath -Destination $binFilePath -Force -ErrorAction Stop - } - catch { - Write-ChocolateyWarning "Was not able to replace `'$binFilePath`' with `'$exeFilePath`'. You may need to do this manually." - } - - $commandShortcut = [System.IO.Path]::GetFileNameWithoutExtension("$exeFilePath") - Write-Debug "Added command $commandShortcut" - } -} - -function Initialize-ChocolateyPath { - param( - [string]$chocolateyExePath = "$($env:ALLUSERSPROFILE)\chocolatey\bin", - [string]$chocolateyExePathVariable = "%$($chocoInstallVariableName)%\bin" - ) - Write-Debug "Initialize-ChocolateyPath" - Write-Debug "Initializing Chocolatey Path if required" - $environmentTarget = [System.EnvironmentVariableTarget]::User - if (Test-ProcessAdminRights) { - Write-Debug "Administrator installing so using Machine environment variable target instead of User." - $environmentTarget = [System.EnvironmentVariableTarget]::Machine - } - else { - Write-ChocolateyWarning "Setting ChocolateyInstall Path on USER PATH and not SYSTEM Path.`n This is due to either non-administrator install OR the process you are running is not being run as an Administrator." - } - - Install-ChocolateyPath -pathToInstall "$chocolateyExePath" -pathType $environmentTarget -} - -function Process-ChocolateyBinFiles { - param( - [string]$chocolateyExePath = "$($env:ALLUSERSPROFILE)\chocolatey\bin", - [string]$chocolateyExePathVariable = "%$($chocoInstallVariableName)%\bin" - ) - Write-Debug "Process-ChocolateyBinFiles" - $processedMarkerFile = Join-Path $chocolateyExePath '_processed.txt' - if (!(Test-Path $processedMarkerFile)) { - $files = Get-ChildItem $chocolateyExePath -Include *.bat -Recurse - if ($files -ne $null -and $files.Count -gt 0) { - Write-Debug "Processing Bin files" - foreach ($file in $files) { - Write-Output "Processing $($file.Name) to make it portable" - $fileStream = [System.IO.File]::Open("$file", 'Open', 'Read', 'ReadWrite') - $reader = New-Object System.IO.StreamReader($fileStream) - $fileText = $reader.ReadToEnd() - $reader.Close() - $fileStream.Close() - - $fileText = $fileText.ToLower().Replace("`"" + $chocolateyPath.ToLower(), "SET DIR=%~dp0%`n""%DIR%..\").Replace("\\", "\") - - Set-Content $file -Value $fileText -Encoding Ascii - } - } - - Set-Content $processedMarkerFile -Value "$([System.DateTime]::Now.Date)" -Encoding Ascii - } -} - -# Adapted from http://www.west-wind.com/Weblog/posts/197245.aspx -function Get-FileEncoding($Path) { - if ($PSVersionTable.PSVersion.Major -lt 6) { - Write-Debug "Detected Powershell version < 6 ; Using -Encoding byte parameter" - $bytes = [byte[]](Get-Content $Path -Encoding byte -ReadCount 4 -TotalCount 4) - } - else { - Write-Debug "Detected Powershell version >= 6 ; Using -AsByteStream parameter" - $bytes = [byte[]](Get-Content $Path -AsByteStream -ReadCount 4 -TotalCount 4) - } - - if (!$bytes) { - return 'utf8' - } - - switch -regex ('{0:x2}{1:x2}{2:x2}{3:x2}' -f $bytes[0], $bytes[1], $bytes[2], $bytes[3]) { - '^efbbbf' { - return 'utf8' - } - '^2b2f76' { - return 'utf7' - } - '^fffe' { - return 'unicode' - } - '^feff' { - return 'bigendianunicode' - } - '^0000feff' { - return 'utf32' - } - default { - return 'ascii' - } - } -} - -function Add-ChocolateyProfile { - Write-Debug "Add-ChocolateyProfile" - try { - $profileFile = "$profile" - if ($profileFile -eq $null -or $profileFile -eq '') { - Write-Output 'Not setting tab completion: Profile variable ($profile) resulted in an empty string.' - return - } - - $profileDirectory = (Split-Path -Parent $profileFile) - - if ($env:ChocolateyNoProfile -ne $null -and $env:ChocolateyNoProfile -ne '') { - Write-Warning "Not setting tab completion: Environment variable "ChocolateyNoProfile" exists and is set." - return - } - - $localSystem = Get-LocalizedWellKnownPrincipalName -WellKnownSidType ([Security.Principal.WellKnownSidType]::LocalSystemSid) - # get current user - $currentUser = [Security.Principal.WindowsIdentity]::GetCurrent() - if ($currentUser.Name -eq $localSystem) { - Write-Warning "Not setting tab completion: Current user is SYSTEM user." - return - } - - if (!(Test-Path($profileDirectory))) { - Write-Debug "Creating '$profileDirectory'" - New-Item "$profileDirectory" -Type Directory -Force -ErrorAction SilentlyContinue | Out-Null - } - - if (!(Test-Path($profileFile))) { - Write-Warning "Not setting tab completion: Profile file does not exist at '$profileFile'." - return - - #Write-Debug "Creating '$profileFile'" - #"" | Out-File $profileFile -Encoding UTF8 - } - - # Check authenticode, but only if file is greater than 5 bytes - $profileFileInfo = New-Object System.IO.FileInfo($profileFile) - if ($profileFileInfo.Length -gt 5) { - $signature = Get-AuthenticodeSignature $profile - if ($signature.Status -ne 'NotSigned') { - Write-Warning "Not setting tab completion: File is Authenticode signed at '$profile'." - return - } - } - - $profileInstall = @' - -# Import the Chocolatey Profile that contains the necessary code to enable -# tab-completions to function for `choco`. -# Be aware that if you are missing these lines from your profile, tab completion -# for `choco` will not function. -# See https://ch0.co/tab-completion for details. -$ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" -if (Test-Path($ChocolateyProfile)) { - Import-Module "$ChocolateyProfile" -} -'@ - - $chocoProfileSearch = '$ChocolateyProfile' - if (Select-String -Path $profileFile -Pattern $chocoProfileSearch -Quiet -SimpleMatch) { - Write-Debug "Chocolatey profile is already installed." - return - } - - Write-Output 'Adding Chocolatey to the profile. This will provide tab completion, refreshenv, etc.' - $profileInstall | Out-File $profileFile -Append -Encoding (Get-FileEncoding $profileFile) - Write-ChocolateyWarning 'Chocolatey profile installed. Reload your profile - type . $profile' - - if ($PSVersionTable.PSVersion.Major -lt 3) { - Write-ChocolateyWarning "Tab completion does not currently work in PowerShell v2. `n Please upgrade to a more recent version of PowerShell to take advantage of tab completion." - #Write-ChocolateyWarning "To load tab expansion, you need to install PowerTab. `n See https://powertab.codeplex.com/ for details." - } - } - catch { - Write-ChocolateyWarning "Unable to add Chocolatey to the profile. You will need to do it manually. Error was '$_'" - @' -This is how add the Chocolatey Profile manually. -Find your $profile. Then add the following lines to it: - -$ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" -if (Test-Path($ChocolateyProfile)) { - Import-Module "$ChocolateyProfile" -} -'@ | Write-Output - } -} - -$netFx48InstallTries = 0 - -function Install-DotNet48IfMissing { - param( - $forceFxInstall = $false - ) - # we can't take advantage of any chocolatey module functions, because they - # haven't been unpacked because they require .NET Framework 4.8 - - Write-Debug "Install-DotNet48IfMissing called with `$forceFxInstall=$forceFxInstall" - $NetFxArch = "Framework" - if ([IntPtr]::Size -eq 8) { - $NetFxArch = "Framework64" - } - - $NetFx48Url = 'https://download.visualstudio.microsoft.com/download/pr/2d6bb6b2-226a-4baa-bdec-798822606ff1/8494001c276a4b96804cde7829c04d7f/ndp48-x86-x64-allos-enu.exe' - $NetFx48Path = "$tempDir" - $NetFx48InstallerFile = 'ndp48-x86-x64-allos-enu.exe' - $NetFx48Installer = Join-Path $NetFx48Path $NetFx48InstallerFile - - if (((Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" -ErrorAction SilentlyContinue).Release -lt 528040) -or $forceFxInstall) { - Write-Output "The registry key for .Net 4.8 was not found or this is forced" - - if (Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending") { - Write-Warning "A reboot is required. `n If you encounter errors, reboot the system and attempt the operation again" - } - - $netFx48InstallTries += 1 - - if (!(Test-Path $NetFx48Installer)) { - Write-Output "Downloading `'$NetFx48Url`' to `'$NetFx48Installer`' - the installer is 100+ MBs, so this could take a while on a slow connection." - (New-Object Net.WebClient).DownloadFile("$NetFx48Url","$NetFx48Installer") - } - - $psi = New-Object System.Diagnostics.ProcessStartInfo - $psi.WorkingDirectory = "$NetFx48Path" - $psi.FileName = "$NetFx48InstallerFile" - # https://msdn.microsoft.com/library/ee942965(v=VS.100).aspx#command_line_options - # http://blogs.msdn.com/b/astebner/archive/2010/05/12/10011664.aspx - # For the actual setup.exe (if you want to unpack first) - /repair /x86 /x64 /ia64 /parameterfolder Client /q /norestart - $psi.Arguments = "/q /norestart" - - Write-Output "Installing `'$NetFx48Installer`' - this may take awhile with no output." - $s = [System.Diagnostics.Process]::Start($psi); - $s.WaitForExit(); - if ($s.ExitCode -eq 1641 -or $s.ExitCode -eq 3010) { - throw ".NET Framework 4.8 was installed, but a reboot is required. `n Please reboot the system and try to install/upgrade Chocolatey again." - } - if ($s.ExitCode -ne 0) { - if ($netFx48InstallTries -ge 2) { - Write-ChocolateyError ".NET Framework install failed with exit code `'$($s.ExitCode)`'. `n This will cause the rest of the install to fail." - throw "Error installing .NET Framework 4.8 (exit code $($s.ExitCode)). `n Please install the .NET Framework 4.8 manually and reboot the system `n and then try to install/upgrade Chocolatey again. `n Download at `'$NetFx48Url`'" - } else { - Write-ChocolateyWarning "Try #$netFx48InstallTries of .NET framework install failed with exit code `'$($s.ExitCode)`'. Trying again." - Install-DotNet48IfMissing $true - } - } - } -} - -function Invoke-Chocolatey-Initial { - Write-Debug "Initializing Chocolatey files, etc by running Chocolatey..." - - try { - $chocoInstallationFolder = Get-ChocolateyInstallFolder - $chocoExe = Join-Path -Path $chocoInstallationFolder -ChildPath "choco.exe" - & $chocoExe -v | Out-Null - Write-Debug "Chocolatey execution completed successfully." - } - catch { - Write-ChocolateyWarning "Unable to run Chocolatey at this time. It is likely that .Net Framework installation requires a system reboot" - } -} - -Export-ModuleMember -Function Initialize-Chocolatey; +$thisScriptFolder = (Split-Path -Parent $MyInvocation.MyCommand.Definition) +$chocoInstallVariableName = "ChocolateyInstall" +$sysDrive = $env:SystemDrive +$tempDir = $env:TEMP +$defaultChocolateyPathOld = "$sysDrive\Chocolatey" + +$originalForegroundColor = $host.ui.RawUI.ForegroundColor + +function Write-ChocolateyWarning { + param ( + [string]$message = '' + ) + + try { + Write-Host "WARNING: $message" -ForegroundColor "Yellow" -ErrorAction "Stop" + } + catch { + Write-Output "WARNING: $message" + } +} + +function Write-ChocolateyError { + param ( + [string]$message = '' + ) + + try { + Write-Host "ERROR: $message" -ForegroundColor "Red" -ErrorAction "Stop" + } + catch { + Write-Output "ERROR: $message" + } +} + +function Remove-ShimWithAuthenticodeSignature { + param ( + [string] $filePath + ) + if (!(Test-Path $filePath)) { + return + } + + $signature = Get-AuthenticodeSignature $filePath -ErrorAction SilentlyContinue + + if (!$signature -or !$signature.SignerCertificate) { + Write-ChocolateyWarning "Shim found in $filePath, but was not signed. Ignoring removal..." + return + } + + $possibleSignatures = @( + 'RealDimensions Software, LLC' + 'Chocolatey Software, Inc\.' + 'Chocolatey Software, Inc' + ) + + $possibleSignatures | ForEach-Object { + if ($signature.SignerCertificate.Subject -match "$_") { + Write-Output "Removing shim $filePath" + $null = Remove-Item "$filePath" + + if (Test-Path "$filePath.ignore") { + $null = Remove-Item "$filePath.ignore" + } + + if (Test-Path "$filePath.old") { + $null = Remove-Item "$filePath.old" + } + } + } + + # This means the file was found, however did not get removed as it contained a authenticode signature that + # is not ours. + if (Test-Path $filePath) { + Write-ChocolateyWarning "Shim found in $filePath, but did not match our signature. Ignoring removal..." + return + } +} + +function Remove-UnsupportedShimFiles { + param([string[]]$Paths) + + $shims = @("cpack.exe", "cver.exe", "chocolatey.exe", "cinst.exe", "clist.exe", "cpush.exe", "cuninst.exe", "cup.exe") + + $Paths | ForEach-Object { + $path = $_ + $shims | ForEach-Object { Join-Path $path $_ } | Where-Object { Test-Path $_ } | ForEach-Object { + $shimPath = $_ + Write-Debug "Removing shim from '$shimPath'." + + try { + Remove-ShimWithAuthenticodeSignature -filePath $shimPath + } + catch { + Write-ChocolateyWarning "Unable to remove '$shimPath'. Please remove the file manually." + } + } + } +} + +function Initialize-Chocolatey { + <# + .DESCRIPTION + This will initialize the Chocolatey tool by + a) setting up the "chocolateyPath" (the location where all chocolatey nuget packages will be installed) + b) Installs chocolatey into the "chocolateyPath" + c) Installs .net 4.8 if needed + d) Adds Chocolatey to the PATH environment variable so you have access to the choco commands. + .PARAMETER ChocolateyPath + Allows you to override the default path of (C:\ProgramData\chocolatey\) by specifying a directory chocolatey will install nuget packages. + + .EXAMPLE + C:\PS> Initialize-Chocolatey + + Installs chocolatey into the default C:\ProgramData\Chocolatey\ directory. + + .EXAMPLE + C:\PS> Initialize-Chocolatey -chocolateyPath "D:\ChocolateyInstalledNuGets\" + + Installs chocolatey into the custom directory D:\ChocolateyInstalledNuGets\ + +#> + param( + [Parameter(Mandatory = $false)][string]$chocolateyPath = '' + ) + Write-Debug "Initialize-Chocolatey" + + $installModule = Join-Path $thisScriptFolder 'chocolateyInstall\helpers\chocolateyInstaller.psm1' + Import-Module $installModule -Force + + Install-DotNet48IfMissing + + if ($chocolateyPath -eq '') { + $programData = [Environment]::GetFolderPath("CommonApplicationData") + $chocolateyPath = Join-Path "$programData" 'chocolatey' + } + + # variable to allow insecure directory: + $allowInsecureRootInstall = $false + if ($env:ChocolateyAllowInsecureRootDirectory -eq 'true') { + $allowInsecureRootInstall = $true + } + + # if we have an already environment variable path, use it. + $alreadyInitializedNugetPath = Get-ChocolateyInstallFolder + if ($alreadyInitializedNugetPath -and $alreadyInitializedNugetPath -ne $chocolateyPath -and ($allowInsecureRootInstall -or $alreadyInitializedNugetPath -ne $defaultChocolateyPathOld)) { + $chocolateyPath = $alreadyInitializedNugetPath + } + else { + Set-ChocolateyInstallFolder $chocolateyPath + } + Create-DirectoryIfNotExists $chocolateyPath + Ensure-Permissions $chocolateyPath + + #set up variables to add + $chocolateyExePath = Join-Path $chocolateyPath 'bin' + $chocolateyLibPath = Join-Path $chocolateyPath 'lib' + + if ($tempDir -eq $null) { + $tempDir = Join-Path $chocolateyPath 'temp' + Create-DirectoryIfNotExists $tempDir + } + + $yourPkgPath = [System.IO.Path]::Combine($chocolateyLibPath, "yourPackageName") + @" +We are setting up the Chocolatey package repository. +The packages themselves go to `'$chocolateyLibPath`' + (i.e. $yourPkgPath). +A shim file for the command line goes to `'$chocolateyExePath`' + and points to an executable in `'$yourPkgPath`'. + +Creating Chocolatey CLI folders if they do not already exist. + +"@ | Write-Output + + #create the base structure if it doesn't exist + Create-DirectoryIfNotExists $chocolateyExePath + Create-DirectoryIfNotExists $chocolateyLibPath + + $possibleShimPaths = @( + Join-Path "$chocolateyPath" "redirects" + Join-Path "$thisScriptFolder" "chocolateyInstall\redirects" + ) + Remove-UnsupportedShimFiles -Paths $possibleShimPaths + + Install-ChocolateyFiles $chocolateyPath + Ensure-ChocolateyLibFiles $chocolateyLibPath + + Install-ChocolateyBinFiles $chocolateyPath $chocolateyExePath + + $chocolateyExePathVariable = $chocolateyExePath.ToLower().Replace($chocolateyPath.ToLower(), "%DIR%..\").Replace("\\", "\") + Initialize-ChocolateyPath $chocolateyExePath $chocolateyExePathVariable + Process-ChocolateyBinFiles $chocolateyExePath $chocolateyExePathVariable + + $realModule = Join-Path $chocolateyPath "helpers\chocolateyInstaller.psm1" + Import-Module "$realModule" -Force + + if (-not $allowInsecureRootInstall -and (Test-Path($defaultChocolateyPathOld))) { + Upgrade-OldChocolateyInstall $defaultChocolateyPathOld $chocolateyPath + Install-ChocolateyBinFiles $chocolateyPath $chocolateyExePath + } + + Add-ChocolateyProfile + Invoke-Chocolatey-Initial + if ($env:ChocolateyExitCode -eq $null -or $env:ChocolateyExitCode -eq '') { + $env:ChocolateyExitCode = 0 + } + + if ($script:DotNetInstallRequiredReboot) { + @" +Chocolatey CLI (choco.exe) is nearly ready. +You need to restart this machine prior to using choco. +"@ | Write-Output + } else { + @" +Chocolatey CLI (choco.exe) is now ready. +You can call choco from anywhere, command line or powershell by typing choco. +Run choco /? for a list of functions. +You may need to shut down and restart powershell and/or consoles + first prior to using choco. +"@ | Write-Output + } + + if (-not $allowInsecureRootInstall) { + Remove-OldChocolateyInstall $defaultChocolateyPathOld + } + + Remove-UnsupportedShimFiles -Paths $chocolateyExePath +} + +function Set-ChocolateyInstallFolder { + param( + [string]$folder + ) + Write-Debug "Set-ChocolateyInstallFolder" + + $environmentTarget = [System.EnvironmentVariableTarget]::User + # removing old variable + Install-ChocolateyEnvironmentVariable -variableName "$chocoInstallVariableName" -variableValue $null -variableType $environmentTarget + if (Test-ProcessAdminRights) { + Write-Debug "Administrator installing so using Machine environment variable target instead of User." + $environmentTarget = [System.EnvironmentVariableTarget]::Machine + # removing old variable + Install-ChocolateyEnvironmentVariable -variableName "$chocoInstallVariableName" -variableValue $null -variableType $environmentTarget + } + else { + Write-ChocolateyWarning "Setting ChocolateyInstall Environment Variable on USER and not SYSTEM variables.`n This is due to either non-administrator install OR the process you are running is not being run as an Administrator." + } + + Write-Output "Creating $chocoInstallVariableName as an environment variable (targeting `'$environmentTarget`') `n Setting $chocoInstallVariableName to `'$folder`'" + Write-ChocolateyWarning "It's very likely you will need to close and reopen your shell `n before you can use choco." + Install-ChocolateyEnvironmentVariable -variableName "$chocoInstallVariableName" -variableValue "$folder" -variableType $environmentTarget +} + +function Get-ChocolateyInstallFolder() { + Write-Debug "Get-ChocolateyInstallFolder" + [Environment]::GetEnvironmentVariable($chocoInstallVariableName) +} + +function Create-DirectoryIfNotExists($folderName) { + Write-Debug "Create-DirectoryIfNotExists" + if (![System.IO.Directory]::Exists($folderName)) { + [System.IO.Directory]::CreateDirectory($folderName) | Out-Null + } +} + +function Get-LocalizedWellKnownPrincipalName { + param ( + [Parameter(Mandatory = $true)] + [Security.Principal.WellKnownSidType] $WellKnownSidType + ) + $sid = New-Object -TypeName 'System.Security.Principal.SecurityIdentifier' -ArgumentList @($WellKnownSidType, $null) + $account = $sid.Translate([Security.Principal.NTAccount]) + + return $account.Value +} + +function Ensure-Permissions { + param( + [string]$folder + ) + Write-Debug "Ensure-Permissions" + + $defaultInstallPath = "$env:SystemDrive\ProgramData\chocolatey" + try { + $defaultInstallPath = Join-Path ([Environment]::GetFolderPath("CommonApplicationData")) 'chocolatey' + } + catch { + # keep first setting + } + + if ($folder.ToLower() -ne $defaultInstallPath.ToLower()) { + Write-ChocolateyWarning "Installation folder is not the default. Not changing permissions. Please ensure your installation is secure." + return + } + + # Everything from here on out applies to the default installation folder + + if (!(Test-ProcessAdminRights)) { + throw "Installation of Chocolatey to default folder requires Administrative permissions. Please run from elevated prompt. Please see https://chocolatey.org/install for details and alternatives if needing to install as a non-administrator." + } + + $currentEA = $ErrorActionPreference + $ErrorActionPreference = 'Stop' + try { + # get current acl + $acl = Get-Acl $folder + + Write-Debug "Removing existing permissions." + $acl.Access | ForEach-Object { $acl.RemoveAccessRuleAll($_) } + + $inheritanceFlags = ([Security.AccessControl.InheritanceFlags]::ContainerInherit -bor [Security.AccessControl.InheritanceFlags]::ObjectInherit) + $propagationFlags = [Security.AccessControl.PropagationFlags]::None + + $rightsFullControl = [Security.AccessControl.FileSystemRights]::FullControl + $rightsModify = [Security.AccessControl.FileSystemRights]::Modify + $rightsReadExecute = [Security.AccessControl.FileSystemRights]::ReadAndExecute + $rightsWrite = [Security.AccessControl.FileSystemRights]::Write + + Write-Output "Restricting write permissions to Administrators" + $builtinAdmins = Get-LocalizedWellKnownPrincipalName -WellKnownSidType ([Security.Principal.WellKnownSidType]::BuiltinAdministratorsSid) + $adminsAccessRule = New-Object System.Security.AccessControl.FileSystemAccessRule($builtinAdmins, $rightsFullControl, $inheritanceFlags, $propagationFlags, "Allow") + $acl.SetAccessRule($adminsAccessRule) + $localSystem = Get-LocalizedWellKnownPrincipalName -WellKnownSidType ([Security.Principal.WellKnownSidType]::LocalSystemSid) + $localSystemAccessRule = New-Object System.Security.AccessControl.FileSystemAccessRule($localSystem, $rightsFullControl, $inheritanceFlags, $propagationFlags, "Allow") + $acl.SetAccessRule($localSystemAccessRule) + $builtinUsers = Get-LocalizedWellKnownPrincipalName -WellKnownSidType ([Security.Principal.WellKnownSidType]::BuiltinUsersSid) + $usersAccessRule = New-Object System.Security.AccessControl.FileSystemAccessRule($builtinUsers, $rightsReadExecute, $inheritanceFlags, $propagationFlags, "Allow") + $acl.SetAccessRule($usersAccessRule) + + $allowCurrentUser = $env:ChocolateyInstallAllowCurrentUser -eq 'true' + if ($allowCurrentUser) { + # get current user + $currentUser = [Security.Principal.WindowsIdentity]::GetCurrent() + + if ($currentUser.Name -ne $localSystem) { + $userAccessRule = New-Object System.Security.AccessControl.FileSystemAccessRule($currentUser.Name, $rightsModify, $inheritanceFlags, $propagationFlags, "Allow") + Write-ChocolateyWarning 'Adding Modify permission for current user due to $env:ChocolateyInstallAllowCurrentUser. This could lead to escalation of privilege attacks. Consider not allowing this.' + $acl.SetAccessRule($userAccessRule) + } + } + else { + Write-Debug 'Current user no longer set due to possible escalation of privileges - set $env:ChocolateyInstallAllowCurrentUser="true" if you require this.' + } + + Write-Debug "Set Owner to Administrators" + $builtinAdminsSid = New-Object System.Security.Principal.SecurityIdentifier([Security.Principal.WellKnownSidType]::BuiltinAdministratorsSid, $null) + $acl.SetOwner($builtinAdminsSid) + + Write-Debug "Default Installation folder - removing inheritance with no copy" + $acl.SetAccessRuleProtection($true, $false) + + # enact the changes against the actual + Set-Acl -Path $folder -AclObject $acl + + # set an explicit append permission on the logs folder + Write-Debug "Allow users to append to log files." + $logsFolder = "$folder\logs" + Create-DirectoryIfNotExists $logsFolder + $logsAcl = Get-Acl $logsFolder + $usersAppendAccessRule = New-Object System.Security.AccessControl.FileSystemAccessRule($builtinUsers, $rightsWrite, [Security.AccessControl.InheritanceFlags]::ObjectInherit, [Security.AccessControl.PropagationFlags]::InheritOnly, "Allow") + $logsAcl.SetAccessRule($usersAppendAccessRule) + $logsAcl.SetAccessRuleProtection($false, $true) + Set-Acl -Path $logsFolder -AclObject $logsAcl + } + catch { + Write-ChocolateyWarning "Not able to set permissions for $folder." + } + $ErrorActionPreference = $currentEA +} + +function Upgrade-OldChocolateyInstall { + param( + [string]$chocolateyPathOld = "$sysDrive\Chocolatey", + [string]$chocolateyPath = "$($env:ALLUSERSPROFILE)\chocolatey" + ) + + Write-Debug "Upgrade-OldChocolateyInstall" + + if (Test-Path $chocolateyPathOld) { + Write-Output "Attempting to upgrade `'$chocolateyPathOld`' to `'$chocolateyPath`'." + Write-ChocolateyWarning "Copying the contents of `'$chocolateyPathOld`' to `'$chocolateyPath`'. `n This step may fail if you have anything in this folder running or locked." + Write-Output 'If it fails, just manually copy the rest of the items out and then delete the folder.' + Write-ChocolateyWarning "!!!! ATTN: YOU WILL NEED TO CLOSE AND REOPEN YOUR SHELL !!!!" + #-ForegroundColor Magenta -BackgroundColor Black + + $chocolateyExePathOld = Join-Path $chocolateyPathOld 'bin' + 'Machine', 'User' | + ForEach-Object { + $path = Get-EnvironmentVariable -Name 'PATH' -Scope $_ + $updatedPath = [System.Text.RegularExpressions.Regex]::Replace($path, [System.Text.RegularExpressions.Regex]::Escape($chocolateyExePathOld) + '(?>;)?', '', [System.Text.RegularExpressions.RegexOptions]::IgnoreCase) + if ($updatedPath -ne $path) { + Write-Output "Updating `'$_`' PATH to reflect removal of '$chocolateyPathOld'." + try { + Set-EnvironmentVariable -Name 'Path' -Value $updatedPath -Scope $_ -ErrorAction Stop + } + catch { + Write-ChocolateyWarning "Was not able to remove the old environment variable from PATH. You will need to do this manually" + } + } + } + + Copy-Item "$chocolateyPathOld\lib\*" "$chocolateyPath\lib" -Force -Recurse + + $from = "$chocolateyPathOld\bin" + $to = "$chocolateyPath\bin" + # TODO: This exclusion list needs to be updated once shims are removed + $exclude = @("choco.exe", "RefreshEnv.cmd") + Get-ChildItem -Path $from -Recurse -Exclude $exclude | + ForEach-Object { + Write-Debug "Copying $_ `n to $to" + if ($_.PSIsContainer) { + Copy-Item $_ -Destination (Join-Path $to $_.Parent.FullName.Substring($from.length)) -Force -ErrorAction SilentlyContinue + } + else { + $fileToMove = (Join-Path $to $_.FullName.Substring($from.length)) + try { + Copy-Item $_ -Destination $fileToMove -Exclude $exclude -Force -ErrorAction Stop + } + catch { + Write-ChocolateyWarning "Was not able to move `'$fileToMove`'. You may need to reinstall the shim" + } + } + } + } +} + +function Remove-OldChocolateyInstall { + param( + [string]$chocolateyPathOld = "$sysDrive\Chocolatey" + ) + Write-Debug "Remove-OldChocolateyInstall" + + if (Test-Path $chocolateyPathOld) { + Write-ChocolateyWarning "This action will result in Log Errors, you can safely ignore those. `n You may need to finish removing '$chocolateyPathOld' manually." + try { + Get-ChildItem -Path "$chocolateyPathOld" | ForEach-Object { + if (Test-Path $_.FullName) { + Write-Debug "Removing $_ unless matches .log" + Remove-Item $_.FullName -Exclude *.log -Recurse -Force -ErrorAction SilentlyContinue + } + } + + Write-Output "Attempting to remove `'$chocolateyPathOld`'. This may fail if something in the folder is being used or locked." + Remove-Item "$($chocolateyPathOld)" -Force -Recurse -ErrorAction Stop + } + catch { + Write-ChocolateyWarning "Was not able to remove `'$chocolateyPathOld`'. You will need to manually remove it." + } + } +} + +function Install-ChocolateyFiles { + param( + [string]$chocolateyPath + ) + Write-Debug "Install-ChocolateyFiles" + + Write-Debug "Removing install files in chocolateyInstall, helpers, redirects, and tools" + "$chocolateyPath\chocolateyInstall", "$chocolateyPath\helpers", "$chocolateyPath\redirects", "$chocolateyPath\tools" | ForEach-Object { + #Write-Debug "Checking path $_" + + if (Test-Path $_) { + Get-ChildItem -Path "$_" | ForEach-Object { + #Write-Debug "Checking child path $_ ($($_.FullName))" + if (Test-Path $_.FullName) { + # If this is an upgrade, we can't *delete* Chocolatey.PowerShell.dll, as it will be currently loaded and thus locked. + # Instead, rename it with a .old suffix. The code in the installer module will delete the .old file next time it runs. + # This works similarly to how we move rather than overwriting choco.exe itself. + if ($_.Name -ne "Chocolatey.PowerShell.dll") { + Write-Debug "Removing $_ unless matches .log" + Remove-Item $_.FullName -Exclude *.log -Recurse -Force -ErrorAction SilentlyContinue + } + else { + $oldPath = "$($_.FullName).old" + Write-Debug "Moving $_ to $oldPath" + + # Remove any still-existing Chocolatey.PowerShell.dll.old files before moving/renaming the current one. + Get-Item -Path $oldPath -ErrorAction SilentlyContinue | Remove-Item -Force + Move-Item $_.Fullname -Destination $oldPath + } + } + } + } + } + + Write-Debug "Attempting to move choco.exe to choco.exe.old so we can place the new version here." + # rename the currently running process / it will be locked if it exists + $chocoExe = Join-Path $chocolateyPath 'choco.exe' + if (Test-Path ($chocoExe)) { + Write-Debug "Renaming '$chocoExe' to '$chocoExe.old'" + try { + Remove-Item "$chocoExe.old" -Force -ErrorAction SilentlyContinue + Move-Item $chocoExe "$chocoExe.old" -Force -ErrorAction SilentlyContinue + } + catch { + Write-ChocolateyWarning "Was not able to rename `'$chocoExe`' to `'$chocoExe.old`'." + } + } + + # remove pdb file if it is found + $chocoPdb = Join-Path $chocolateyPath 'choco.pdb' + if (Test-Path ($chocoPdb)) { + Remove-Item "$chocoPdb" -Force -ErrorAction SilentlyContinue + } + + Write-Debug "Unpacking files required for Chocolatey." + $chocoInstallFolder = Join-Path $thisScriptFolder "chocolateyInstall" + $chocoExe = Join-Path $chocoInstallFolder 'choco.exe' + $chocoExeDest = Join-Path $chocolateyPath 'choco.exe' + Copy-Item $chocoExe $chocoExeDest -Force + + Write-Debug "Copying the contents of `'$chocoInstallFolder`' to `'$chocolateyPath`'." + Copy-Item $chocoInstallFolder\* $chocolateyPath -Recurse -Force +} + +function Ensure-ChocolateyLibFiles { + param( + [string]$chocolateyLibPath + ) + Write-Debug "Ensure-ChocolateyLibFiles" + $chocoPkgDirectory = Join-Path $chocolateyLibPath 'chocolatey' + + Create-DirectoryIfNotExists $chocoPkgDirectory + + if (!(Test-Path("$chocoPkgDirectory\chocolatey.nupkg"))) { + Write-Output "chocolatey.nupkg file not installed in lib.`n Attempting to locate it from bootstrapper." + $chocoZipFile = Join-Path $tempDir "chocolatey\chocoInstall\chocolatey.zip" + + Write-Debug "First the zip file at '$chocoZipFile'." + Write-Debug "Then from a neighboring chocolatey.*nupkg file '$thisScriptFolder/../../'." + + if (Test-Path("$chocoZipFile")) { + Write-Debug "Copying '$chocoZipFile' to '$chocoPkgDirectory\chocolatey.nupkg'." + Copy-Item "$chocoZipFile" "$chocoPkgDirectory\chocolatey.nupkg" -Force -ErrorAction SilentlyContinue + } + + if (!(Test-Path("$chocoPkgDirectory\chocolatey.nupkg"))) { + $chocoPkg = Get-ChildItem "$thisScriptFolder/../../" | + Where-Object { $_.name -match "^chocolatey.*nupkg" } | + Sort-Object name -Descending | + Select-Object -First 1 + if ($chocoPkg -ne '') { + $chocoPkg = $chocoPkg.FullName + } + "$chocoZipFile", "$chocoPkg" | ForEach-Object { + if ($_ -ne $null -and $_ -ne '') { + if (Test-Path $_) { + Write-Debug "Copying '$_' to '$chocoPkgDirectory\chocolatey.nupkg'." + Copy-Item $_ "$chocoPkgDirectory\chocolatey.nupkg" -Force -ErrorAction SilentlyContinue + } + } + } + } + } +} + +function Install-ChocolateyBinFiles { + param( + [string] $chocolateyPath, + [string] $chocolateyExePath + ) + Write-Debug "Install-ChocolateyBinFiles" + Write-Debug "Installing the bin file redirects" + $redirectsPath = Join-Path $chocolateyPath 'redirects' + if (!(Test-Path "$redirectsPath")) { + Write-ChocolateyWarning "$redirectsPath does not exist" + return + } + + $exeFiles = Get-ChildItem "$redirectsPath" -Include @("*.exe", "*.cmd") -Recurse + foreach ($exeFile in $exeFiles) { + $exeFilePath = $exeFile.FullName + $exeFileName = [System.IO.Path]::GetFileName("$exeFilePath") + $binFilePath = Join-Path $chocolateyExePath $exeFileName + $binFilePathRename = $binFilePath + '.old' + $batchFilePath = $binFilePath.Replace(".exe", ".bat") + $bashFilePath = $binFilePath.Replace(".exe", "") + if (Test-Path ($batchFilePath)) { + Remove-Item $batchFilePath -Force -ErrorAction SilentlyContinue + } + if (Test-Path ($bashFilePath)) { + Remove-Item $bashFilePath -Force -ErrorAction SilentlyContinue + } + if (Test-Path ($binFilePathRename)) { + try { + Write-Debug "Attempting to remove $binFilePathRename" + Remove-Item $binFilePathRename -Force -ErrorAction Stop + } + catch { + Write-ChocolateyWarning "Was not able to remove `'$binFilePathRename`'. This may cause errors." + } + } + if (Test-Path ($binFilePath)) { + try { + Write-Debug "Attempting to rename $binFilePath to $binFilePathRename" + Move-Item -Path $binFilePath -Destination $binFilePathRename -Force -ErrorAction Stop + } + catch { + Write-ChocolateyWarning "Was not able to rename `'$binFilePath`' to `'$binFilePathRename`'." + } + } + + try { + Write-Debug "Attempting to copy $exeFilePath to $binFilePath" + Copy-Item -Path $exeFilePath -Destination $binFilePath -Force -ErrorAction Stop + } + catch { + Write-ChocolateyWarning "Was not able to replace `'$binFilePath`' with `'$exeFilePath`'. You may need to do this manually." + } + + $commandShortcut = [System.IO.Path]::GetFileNameWithoutExtension("$exeFilePath") + Write-Debug "Added command $commandShortcut" + } +} + +function Initialize-ChocolateyPath { + param( + [string]$chocolateyExePath = "$($env:ALLUSERSPROFILE)\chocolatey\bin", + [string]$chocolateyExePathVariable = "%$($chocoInstallVariableName)%\bin" + ) + Write-Debug "Initialize-ChocolateyPath" + Write-Debug "Initializing Chocolatey Path if required" + $environmentTarget = [System.EnvironmentVariableTarget]::User + if (Test-ProcessAdminRights) { + Write-Debug "Administrator installing so using Machine environment variable target instead of User." + $environmentTarget = [System.EnvironmentVariableTarget]::Machine + } + else { + Write-ChocolateyWarning "Setting ChocolateyInstall Path on USER PATH and not SYSTEM Path.`n This is due to either non-administrator install OR the process you are running is not being run as an Administrator." + } + + Install-ChocolateyPath -pathToInstall "$chocolateyExePath" -pathType $environmentTarget +} + +function Process-ChocolateyBinFiles { + param( + [string]$chocolateyExePath = "$($env:ALLUSERSPROFILE)\chocolatey\bin", + [string]$chocolateyExePathVariable = "%$($chocoInstallVariableName)%\bin" + ) + Write-Debug "Process-ChocolateyBinFiles" + $processedMarkerFile = Join-Path $chocolateyExePath '_processed.txt' + if (!(Test-Path $processedMarkerFile)) { + $files = Get-ChildItem $chocolateyExePath -Include *.bat -Recurse + if ($files -ne $null -and $files.Count -gt 0) { + Write-Debug "Processing Bin files" + foreach ($file in $files) { + Write-Output "Processing $($file.Name) to make it portable" + $fileStream = [System.IO.File]::Open("$file", 'Open', 'Read', 'ReadWrite') + $reader = New-Object System.IO.StreamReader($fileStream) + $fileText = $reader.ReadToEnd() + $reader.Close() + $fileStream.Close() + + $fileText = $fileText.ToLower().Replace("`"" + $chocolateyPath.ToLower(), "SET DIR=%~dp0%`n""%DIR%..\").Replace("\\", "\") + + Set-Content $file -Value $fileText -Encoding Ascii + } + } + + Set-Content $processedMarkerFile -Value "$([System.DateTime]::Now.Date)" -Encoding Ascii + } +} + +# Adapted from http://www.west-wind.com/Weblog/posts/197245.aspx +function Get-FileEncoding($Path) { + if ($PSVersionTable.PSVersion.Major -lt 6) { + Write-Debug "Detected Powershell version < 6 ; Using -Encoding byte parameter" + $bytes = [byte[]](Get-Content $Path -Encoding byte -ReadCount 4 -TotalCount 4) + } + else { + Write-Debug "Detected Powershell version >= 6 ; Using -AsByteStream parameter" + $bytes = [byte[]](Get-Content $Path -AsByteStream -ReadCount 4 -TotalCount 4) + } + + if (!$bytes) { + return 'utf8' + } + + switch -regex ('{0:x2}{1:x2}{2:x2}{3:x2}' -f $bytes[0], $bytes[1], $bytes[2], $bytes[3]) { + '^efbbbf' { + return 'utf8' + } + '^2b2f76' { + return 'utf7' + } + '^fffe' { + return 'unicode' + } + '^feff' { + return 'bigendianunicode' + } + '^0000feff' { + return 'utf32' + } + default { + return 'ascii' + } + } +} + +function Add-ChocolateyProfile { + Write-Debug "Add-ChocolateyProfile" + try { + $profileFile = "$profile" + if ($profileFile -eq $null -or $profileFile -eq '') { + Write-Output 'Not setting tab completion: Profile variable ($profile) resulted in an empty string.' + return + } + + $profileDirectory = (Split-Path -Parent $profileFile) + + if ($env:ChocolateyNoProfile -ne $null -and $env:ChocolateyNoProfile -ne '') { + Write-Warning "Not setting tab completion: Environment variable "ChocolateyNoProfile" exists and is set." + return + } + + $localSystem = Get-LocalizedWellKnownPrincipalName -WellKnownSidType ([Security.Principal.WellKnownSidType]::LocalSystemSid) + # get current user + $currentUser = [Security.Principal.WindowsIdentity]::GetCurrent() + if ($currentUser.Name -eq $localSystem) { + Write-Warning "Not setting tab completion: Current user is SYSTEM user." + return + } + + if (!(Test-Path($profileDirectory))) { + Write-Debug "Creating '$profileDirectory'" + New-Item "$profileDirectory" -Type Directory -Force -ErrorAction SilentlyContinue | Out-Null + } + + if (!(Test-Path($profileFile))) { + Write-Warning "Not setting tab completion: Profile file does not exist at '$profileFile'." + return + + #Write-Debug "Creating '$profileFile'" + #"" | Out-File $profileFile -Encoding UTF8 + } + + # Check authenticode, but only if file is greater than 5 bytes + $profileFileInfo = New-Object System.IO.FileInfo($profileFile) + if ($profileFileInfo.Length -gt 5) { + $signature = Get-AuthenticodeSignature $profile + if ($signature.Status -ne 'NotSigned') { + Write-Warning "Not setting tab completion: File is Authenticode signed at '$profile'." + return + } + } + + $profileInstall = @' + +# Import the Chocolatey Profile that contains the necessary code to enable +# tab-completions to function for `choco`. +# Be aware that if you are missing these lines from your profile, tab completion +# for `choco` will not function. +# See https://ch0.co/tab-completion for details. +$ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" +if (Test-Path($ChocolateyProfile)) { + Import-Module "$ChocolateyProfile" +} +'@ + + $chocoProfileSearch = '$ChocolateyProfile' + if (Select-String -Path $profileFile -Pattern $chocoProfileSearch -Quiet -SimpleMatch) { + Write-Debug "Chocolatey profile is already installed." + return + } + + Write-Output 'Adding Chocolatey to the profile. This will provide tab completion, refreshenv, etc.' + $profileInstall | Out-File $profileFile -Append -Encoding (Get-FileEncoding $profileFile) + Write-ChocolateyWarning 'Chocolatey profile installed. Reload your profile - type . $profile' + + if ($PSVersionTable.PSVersion.Major -lt 3) { + Write-ChocolateyWarning "Tab completion does not currently work in PowerShell v2. `n Please upgrade to a more recent version of PowerShell to take advantage of tab completion." + #Write-ChocolateyWarning "To load tab expansion, you need to install PowerTab. `n See https://powertab.codeplex.com/ for details." + } + } + catch { + Write-ChocolateyWarning "Unable to add Chocolatey to the profile. You will need to do it manually. Error was '$_'" + @' +This is how add the Chocolatey Profile manually. +Find your $profile. Then add the following lines to it: + +$ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" +if (Test-Path($ChocolateyProfile)) { + Import-Module "$ChocolateyProfile" +} +'@ | Write-Output + } +} + +$netFx48InstallTries = 0 + +function Install-DotNet48IfMissing { + param( + $forceFxInstall = $false + ) + # we can't take advantage of any chocolatey module functions, because they + # haven't been unpacked because they require .NET Framework 4.8 + + Write-Debug "Install-DotNet48IfMissing called with `$forceFxInstall=$forceFxInstall" + $NetFxArch = "Framework" + if ([IntPtr]::Size -eq 8) { + $NetFxArch = "Framework64" + } + + $NetFx48Url = 'https://download.visualstudio.microsoft.com/download/pr/2d6bb6b2-226a-4baa-bdec-798822606ff1/8494001c276a4b96804cde7829c04d7f/ndp48-x86-x64-allos-enu.exe' + $NetFx48Path = "$tempDir" + $NetFx48InstallerFile = 'ndp48-x86-x64-allos-enu.exe' + $NetFx48Installer = Join-Path $NetFx48Path $NetFx48InstallerFile + + if (((Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" -ErrorAction SilentlyContinue).Release -lt 528040) -or $forceFxInstall) { + Write-Output "The registry key for .Net 4.8 was not found or this is forced" + + if (Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending") { + Write-Warning "A reboot is required. `n If you encounter errors, reboot the system and attempt the operation again" + } + + $netFx48InstallTries += 1 + + if (!(Test-Path $NetFx48Installer)) { + Write-Output "Downloading `'$NetFx48Url`' to `'$NetFx48Installer`' - the installer is 100+ MBs, so this could take a while on a slow connection." + (New-Object Net.WebClient).DownloadFile("$NetFx48Url","$NetFx48Installer") + } + + $psi = New-Object System.Diagnostics.ProcessStartInfo + $psi.WorkingDirectory = "$NetFx48Path" + $psi.FileName = "$NetFx48InstallerFile" + # https://msdn.microsoft.com/library/ee942965(v=VS.100).aspx#command_line_options + # http://blogs.msdn.com/b/astebner/archive/2010/05/12/10011664.aspx + # For the actual setup.exe (if you want to unpack first) - /repair /x86 /x64 /ia64 /parameterfolder Client /q /norestart + $psi.Arguments = "/q /norestart" + + Write-Output "Installing `'$NetFx48Installer`' - this may take awhile with no output." + $s = [System.Diagnostics.Process]::Start($psi); + $s.WaitForExit(); + if ($s.ExitCode -eq 1641 -or $s.ExitCode -eq 3010) { + Write-Warning ".NET Framework 4.8 was installed, but a reboot is required before using Chocolatey CLI." + $script:DotNetInstallRequiredReboot = $true + } elseif ($s.ExitCode -ne 0) { + if ($netFx48InstallTries -ge 2) { + Write-ChocolateyError ".NET Framework install failed with exit code `'$($s.ExitCode)`'. `n This will cause the rest of the install to fail." + throw "Error installing .NET Framework 4.8 (exit code $($s.ExitCode)). `n Please install the .NET Framework 4.8 manually and reboot the system `n and then try to install/upgrade Chocolatey again. `n Download at `'$NetFx48Url`'" + } else { + Write-ChocolateyWarning "Try #$netFx48InstallTries of .NET framework install failed with exit code `'$($s.ExitCode)`'. Trying again." + Install-DotNet48IfMissing $true + } + } + } +} + +function Invoke-Chocolatey-Initial { + if ($PSVersionTable.Major -le 3 -and $script:DotNetInstallRequiredReboot) { + Write-Debug "Skipping initialization due to known issues before rebooting." + return + } + + Write-Debug "Initializing Chocolatey files, etc by running Chocolatey CLI..." + + try { + $chocoInstallationFolder = Get-ChocolateyInstallFolder + $chocoExe = Join-Path -Path $chocoInstallationFolder -ChildPath "choco.exe" + $runResult = & $chocoExe -v 2>&1 + if ($LASTEXITCODE -eq 0) { + Write-Debug "Chocolatey CLI execution completed successfully." + } + else { + throw + } + } + catch { + Write-ChocolateyWarning "Unable to run Chocolatey CLI at this time:`n$($runResult)" + } +} + +Export-ModuleMember -Function Initialize-Chocolatey + +# SIG # Begin signature block +# MIInKwYJKoZIhvcNAQcCoIInHDCCJxgCAQExDzANBglghkgBZQMEAgEFADB5Bgor +# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCArPR/MaAFOnPhm +# wTraOHhBiut3LMThkjxzi7DsT2up/qCCIK4wggWNMIIEdaADAgECAhAOmxiO+dAt +# 5+/bUOIIQBhaMA0GCSqGSIb3DQEBDAUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK +# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV +# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0yMjA4MDEwMDAwMDBa +# Fw0zMTExMDkyMzU5NTlaMGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy +# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNVBAMTGERpZ2lD +# ZXJ0IFRydXN0ZWQgUm9vdCBHNDCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC +# ggIBAL/mkHNo3rvkXUo8MCIwaTPswqclLskhPfKK2FnC4SmnPVirdprNrnsbhA3E +# MB/zG6Q4FutWxpdtHauyefLKEdLkX9YFPFIPUh/GnhWlfr6fqVcWWVVyr2iTcMKy +# unWZanMylNEQRBAu34LzB4TmdDttceItDBvuINXJIB1jKS3O7F5OyJP4IWGbNOsF +# xl7sWxq868nPzaw0QF+xembud8hIqGZXV59UWI4MK7dPpzDZ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jdMUWmhZLAZo48QN1c8hUwtiwTLo+8ZGUwmjbLEp4v7WDBI/ZcD0WW +# 67XftIHKVDi4gJJyR9uKQdFrmIIqOHeJbgffxhwuEIlDQ3X45Umw+rymBiKOGxA= +# SIG # End signature block diff --git a/nuspec/chocolatey/chocolatey/tools/init.ps1 b/nuspec/chocolatey/chocolatey/tools/init.ps1 index 1030a5726e..514ba0a091 100644 --- a/nuspec/chocolatey/chocolatey/tools/init.ps1 +++ b/nuspec/chocolatey/chocolatey/tools/init.ps1 @@ -1,28 +1,240 @@ -param($installPath, $toolsPath, $package, $project) - -$modules = Get-ChildItem $ToolsPath -Filter *.psm1 -$modules | ForEach-Object { Import-Module -Name $_.FullName } - -@" -======================== -Chocolatey -======================== -Welcome to Chocolatey, your local machine repository built on the NuGet infrastructure. Chocolatey allows you to install application packages to your machine with the goodness of a #chocolatey #nuget combo. -Application executables get added to the path automatically so you can call them from anywhere (command line/powershell prompt), not just in Visual Studio. - -Lets get Chocolatey! ----------- -Visual Studio - ----------- -Please run Initialize-Chocolatey one time per machine to set up the repository. -If you are upgrading, please remember to run Initialize-Chocolatey again. -After you have run Initialize-Chocolatey, you can safely uninstall the chocolatey package from your current Visual Studio solution. ----------- -Alternative NuGet - ----------- -If you are not using NuGet in Visual Studio, please navigate to the directory with the chocolateysetup.psm1 and run that in PowerShell, followed by Initialize-Chocolatey. -Upgrade is the same, just run Initialize-Chocolatey again. ----------- -Once you've run initialize or upgrade, you can uninstall this package from the local project without affecting your chocolatey repository. -======================== -"@ | Write-Host +param($installPath, $toolsPath, $package, $project) + +$modules = Get-ChildItem $ToolsPath -Filter *.psm1 +$modules | ForEach-Object { Import-Module -Name $_.FullName } + +@" +======================== +Chocolatey +======================== +Welcome to Chocolatey, your local machine repository built on the NuGet infrastructure. Chocolatey allows you to install application packages to your machine with the goodness of a #chocolatey #nuget combo. +Application executables get added to the path automatically so you can call them from anywhere (command line/powershell prompt), not just in Visual Studio. + +Lets get Chocolatey! +---------- +Visual Studio - +---------- +Please run Initialize-Chocolatey one time per machine to set up the repository. +If you are upgrading, please remember to run Initialize-Chocolatey again. +After you have run Initialize-Chocolatey, you can safely uninstall the chocolatey package from your current Visual Studio solution. +---------- +Alternative NuGet - +---------- +If you are not using NuGet in Visual Studio, please navigate to the directory with the chocolateysetup.psm1 and run that in PowerShell, followed by Initialize-Chocolatey. +Upgrade is the same, just run Initialize-Chocolatey again. +---------- +Once you've run initialize or upgrade, you can uninstall this package from the local project without affecting your chocolatey repository. +======================== +"@ | Write-Host + +# SIG # Begin signature block +# MIInKwYJKoZIhvcNAQcCoIInHDCCJxgCAQExDzANBglghkgBZQMEAgEFADB5Bgor +# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCB4QB+fuKUSzfWB +# VJJyTKWIh0uBqhRfeHjEF1GjlNI6qqCCIK4wggWNMIIEdaADAgECAhAOmxiO+dAt +# 5+/bUOIIQBhaMA0GCSqGSIb3DQEBDAUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK +# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV +# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0yMjA4MDEwMDAwMDBa +# Fw0zMTExMDkyMzU5NTlaMGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy +# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNVBAMTGERpZ2lD +# ZXJ0IFRydXN0ZWQgUm9vdCBHNDCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC +# ggIBAL/mkHNo3rvkXUo8MCIwaTPswqclLskhPfKK2FnC4SmnPVirdprNrnsbhA3E +# MB/zG6Q4FutWxpdtHauyefLKEdLkX9YFPFIP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PX0a2 +# t3toPDmnbUBHKaPUy129+votyI7nNmnCzwfYr0DeTeRpX9NYnDRqPN/DeWZPYAdR +# d/VPoBnc4Qbf43zi4lltVzg60iAaMbRp7GGZt6WT0IyEkNGB87dcOPEHOINQDHIq +# oIHYBBSKNbjgt6Jsn53j9gyEMMt8xWD6App5DpR6/JIRPZa1Sg63oXcmVQ9mj8kz +# xFmN10Idmc+tIJ6d+kbWL1IQ8RQiRT8okmn6dWXlrzCQvJk12uB9lw2xdflvcAk= +# SIG # End signature block diff --git a/nuspec/nuget/Chocolatey.PowerShell/Chocolatey.PowerShell.nuspec b/nuspec/nuget/Chocolatey.PowerShell/Chocolatey.PowerShell.nuspec new file mode 100644 index 0000000000..af6167d522 --- /dev/null +++ b/nuspec/nuget/Chocolatey.PowerShell/Chocolatey.PowerShell.nuspec @@ -0,0 +1,33 @@ +<?xml version="1.0"?> +<package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + <metadata> + <id>Chocolatey.PowerShell</id> + <version>0.9.9</version> + <owners>Chocolatey Software, Inc</owners> + <title>Chocolatey CLI PowerShell Helpers + Chocolatey Software, Inc + https://github.com/chocolatey/choco + https://chocolatey.org/assets/images/nupkg/chocolateyicon.png + https://raw.githubusercontent.com/chocolatey/choco/master/LICENSE + false + 2024 Chocolatey Software, Inc + chocolatey powershell + Chocolatey CLI's PowerShell helper commands + +Chocolatey is a package manager for Windows (like apt-get but for Windows). + +This is the Chocolatey PowerShell Library (API / DLL) package which contains the PowerShell helper commands used in Chocolatey CLI itself. + +### Information + +- [Chocolatey Website and Community Package Repository](https://community.chocolatey.org) +- [Mailing List](http://groups.google.com/group/chocolatey) / [Release Announcements Only Mailing List](https://groups.google.com/group/chocolatey-announce) / [Build Status Mailing List](http://groups.google.com/group/chocolatey-build-status) +- [Twitter](https://twitter.com/chocolateynuget) / [Facebook](https://www.facebook.com/ChocolateySoftware) / [GitHub](https://github.com/chocolatey) +- [Blog](https://blog.chocolatey.org/) / [Newsletter](https://chocolatey.us8.list-manage1.com/subscribe?u=86a6d80146a0da7f2223712e4&id=73b018498d) +- [Documentation](https://docs.chocolatey.org/en-us/) / [Support](https://chocolatey.org/support) + + +See all - https://docs.chocolatey.org/en-us/choco/release-notes + + + diff --git a/recipe.cake b/recipe.cake index 054ca68a10..017d2baca6 100644 --- a/recipe.cake +++ b/recipe.cake @@ -1,4 +1,4 @@ -#load nuget:?package=Chocolatey.Cake.Recipe&version=0.26.5 +#load nuget:?package=Chocolatey.Cake.Recipe&version=0.28.4 /////////////////////////////////////////////////////////////////////////////// // TOOLS @@ -15,7 +15,8 @@ Func> getILMergeConfigs = () => var targetPlatform = "v4,C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8"; var assembliesToILMerge = GetFiles(BuildParameters.Paths.Directories.PublishedApplications + "/choco/*.{exe|dll}") - GetFiles(BuildParameters.Paths.Directories.PublishedApplications + "/choco/choco.exe") - - GetFiles(BuildParameters.Paths.Directories.PublishedApplications + "/choco/System.Management.Automation.dll"); + - GetFiles(BuildParameters.Paths.Directories.PublishedApplications + "/choco/System.Management.Automation.dll") + - GetFiles(BuildParameters.Paths.Directories.PublishedApplications + "/choco/Chocolatey.PowerShell.dll"); Information("The following assemblies have been selected to be ILMerged for choco.exe..."); foreach (var assemblyToILMerge in assembliesToILMerge) @@ -34,10 +35,11 @@ Func> getILMergeConfigs = () => AssemblyPaths = assembliesToILMerge }); assembliesToILMerge = GetFiles(BuildParameters.Paths.Directories.PublishedLibraries + "/chocolatey/*.{exe|dll}") - - GetFiles(BuildParameters.Paths.Directories.PublishedLibraries + "/chocolatey/choco.exe") - - GetFiles(BuildParameters.Paths.Directories.PublishedLibraries + "/chocolatey/chocolatey.dll") - - GetFiles(BuildParameters.Paths.Directories.PublishedLibraries + "/chocolatey/log4net.dll") - - GetFiles(BuildParameters.Paths.Directories.PublishedLibraries + "/chocolatey/System.Management.Automation.dll"); + - GetFiles(BuildParameters.Paths.Directories.PublishedLibraries + "/chocolatey/choco.exe") + - GetFiles(BuildParameters.Paths.Directories.PublishedLibraries + "/chocolatey/chocolatey.dll") + - GetFiles(BuildParameters.Paths.Directories.PublishedLibraries + "/chocolatey/log4net.dll") + - GetFiles(BuildParameters.Paths.Directories.PublishedLibraries + "/chocolatey/System.Management.Automation.dll") + - GetFiles(BuildParameters.Paths.Directories.PublishedLibraries + "/chocolatey/Chocolatey.PowerShell.dll"); Information("The following assemblies have been selected to be ILMerged for chocolatey.dll..."); foreach (var assemblyToILMerge in assembliesToILMerge) @@ -58,10 +60,11 @@ Func> getILMergeConfigs = () => if (DirectoryExists(BuildParameters.Paths.Directories.PublishedApplications + "/choco-no7zip/")) { var no7zAssembliesToILMerge = GetFiles(BuildParameters.Paths.Directories.PublishedApplications + "/choco-no7zip/*.{exe|dll}") - - GetFiles(BuildParameters.Paths.Directories.PublishedApplications + "/choco-no7zip/choco.exe") - - GetFiles(BuildParameters.Paths.Directories.PublishedApplications + "/choco-no7zip/System.Management.Automation.dll") - - GetFiles(BuildParameters.Paths.Directories.PublishedApplications + "/choco-no7zip/chocolatey.tests*.dll") - - GetFiles(BuildParameters.Paths.Directories.PublishedApplications + "/choco-no7zip/{Moq|nunit|Should|testcentric}*.dll"); + - GetFiles(BuildParameters.Paths.Directories.PublishedApplications + "/choco-no7zip/choco.exe") + - GetFiles(BuildParameters.Paths.Directories.PublishedApplications + "/choco-no7zip/System.Management.Automation.dll") + - GetFiles(BuildParameters.Paths.Directories.PublishedApplications + "/choco-no7zip/chocolatey.tests*.dll") + - GetFiles(BuildParameters.Paths.Directories.PublishedApplications + "/choco-no7zip/{Moq|nunit|Should|testcentric}*.dll") + - GetFiles(BuildParameters.Paths.Directories.PublishedApplications + "/choco-no7zip/Chocolatey.PowerShell.dll"); Information("The following assemblies have been selected to be ILMerged for choco.exe No7zip Version..."); foreach (var assemblyToILMerge in no7zAssembliesToILMerge) @@ -83,16 +86,31 @@ Func> getILMergeConfigs = () => return mergeConfigs; }; -Func getScriptsToSign = () => +Func getScriptsToVerify = () => { - var scriptsToSign = GetFiles(BuildParameters.Paths.Directories.NuGetNuspecDirectory + "/**/*.{ps1|psm1}") + - GetFiles(BuildParameters.Paths.Directories.ChocolateyNuspecDirectory + "/**/*.{ps1|psm1}"); + var scriptsToVerify = GetFiles("./src/chocolatey.resources/**/*.{ps1|psm1|psd1}") + + GetFiles(BuildParameters.Paths.Directories.NuGetNuspecDirectory + "/**/*.{ps1|psm1|psd1}") + + GetFiles(BuildParameters.Paths.Directories.ChocolateyNuspecDirectory + "/**/*.{ps1|psm1|psd1}"); if (DirectoryExists(BuildParameters.Paths.Directories.ChocolateyNuspecDirectory + "-no7zip")) { - scriptsToSign += GetFiles(BuildParameters.Paths.Directories.ChocolateyNuspecDirectory + "-no7zip/**/*.{ps1|psm1}"); + scriptsToVerify += GetFiles(BuildParameters.Paths.Directories.ChocolateyNuspecDirectory + "-no7zip/**/*.{ps1|psm1|psd1}"); + } + + Information("The following PowerShell scripts have been selected to be verified..."); + foreach (var scriptToVerify in scriptsToVerify) + { + Information(scriptToVerify.FullPath); } + return scriptsToVerify; +}; + +Func getScriptsToSign = () => +{ + var scriptsToSign = GetFiles("./nuspec/**/*.{ps1|psm1|psd1}") + + GetFiles("./src/chocolatey.resources/**/*.{ps1|psm1|psd1}"); + Information("The following PowerShell scripts have been selected to be signed..."); foreach (var scriptToSign in scriptsToSign) { @@ -107,13 +125,15 @@ Func getFilesToSign = () => var filesToSign = GetFiles(BuildParameters.Paths.Directories.NuGetNuspecDirectory + "/lib/chocolatey.dll") + GetFiles(BuildParameters.Paths.Directories.ChocolateyNuspecDirectory + "/tools/chocolateyInstall/choco.exe") + GetFiles(BuildParameters.Paths.Directories.ChocolateyNuspecDirectory + "/tools/chocolateyInstall/tools/{checksum|shimgen}.exe") - + GetFiles(BuildParameters.Paths.Directories.ChocolateyNuspecDirectory + "/tools/chocolateyInstall/redirects/*.exe"); + + GetFiles(BuildParameters.Paths.Directories.ChocolateyNuspecDirectory + "/tools/chocolateyInstall/redirects/*.exe") + + GetFiles(BuildParameters.Paths.Directories.ChocolateyNuspecDirectory + "/tools/chocolateyInstall/helpers/Chocolatey.PowerShell.dll"); if (DirectoryExists(BuildParameters.Paths.Directories.ChocolateyNuspecDirectory + "-no7zip")) { filesToSign += GetFiles(BuildParameters.Paths.Directories.ChocolateyNuspecDirectory + "-no7zip/tools/chocolateyInstall/choco.exe") + GetFiles(BuildParameters.Paths.Directories.ChocolateyNuspecDirectory + "-no7zip/tools/chocolateyInstall/tools/{checksum|shimgen}.exe") - + GetFiles(BuildParameters.Paths.Directories.ChocolateyNuspecDirectory + "-no7zip/tools/chocolateyInstall/redirects/*.exe"); + + GetFiles(BuildParameters.Paths.Directories.ChocolateyNuspecDirectory + "-no7zip/tools/chocolateyInstall/redirects/*.exe") + + GetFiles(BuildParameters.Paths.Directories.ChocolateyNuspecDirectory + "-no7zip/tools/chocolateyInstall/helpers/Chocolatey.PowerShell.dll"); } Information("The following assemblies have been selected to be signed..."); @@ -144,7 +164,7 @@ Func getMsisToSign = () => Task("Prepare-Chocolatey-Packages") .IsDependeeOf("Create-Chocolatey-Packages") - .IsDependeeOf("Sign-PowerShellScripts") + .IsDependeeOf("Verify-PowerShellScripts") .IsDependeeOf("Sign-Assemblies") .WithCriteria(() => BuildParameters.BuildAgentOperatingSystem == PlatformFamily.Windows, "Skipping because not running on Windows") .WithCriteria(() => BuildParameters.ShouldRunChocolatey, "Skipping because execution of Chocolatey has been disabled") @@ -158,6 +178,10 @@ Task("Prepare-Chocolatey-Packages") StartProcess(BuildParameters.Paths.Directories.ChocolateyNuspecDirectory + "/tools/chocolateyInstall/choco.exe", new ProcessSettings{ Arguments = "unpackself -f -y --allow-unofficial-build --run-actual" }); + // Copy Chocolatey.PowerShell.dll and its help.xml file + CopyFile(BuildParameters.Paths.Directories.PublishedLibraries + "/Chocolatey.PowerShell/Chocolatey.PowerShell.dll", BuildParameters.Paths.Directories.ChocolateyNuspecDirectory + "/tools/chocolateyInstall/helpers/Chocolatey.PowerShell.dll"); + CopyFile(BuildParameters.Paths.Directories.PublishedLibraries + "/Chocolatey.PowerShell/Chocolatey.PowerShell.dll-help.xml", BuildParameters.Paths.Directories.ChocolateyNuspecDirectory + "/tools/chocolateyInstall/helpers/Chocolatey.PowerShell.dll-help.xml"); + // Tidy up logs and config folder which are not required var logsDirectory = BuildParameters.Paths.Directories.ChocolateyNuspecDirectory + "/tools/chocolateyInstall/logs"; var configDirectory = BuildParameters.Paths.Directories.ChocolateyNuspecDirectory + "/tools/chocolateyInstall/config"; @@ -229,7 +253,7 @@ Task("Prepare-ChocolateyNo7zip-Package") .WithCriteria(() => BuildParameters.ShouldRunChocolatey, "Skipping because execution of Chocolatey has been disabled") .IsDependentOn("Build-ChocolateyNo7zip") .IsDependeeOf("Sign-Assemblies") - .IsDependeeOf("Sign-PowerShellScripts") + .IsDependeeOf("Verify-PowerShellScripts") .IsDependeeOf("Create-ChocolateyNo7zip-Package") .Does(() => { @@ -246,6 +270,10 @@ Task("Prepare-ChocolateyNo7zip-Package") StartProcess(nuspecDirectory + "/tools/chocolateyInstall/choco.exe", new ProcessSettings{ Arguments = "unpackself -f -y --allow-unofficial-build" }); + // Copy Chocolatey.PowerShell.dll and help.xml file + CopyFile(BuildParameters.Paths.Directories.PublishedLibraries + "/Chocolatey.PowerShell/Chocolatey.PowerShell.dll", nuspecDirectory + "/tools/chocolateyInstall/helpers/Chocolatey.PowerShell.dll"); + CopyFile(BuildParameters.Paths.Directories.PublishedLibraries + "/Chocolatey.PowerShell/Chocolatey.PowerShell.dll-help.xml", nuspecDirectory + "/tools/chocolateyInstall/helpers/Chocolatey.PowerShell.dll-help.xml"); + // Tidy up logs and config folder which are not required var logsDirectory = nuspecDirectory + "/tools/chocolateyInstall/logs"; var configDirectory = nuspecDirectory + "/tools/chocolateyInstall/config"; @@ -298,18 +326,18 @@ Task("Create-ChocolateyNo7zip-Package") Task("Prepare-NuGet-Packages") .WithCriteria(() => BuildParameters.ShouldRunNuGet, "Skipping because execution of NuGet has been disabled") .IsDependeeOf("Create-NuGet-Packages") - .IsDependeeOf("Sign-PowerShellScripts") + .IsDependeeOf("Verify-PowerShellScripts") .IsDependeeOf("Sign-Assemblies") .Does(() => { - CleanDirectory(BuildParameters.Paths.Directories.NuGetNuspecDirectory + "/lib"); - EnsureDirectoryExists(BuildParameters.Paths.Directories.NuGetNuspecDirectory + "/lib/net48"); + CleanDirectory(BuildParameters.Paths.Directories.NuGetNuspecDirectory + "/chocolatey.lib/lib"); + EnsureDirectoryExists(BuildParameters.Paths.Directories.NuGetNuspecDirectory + "/chocolatey.lib/lib/net48"); // Copy legal documents - CopyFile(BuildParameters.RootDirectoryPath + "/docs/legal/CREDITS.md", BuildParameters.Paths.Directories.NuGetNuspecDirectory + "/lib/CREDITS.txt"); + CopyFile(BuildParameters.RootDirectoryPath + "/docs/legal/CREDITS.md", BuildParameters.Paths.Directories.NuGetNuspecDirectory + "/chocolatey.lib/lib/CREDITS.txt"); - CopyFiles(BuildParameters.Paths.Directories.PublishedLibraries + "/chocolatey_merged/*", BuildParameters.Paths.Directories.NuGetNuspecDirectory + "/lib/net48"); - CopyFile(BuildParameters.Paths.Directories.PublishedLibraries + "/chocolatey/chocolatey.xml", BuildParameters.Paths.Directories.NuGetNuspecDirectory + "/lib/net48/chocolatey.xml"); + CopyFiles(BuildParameters.Paths.Directories.PublishedLibraries + "/chocolatey_merged/*", BuildParameters.Paths.Directories.NuGetNuspecDirectory + "/chocolatey.lib/lib/net48"); + CopyFile(BuildParameters.Paths.Directories.PublishedLibraries + "/chocolatey/chocolatey.xml", BuildParameters.Paths.Directories.NuGetNuspecDirectory + "/chocolatey.lib/lib/net48/chocolatey.xml"); }); Task("Prepare-MSI") @@ -383,6 +411,7 @@ BuildParameters.SetParameters(context: Context, productCopyright: string.Format("Copyright © 2017 - {0} Chocolatey Software, Inc. Copyright © 2011 - 2017, RealDimensions Software, LLC - All Rights Reserved.", DateTime.Now.Year), shouldStrongNameSignDependentAssemblies: false, treatWarningsAsErrors: false, + getScriptsToVerify: getScriptsToVerify, getScriptsToSign: getScriptsToSign, getFilesToSign: getFilesToSign, getMsisToSign: getMsisToSign, diff --git a/src/Chocolatey.PowerShell/Chocolatey.PowerShell.csproj b/src/Chocolatey.PowerShell/Chocolatey.PowerShell.csproj new file mode 100644 index 0000000000..982d5c1a47 --- /dev/null +++ b/src/Chocolatey.PowerShell/Chocolatey.PowerShell.csproj @@ -0,0 +1,87 @@ + + + + + Debug + AnyCPU + {88396C46-8089-4814-A7D1-E18777FF6083} + Library + Properties + Chocolatey.PowerShell + Chocolatey.PowerShell + v4.8 + 512 + true + 7.3 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + true + bin\ReleaseOfficial\ + TRACE;FORCE_CHOCOLATEY_OFFICIAL_KEY + true + true + pdbonly + AnyCPU + prompt + MinimumRecommendedRules.ruleset + false + + + + + + + + + + + + False + ..\..\lib\PowerShell\System.Management.Automation.dll + + + + + + + + + + + + + + + + + + Properties\SolutionVersion.cs + + + + + + + + PreserveNewest + + + + \ No newline at end of file diff --git a/src/Chocolatey.PowerShell/Chocolatey.PowerShell.dll-Help.xml b/src/Chocolatey.PowerShell/Chocolatey.PowerShell.dll-Help.xml new file mode 100644 index 0000000000..b6f74a03dd --- /dev/null +++ b/src/Chocolatey.PowerShell/Chocolatey.PowerShell.dll-Help.xml @@ -0,0 +1,936 @@ + + + + + Get-EnvironmentVariable + Get + EnvironmentVariable + + Gets an Environment Variable. + + + + This will will get an environment variable based on the variable name and scope while accounting whether to expand the variable or not (e.g.: `%TEMP%`-> `C:\User\Username\AppData\Local\Temp`). + + + + Get-EnvironmentVariable + + Name + + The environment variable you want to get the value from. + + String + + String + + + None + + + Scope + + The environment variable target scope. This is `Process`, `User`, or `Machine`. + + + Process + User + Machine + + EnvironmentVariableTarget + + EnvironmentVariableTarget + + + None + + + IgnoredArguments + + Allows splatting with arguments that do not apply. Do not use directly. + + Object[] + + Object[] + + + None + + + PreserveVariables + + Whether you want to expand embedded environment variable names or not. When not set, variables will be expanded. + + + SwitchParameter + + + False + + + + + + IgnoredArguments + + Allows splatting with arguments that do not apply. Do not use directly. + + Object[] + + Object[] + + + None + + + Name + + The environment variable you want to get the value from. + + String + + String + + + None + + + PreserveVariables + + Whether you want to expand embedded environment variable names or not. When not set, variables will be expanded. + + SwitchParameter + + SwitchParameter + + + False + + + Scope + + The environment variable target scope. This is `Process`, `User`, or `Machine`. + + EnvironmentVariableTarget + + EnvironmentVariableTarget + + + None + + + + + + + System.String + + + Outputs the value of the target environment variable as a string. + + + + + + This helper reduces the number of lines one would have to write to get environment variables, mainly when not expanding the variables is a must. + + + + + -------------------------- Example 1 -------------------------- + PS C:\> Get-EnvironmentVariable -Name 'TEMP' -Scope User -PreserveVariables + + Gets the `TEMP` encironment variable from the user scope, without expanding embedded environment variables. + + + + -------------------------- Example 2 -------------------------- + PS C:\> Get-EnvironmentVariable -Name 'PATH' -Scope Machine + + Gets the `PATH` environment variable from the machine scope, expanding embedded environment variables. + + + + + + Online Version: + https://docs.chocolatey.org/en-us/create/functions/get-environmentvariable + + + Get-EnvironmentVariableNames + xref:get-environmentvariablenames + + + Set-EnvironmentVariable + xref:set-environmentvariable + + + Cmdlet Reference + xref:powershell-cmdlet-reference + + + Function Reference + xref:powershell-reference + + + + + + Get-EnvironmentVariableNames + Get + EnvironmentVariableNames + + Gets all environment variable names. + + + + Provides a list of environment variable names based on the scope. This can be used to loop through the list and generate names. + + + + Get-EnvironmentVariableNames + + Scope + + The environment variable target scope. This is `Process`, `User`, or `Machine`. + + + Process + User + Machine + + EnvironmentVariableTarget + + EnvironmentVariableTarget + + + None + + + IgnoredArguments + + Allows splatting with arguments that do not apply. Do not use directly. + + Object[] + + Object[] + + + None + + + + + + IgnoredArguments + + Allows splatting with arguments that do not apply. Do not use directly. + + Object[] + + Object[] + + + None + + + Scope + + The environment variable target scope. This is `Process`, `User`, or `Machine`. + + EnvironmentVariableTarget + + EnvironmentVariableTarget + + + None + + + + + + + System.String + + + Outputs the names of all the environment variables in the target scope as strings. + + + + + + Process dumps the current environment variable names in memory / session. The other scopes refer to the registry values. + + + + + -------------------------- Example 1 -------------------------- + PS C:\> Get-EnvironmentVariableNames -Scope Machine + + Outputs the names of all the environment variables defined in the registry for the Machine scope. + + + + + + Online Version: + https://docs.chocolatey.org/en-us/create/functions/get-environmentvariablenames + + + Get-EnvironmentVariable + xref:get-environmentvariable + + + Set-EnvironmentVariable + xref:set-environmentvariable + + + Cmdlet Reference + xref:powershell-cmdlet-reference + + + Function Reference + xref:powershell-reference + + + + + + Install-ChocolateyPath + Install + ChocolateyPath + + > :choco-info: NOTE > > Administrative Access Required when `-PathType 'Machine'.` + This puts a directory to the PATH environment variable. + + + + Looks at both PATH environment variables to ensure a path variable correctly shows up on the right PATH. + + + + Install-ChocolateyPath + + Path + + The full path to a location to add / ensure is in the PATH. + + String + + String + + + None + + + PathType + + Which PATH to add it to. If specifying `Machine`, this requires admin privileges to run correctly. + + + Process + User + Machine + + EnvironmentVariableTarget + + EnvironmentVariableTarget + + + None + + + IgnoredArguments + + Allows splatting with arguments that do not apply. Do not use directly. + + Object[] + + Object[] + + + None + + + + + + IgnoredArguments + + Allows splatting with arguments that do not apply. Do not use directly. + + Object[] + + Object[] + + + None + + + Path + + The full path to a location to add / ensure is in the PATH. + + String + + String + + + None + + + PathType + + Which PATH to add it to. If specifying `Machine`, this requires admin privileges to run correctly. + + EnvironmentVariableTarget + + EnvironmentVariableTarget + + + None + + + + + + + This command will assert UAC/Admin privileges on the machine if `-PathType 'Machine'`. + This is used when the application/tool is not being linked by Chocolatey (not in the lib folder). + + + + + -------------------------- Example 1 -------------------------- + PS C:\> Install-ChocolateyPath -PathToInstall "$($env:SystemDrive)\tools\gittfs" + + Adds the target path to the current user's PATH. + + + + -------------------------- Example 1 -------------------------- + PS C:\> Install-ChocolateyPath "$($env:SystemDrive)\Program Files\MySQL\MySQL Server 5.5\bin" -PathType 'Machine' + + Adds the target path to the system-wide PATH. + + + + + + Online Version: + https://docs.chocolatey.org/en-us/create/functions/install-chocolateypath + + + Uninstall-ChocolateyPath + xref:uninstall-chocolateypath + + + Install-ChocolateyEnvironmentVariable + xref:install-chocolateyenvironmentvariable + + + Get-EnvironmentVariable + xref:get-environmentvariable + + + Set-EnvironmentVariable + xref:set-environmentvariable + + + Get-ToolsLocation + xref:get-toolslocation + + + Cmdlet Reference + xref:powershell-cmdlet-reference + + + Function Reference + xref:powershell-reference + + + + + + Set-EnvironmentVariable + Set + EnvironmentVariable + + > :choco-info: NOTE > > Administrative Access Required when `-Scope 'Machine'.` + DO NOT USE. Not part of the public API. Use `Install-ChocolateyEnvironmentVariable` instead. + + + + Saves an environment variable. + + + + Set-EnvironmentVariable + + Name + + The name of the environment variable to set. + + String + + String + + + None + + + Value + + The value to set the named environment variable to. + + String + + String + + + None + + + Scope + + The scope to set the environment variable at. + + + Process + User + Machine + + EnvironmentVariableTarget + + EnvironmentVariableTarget + + + None + + + IgnoredArguments + + Allows splatting with arguments that do not apply. Do not use directly. + + Object[] + + Object[] + + + None + + + + + + IgnoredArguments + + Allows splatting with arguments that do not apply. Do not use directly. + + Object[] + + Object[] + + + None + + + Name + + The name of the environment variable to set. + + String + + String + + + None + + + Scope + + The scope to set the environment variable at. + + EnvironmentVariableTarget + + EnvironmentVariableTarget + + + None + + + Value + + The value to set the named environment variable to. + + String + + String + + + None + + + + + + + This command will assert UAC/Admin privileges on the machine if `-Scope 'Machine'`. + + + + + -------------------------- Example 1 -------------------------- + PS C:\> Set-EnvironmentVariable -Name MyApplicationPath -Value C:\test -Scope Machine + + Sets the `MyApplicationPath` environment variable to `C:\test` at the system level. + + + + + + Online Version: + https://docs.chocolatey.org/en-us/create/functions/set-environmentvariable + + + Install-ChocolateyEnvironmentVariable + xref:install-chocolateyenvironmentvariable + + + Uninstall-ChocolateyEnvironmentVariable + xref:uninstall-chocolateyenvironmentvariable + + + Install-ChocolateyPath + xref:install-chocolateypath + + + Get-EnvironmentVariable + xref:get-environmentvariable + + + Cmdlet Reference + xref:powershell-cmdlet-reference + + + Function Reference + xref:powershell-reference + + + + + + Test-ProcessAdminRights + Test + ProcessAdminRights + + Tests whether the current process is running with administrative rights. + + + + This function checks whether the current process has administrative rights by checking if the current user identity is a member of the Administrators group. It returns `$true` if the current process is running with administrative rights, `$false` otherwise. + On Windows Vista and later, with UAC enabled, the returned value represents the actual rights available to the process, for example if it returns `$true`, the process is running elevated. + + + + Test-ProcessAdminRights + + IgnoredArguments + + Allows splatting with arguments that do not apply. Do not use directly. + + Object[] + + Object[] + + + None + + + + + + IgnoredArguments + + Allows splatting with arguments that do not apply. Do not use directly. + + Object[] + + Object[] + + + None + + + + + + + System.Boolean + + + Outputs `$true` if the current process has admin rights, otherwise `$false`. + + + + + + + + + + + -------------------------- Example 1 -------------------------- + PS C:\> Test-ProcessAdminRights + + Outputs `$true` if the current process is elevated, otherwise `$false`. + + + + + + Online Version: + https://docs.chocolatey.org/en-us/create/functions/test-processadminrights + + + Cmdlet Reference + xref:powershell-cmdlet-reference + + + Function Reference + xref:powershell-reference + + + + + + Uninstall-ChocolateyPath + Uninstall + ChocolateyPath + + > :choco_info: NOTE > > Administrative Access Required when `-PathType 'Machine'.` + This puts a directory to the PATH environment variable. + + + + Ensures that the given path is not present in the given type of PATH environment variable as well as in the current session. + + + + Uninstall-ChocolateyPath + + Path + + The exact path to remove from the environment PATH. + + String + + String + + + None + + + PathType + + Which PATH to add it to. If specifying `Machine`, this requires admin privileges to run correctly. + + + Process + User + Machine + + EnvironmentVariableTarget + + EnvironmentVariableTarget + + + None + + + IgnoredArguments + + Allows splatting with arguments that do not apply. Do not use directly. + + Object[] + + Object[] + + + None + + + + + + IgnoredArguments + + Allows splatting with arguments that do not apply. Do not use directly. + + Object[] + + Object[] + + + None + + + Path + + The exact path to remove from the environment PATH. + + String + + String + + + None + + + PathType + + Which PATH to add it to. If specifying `Machine`, this requires admin privileges to run correctly. + + EnvironmentVariableTarget + + EnvironmentVariableTarget + + + None + + + + + + + This command will assert UAC/Admin privileges on the machine if `-PathType 'Machine'`. This is used when the application/tool is not being linked by Chocolatey (not in the lib folder). + + + + + -------------------------- Example 1 -------------------------- + PS C:\> Uninstall-ChocolateyPath -PathToUninstall "$($env:SystemDrive)\tools\gittfs" + + Removes the target path from the current user's PATH environment variable. + + + + -------------------------- Example 2 -------------------------- + PS C:\> Uninstall-ChocolateyPath "$($env:SystemDrive)\Program Files\MySQL\MySQL Server 5.5\bin" -PathType 'Machine' + + Removes the target path from the system-wide PATH environment variable. + + + + + + Online Version: + https://docs.chocolatey.org/en-us/create/functions/uninstall-chocolateypath + + + Install-ChocolateyPath + xref:install-chocolateypath + + + Install-ChocolateyEnvironmentVariable + xref:install-chocolateyenvironmentvariable + + + Get-EnvironmentVariable + xref:get-environmentvariable + + + Set-EnvironmentVariable + xref:set-environmentvariable + + + Get-ToolsLocation + xref:get-toolslocation + + + Cmdlet Reference + xref:powershell-cmdlet-reference + + + Function Reference + xref:powershell-reference + + + + + + Update-SessionEnvironment + Update + SessionEnvironment + + Updates the environment variables of the current powershell session with any environment variable changes that may have occurred during a Chocolatey package install. + + + + When Chocolatey installs a package, the package author may add or change certain environment variables that will affect how the application runs or how it is accessed. Often, these changes are not visible to the current PowerShell session. This means the user needs to open a new PowerShell session before these settings take effect which can render the installed application nonfunctional until that time. + Use the Update-SessionEnvironment command to refresh the current PowerShell session with all environment settings possibly performed by Chocolatey package installs. + + + + Update-SessionEnvironment + + IgnoredArguments + + Allows splatting with arguments that do not apply. Do not use directly. + + Object[] + + Object[] + + + None + + + + + + IgnoredArguments + + Allows splatting with arguments that do not apply. Do not use directly. + + Object[] + + Object[] + + + None + + + + + + + This method is also added to the user's PowerShell profile as `refreshenv`. When called as `refreshenv`, the method will provide additional output. + Preserves `PSModulePath` as set by the process. + + + + + -------------------------- Example 1 -------------------------- + PS C:\> Update-SessionEnvironment + + Updates the current session environment variables. + + + + + + Online Version: + https://docs.chocolatey.org/en-us/create/functions/update-sessionenvironment + + + Cmdlet Reference + xref:powershell-cmdlet-reference + + + Function Reference + xref:powershell-reference + + + + \ No newline at end of file diff --git a/src/Chocolatey.PowerShell/Commands/GetEnvironmentVariableCommand.cs b/src/Chocolatey.PowerShell/Commands/GetEnvironmentVariableCommand.cs new file mode 100644 index 0000000000..9e25124fba --- /dev/null +++ b/src/Chocolatey.PowerShell/Commands/GetEnvironmentVariableCommand.cs @@ -0,0 +1,50 @@ +// Copyright © 2017 - 2024 Chocolatey Software, Inc +// Copyright © 2011 - 2017 RealDimensions Software, LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +using System; +using System.Management.Automation; +using Chocolatey.PowerShell.Helpers; +using Chocolatey.PowerShell.Shared; + +namespace Chocolatey.PowerShell.Commands +{ + [Cmdlet(VerbsCommon.Get, "EnvironmentVariable")] + [OutputType(typeof(string))] + public sealed class GetEnvironmentVariableCommand : ChocolateyCmdlet + { + [Parameter(Mandatory = true, Position = 0)] + public string Name { get; set; } + + [Parameter(Mandatory = true, Position = 1)] + public EnvironmentVariableTarget Scope { get; set; } + + [Parameter] + public SwitchParameter PreserveVariables { get; set; } + + // Avoid logging environment variable names by accident. + protected override bool Logging { get; } = false; + + protected override void End() + { + if (PreserveVariables) + { + WriteVerbose("Choosing not to expand environment names"); + } + + WriteObject(EnvironmentHelper.GetVariable(this, Name, Scope, PreserveVariables)); + } + } +} diff --git a/src/Chocolatey.PowerShell/Commands/GetEnvironmentVariableNamesCommand.cs b/src/Chocolatey.PowerShell/Commands/GetEnvironmentVariableNamesCommand.cs new file mode 100644 index 0000000000..c466001808 --- /dev/null +++ b/src/Chocolatey.PowerShell/Commands/GetEnvironmentVariableNamesCommand.cs @@ -0,0 +1,40 @@ +// Copyright © 2017 - 2024 Chocolatey Software, Inc +// Copyright © 2011 - 2017 RealDimensions Software, LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +using System; +using System.Management.Automation; +using Chocolatey.PowerShell.Helpers; +using Chocolatey.PowerShell.Shared; + +namespace Chocolatey.PowerShell.Commands +{ + [Cmdlet(VerbsCommon.Get, "EnvironmentVariableNames")] + [OutputType(typeof(string))] + public class GetEnvironmentVariableNamesCommand : ChocolateyCmdlet + { + [Parameter(Position = 0)] + public EnvironmentVariableTarget Scope { get; set; } + + // Do not log function call + protected override bool Logging { get; } = false; + + + protected override void End() + { + WriteObject(EnvironmentHelper.GetVariableNames(Scope)); + } + } +} diff --git a/src/Chocolatey.PowerShell/Commands/InstallChocolateyPathCommand.cs b/src/Chocolatey.PowerShell/Commands/InstallChocolateyPathCommand.cs new file mode 100644 index 0000000000..c9da5edd3b --- /dev/null +++ b/src/Chocolatey.PowerShell/Commands/InstallChocolateyPathCommand.cs @@ -0,0 +1,41 @@ +// Copyright © 2017 - 2024 Chocolatey Software, Inc +// Copyright © 2011 - 2017 RealDimensions Software, LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +using System; +using System.Management.Automation; +using Chocolatey.PowerShell.Helpers; +using Chocolatey.PowerShell.Shared; + +namespace Chocolatey.PowerShell.Commands +{ + [Cmdlet(VerbsLifecycle.Install, "ChocolateyPath")] + [OutputType(typeof(void))] + public class InstallChocolateyPathCommand : ChocolateyCmdlet + { + [Parameter(Mandatory = true, Position = 0)] + [Alias("PathToInstall")] + public string Path { get; set; } + + [Parameter(Position = 1)] + [Alias("Scope", "Type")] + public EnvironmentVariableTarget PathType { get; set; } = EnvironmentVariableTarget.User; + + protected override void End() + { + Paths.InstallPathEntry(this, Path, PathType); + } + } +} diff --git a/src/Chocolatey.PowerShell/Commands/SetEnvironmentVariableCommand.cs b/src/Chocolatey.PowerShell/Commands/SetEnvironmentVariableCommand.cs new file mode 100644 index 0000000000..a73c996aa5 --- /dev/null +++ b/src/Chocolatey.PowerShell/Commands/SetEnvironmentVariableCommand.cs @@ -0,0 +1,42 @@ +// Copyright © 2017 - 2024 Chocolatey Software, Inc +// Copyright © 2011 - 2017 RealDimensions Software, LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +using System; +using System.Management.Automation; +using Chocolatey.PowerShell.Helpers; +using Chocolatey.PowerShell.Shared; + +namespace Chocolatey.PowerShell.Commands +{ + [Cmdlet(VerbsCommon.Set, "EnvironmentVariable")] + [OutputType(typeof(void))] + public sealed class SetEnvironmentVariableCommand : ChocolateyCmdlet + { + [Parameter(Mandatory = true, Position = 0)] + public string Name { get; set; } + + [Parameter(Position = 1)] + public string Value { get; set; } = string.Empty; + + [Parameter(Position = 2)] + public EnvironmentVariableTarget Scope { get; set; } + + protected override void End() + { + EnvironmentHelper.SetVariable(this, Name, Scope, Value); + } + } +} diff --git a/src/Chocolatey.PowerShell/Commands/TestProcessAdminRightsCommand.cs b/src/Chocolatey.PowerShell/Commands/TestProcessAdminRightsCommand.cs new file mode 100644 index 0000000000..2765697137 --- /dev/null +++ b/src/Chocolatey.PowerShell/Commands/TestProcessAdminRightsCommand.cs @@ -0,0 +1,36 @@ +// Copyright © 2017 - 2024 Chocolatey Software, Inc +// Copyright © 2011 - 2017 RealDimensions Software, LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +using System.Management.Automation; +using Chocolatey.PowerShell.Helpers; +using Chocolatey.PowerShell.Shared; + +namespace Chocolatey.PowerShell.Commands +{ + [Cmdlet(VerbsDiagnostic.Test, "ProcessAdminRights")] + [OutputType(typeof(bool))] + public sealed class TestProcessAdminRightsCommand : ChocolateyCmdlet + { + protected override void Process() + { + var isAdmin = ProcessInformation.IsElevated(); + + WriteDebug($"Test-ProcessAdminRights: returning {isAdmin}"); + + WriteObject(isAdmin); + } + } +} diff --git a/src/Chocolatey.PowerShell/Commands/UninstallChocolateyPathCommand.cs b/src/Chocolatey.PowerShell/Commands/UninstallChocolateyPathCommand.cs new file mode 100644 index 0000000000..92faf6a826 --- /dev/null +++ b/src/Chocolatey.PowerShell/Commands/UninstallChocolateyPathCommand.cs @@ -0,0 +1,41 @@ +// Copyright © 2017 - 2024 Chocolatey Software, Inc +// Copyright © 2011 - 2017 RealDimensions Software, LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +using System; +using System.Management.Automation; +using Chocolatey.PowerShell.Helpers; +using Chocolatey.PowerShell.Shared; + +namespace Chocolatey.PowerShell.Commands +{ + [Cmdlet(VerbsLifecycle.Uninstall, "ChocolateyPath")] + [OutputType(typeof(void))] + public class UninstallChocolateyPathCommand : ChocolateyCmdlet + { + [Parameter(Mandatory = true, Position = 0)] + [Alias("PathToUninstall")] + public string Path { get; set; } + + [Parameter(Position = 1)] + [Alias("Scope", "Type")] + public EnvironmentVariableTarget PathType { get; set; } = EnvironmentVariableTarget.User; + + protected override void End() + { + Paths.UninstallPathEntry(this, Path, PathType); + } + } +} diff --git a/src/Chocolatey.PowerShell/Commands/UpdateSessionEnvironmentCommand.cs b/src/Chocolatey.PowerShell/Commands/UpdateSessionEnvironmentCommand.cs new file mode 100644 index 0000000000..65c32d514e --- /dev/null +++ b/src/Chocolatey.PowerShell/Commands/UpdateSessionEnvironmentCommand.cs @@ -0,0 +1,48 @@ +// Copyright © 2017 - 2024 Chocolatey Software, Inc +// Copyright © 2011 - 2017 RealDimensions Software, LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +using System.Management.Automation; +using Chocolatey.PowerShell.Helpers; +using Chocolatey.PowerShell.Shared; + +namespace Chocolatey.PowerShell.Commands +{ + [Cmdlet(VerbsData.Update, "SessionEnvironment")] + [OutputType(typeof(void))] + public sealed class UpdateSessionEnvironmentCommand : ChocolateyCmdlet + { + protected override void End() + { + var calledByAlias = MyInvocation?.InvocationName.ToLower() == "refreshenv"; + + if (calledByAlias) + { + WriteObject("Refreshing environment variables from the registry for powershell.exe. Please wait..."); + } + else + { + WriteVerbose("Refreshing environment variables from the registry."); + } + + EnvironmentHelper.UpdateSession(this); + + if (calledByAlias) + { + WriteObject("Finished"); + } + } + } +} diff --git a/src/Chocolatey.PowerShell/Helpers/Elevation.cs b/src/Chocolatey.PowerShell/Helpers/Elevation.cs new file mode 100644 index 0000000000..a8fc6cb8b5 --- /dev/null +++ b/src/Chocolatey.PowerShell/Helpers/Elevation.cs @@ -0,0 +1,75 @@ +// Copyright © 2017 - 2024 Chocolatey Software, Inc +// Copyright © 2011 - 2017 RealDimensions Software, LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +using System; +using System.Management.Automation; + +namespace Chocolatey.PowerShell.Helpers +{ + /// + /// Helpers for checking and handling if the process is elevated or not. + /// + public static class Elevation + { + /// + /// Ensures a command is run in an elevated context. + /// + /// The return type of the . + /// The cmdlet calling the method. + /// The C# code path that is typically executed if the process is elevated. + /// The PowerShell fallback command that will re-enter the code path after elevation. + /// The return value of the or the when executed. + public static object RunElevated(PSCmdlet cmdlet, Func action, string fallbackCommand) + { + if (ProcessInformation.IsElevated()) + { + return action(); + } + + // We're going to quote the string in order to pass it to the command, + // so escape any double quotes passed in with PowerShell escape chars + // to ensure they're passed in correctly. + if (fallbackCommand.IndexOf('"') != -1) + { + fallbackCommand.Replace("\"", "`\""); + } + + // This elevation path is known not to work, because this command does *not* invoke the new process with + // BOTH UseShellExecute=true and Verb=RunAs (see https://github.com/chocolatey/choco/issues/434). + // This code remains here to mimic the current elevation checks used for the other code path, and is + // expected to be removed or completely overhaulted and replaced in the near-ish future. + return cmdlet.InvokeCommand.InvokeScript($"Start-ChocolateyProcessAsAdmin -statements \"{fallbackCommand}\""); + } + + /// + /// Ensures a command is run in an elevated context. + /// + /// The cmdlet calling the method. + /// The C# code path that is typically executed if the process is elevated. + /// The PowerShell fallback command that will re-enter the code path after elevation. + /// The return value of the or the when executed. + public static void RunElevated(PSCmdlet cmdlet, Action action, string fallbackCommand) + { + object wrappedAction() + { + action(); + return null; + } + + RunElevated(cmdlet, wrappedAction, fallbackCommand); + } + } +} diff --git a/src/Chocolatey.PowerShell/Helpers/EnvironmentHelper.cs b/src/Chocolatey.PowerShell/Helpers/EnvironmentHelper.cs new file mode 100644 index 0000000000..fedc3d86e2 --- /dev/null +++ b/src/Chocolatey.PowerShell/Helpers/EnvironmentHelper.cs @@ -0,0 +1,258 @@ +// Copyright © 2017 - 2024 Chocolatey Software, Inc +// Copyright © 2011 - 2017 RealDimensions Software, LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using Chocolatey.PowerShell.Shared; +using Chocolatey.PowerShell.Win32; +using Microsoft.Win32; + +namespace Chocolatey.PowerShell.Helpers +{ + public static class EnvironmentHelper + { + private const string MachineEnvironmentRegistryKeyName = @"SYSTEM\CurrentControlSet\Control\Session Manager\Environment\"; + private const string UserEnvironmentRegistryKeyName = "Environment"; + + /// + /// Gets the value of the environment variable with the target , expanding environment names that may be present in the value. + /// + /// The cmdlet running the method. + /// The name of the environment variable to retrieve. + /// The scope to look in for the environment variable. + /// The value of the environment variable as a string. + public static string GetVariable(PSCmdlet cmdlet, string name, EnvironmentVariableTarget scope) + { + return GetVariable(cmdlet, name, scope, preserveVariables: false); + } + + /// + /// Gets the value of the environment variable with the target . + /// + /// The cmdlet running the method. + /// The name of the environment variable to retrieve. + /// The scope to look in for the environment variable. + /// Whether to preserve environment variable names in the retrieved value. If false, environment names will be expanded. + /// The value of the environment variable as a string. + public static string GetVariable(PSCmdlet cmdlet, string name, EnvironmentVariableTarget scope, bool preserveVariables) + { + if (scope == EnvironmentVariableTarget.Process) + { + return Environment.GetEnvironmentVariable(name, scope); + } + + var value = string.Empty; + + try + { + using (var registryKey = GetEnvironmentKey(scope)) + { + var options = preserveVariables ? RegistryValueOptions.DoNotExpandEnvironmentNames : RegistryValueOptions.None; + if (!(registryKey is null)) + { + value = (string)registryKey.GetValue(name, string.Empty, options); + } + } + } + catch (Exception error) + { + cmdlet.WriteDebug($"Unable to retrieve the {name} environment variable. Details: {error.Message}"); + } + + if (string.IsNullOrEmpty(value)) + { + value = Environment.GetEnvironmentVariable(name, scope); + } + + return value ?? string.Empty; + } + + /// + /// Gets the registry key associated with the targeted scope of Environment variables. + /// + /// The scope of the environment variables to look up. + /// The registry key associated with the targeted of environment variables. + /// Thrown if is not or . + private static RegistryKey GetEnvironmentKey(EnvironmentVariableTarget scope, bool writable = false) + { + switch (scope) + { + case EnvironmentVariableTarget.User: + return Registry.CurrentUser.OpenSubKey(UserEnvironmentRegistryKeyName, writable); + case EnvironmentVariableTarget.Machine: + return Registry.LocalMachine.OpenSubKey(MachineEnvironmentRegistryKeyName, writable); + default: + throw new NotSupportedException($"The environment variable scope value '{scope}' is not supported."); + } + } + + + /// + /// Gets the list of environment variables in the specified . + /// + /// The scope to lookup environment variable names in. + /// + public static string[] GetVariableNames(EnvironmentVariableTarget scope) + { + if (scope == EnvironmentVariableTarget.Process) + { + return Environment.GetEnvironmentVariables().Keys.Cast().ToArray(); + } + + try + { + using (var registryKey = GetEnvironmentKey(scope)) + { + return registryKey.GetValueNames(); + } + } + catch + { + // HKCU:\Environment may not exist in all Windows OSes + return Array.Empty(); + } + } + + /// + /// Sets the value of an environment variable at the target , and updates the current session environment. + /// + /// The cmdlet calling the method. + /// The name of the environment variable to set. + /// The scope to set the environment variable in. + /// The value to set the environment variable to. + public static void SetVariable(PSCmdlet cmdlet, string name, EnvironmentVariableTarget scope, string value) + { + if (scope == EnvironmentVariableTarget.Process) + { + Environment.SetEnvironmentVariable(name, value); + return; + } + + using (var registryKey = GetEnvironmentKey(scope, writable: true)) + { + var registryType = RegistryValueKind.String; + + try + { + if (registryKey.GetValueNames().Contains(name)) + { + registryType = registryKey.GetValueKind(name); + } + } + catch + { + // The value doesn't exist yet, suppress the error. + } + + if (name.ToUpper() == EnvironmentVariables.Path) + { + registryType = RegistryValueKind.ExpandString; + } + + cmdlet.WriteDebug($"Registry type for {name} is/will be {registryType}"); + + if (string.IsNullOrEmpty(value)) + { + registryKey.DeleteValue(name, throwOnMissingValue: false); + } + else + { + registryKey.SetValue(name, value, registryType); + } + } + + try + { + // Trigger environment refresh in explorer.exe: + // 1. Notify all windows of environment block change + NativeMethods.SendMessageTimeout( + hWnd: (IntPtr)NativeMethods.HWND_BROADCAST, + Msg: NativeMethods.WM_SETTINGCHANGE, + wParam: UIntPtr.Zero, + lParam: "Environment", + fuFlags: 2, + uTimeout: 5000, + out UIntPtr result); + + // 2. Set a user environment variable making the system refresh + var setxPath = string.Format(@"{0}\System32\setx.exe", GetVariable(cmdlet, EnvironmentVariables.SystemRoot, EnvironmentVariableTarget.Process)); + cmdlet.InvokeCommand.InvokeScript($"& \"{setxPath}\" {EnvironmentVariables.ChocolateyLastPathUpdate} \"{DateTime.Now.ToFileTime()}\""); + } + catch (Exception error) + { + cmdlet.WriteWarning($"Failure attempting to let Explorer know about updated environment settings.\n {error.Message}"); + } + + UpdateSession(cmdlet); + } + + /// + /// Updates the current session environment, ensuring environment changes are reflected in the current session. + /// + /// The cmdlet calling the method. + public static void UpdateSession(PSCmdlet cmdlet) + { + var userName = GetVariable(cmdlet, EnvironmentVariables.Username, EnvironmentVariableTarget.Process); + var architecture = GetVariable(cmdlet, EnvironmentVariables.ProcessorArchitecture, EnvironmentVariableTarget.Process); + var psModulePath = GetVariable(cmdlet, EnvironmentVariables.PSModulePath, EnvironmentVariableTarget.Process); + + var scopeList = new List() { EnvironmentVariableTarget.Process, EnvironmentVariableTarget.Machine }; + + var computerName = GetVariable(cmdlet, EnvironmentVariables.ComputerName, EnvironmentVariableTarget.Process); + + // User scope should override (be checked after) machine scope, but only if we're not running as SYSTEM + if (userName != computerName && userName != EnvironmentVariables.System) + { + scopeList.Add(EnvironmentVariableTarget.User); + } + + foreach (var scope in scopeList) + { + foreach (var name in GetVariableNames(scope)) + { + var value = GetVariable(cmdlet, name, scope); + if (!string.IsNullOrEmpty(value)) + { + SetVariable(cmdlet, name, EnvironmentVariableTarget.Process, value); + } + } + } + + // Update PATH, combining both scopes' values. + var paths = new string[2]; + paths[0] = GetVariable(cmdlet, EnvironmentVariables.Path, EnvironmentVariableTarget.Machine); + paths[1] = GetVariable(cmdlet, EnvironmentVariables.Path, EnvironmentVariableTarget.User); + + SetVariable(cmdlet, EnvironmentVariables.Path, EnvironmentVariableTarget.Process, string.Join(";", paths)); + + // Preserve PSModulePath as it's almost always updated by process, preserve it + SetVariable(cmdlet, EnvironmentVariables.PSModulePath, EnvironmentVariableTarget.Process, psModulePath); + + // Preserve user and architecture + if (!string.IsNullOrEmpty(userName)) + { + SetVariable(cmdlet, EnvironmentVariables.Username, EnvironmentVariableTarget.Process, userName); + } + + if (!string.IsNullOrEmpty(architecture)) + { + SetVariable(cmdlet, EnvironmentVariables.ProcessorArchitecture, EnvironmentVariableTarget.Process, architecture); + } + } + } +} diff --git a/src/Chocolatey.PowerShell/Helpers/PSHelper.cs b/src/Chocolatey.PowerShell/Helpers/PSHelper.cs new file mode 100644 index 0000000000..a18bca9fce --- /dev/null +++ b/src/Chocolatey.PowerShell/Helpers/PSHelper.cs @@ -0,0 +1,53 @@ +// Copyright © 2017 - 2024 Chocolatey Software, Inc +// Copyright © 2011 - 2017 RealDimensions Software, LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +using System.Management.Automation; + +namespace Chocolatey.PowerShell.Helpers +{ + /// + /// Helper methods for cmdlets to make interfacing with PowerShell easier. + /// + public static class PSHelper + { + /// + /// Writes objects to the output pipeline of the , enumerating collections. + /// + /// The cmdlet calling the method. + /// + public static void WriteObject(PSCmdlet cmdlet, object output) + { + cmdlet.WriteObject(output, enumerateCollection: true); + } + + /// + /// Helper method to mimic Write-Host from C#, falls back to Write-Verbose when a host is not available. + /// + /// The cmdlet calling the method. + /// The message to write to the host. + public static void WriteHost(PSCmdlet cmdlet, string message) + { + if (!(cmdlet.Host is null)) + { + cmdlet.Host.UI.WriteLine(message); + } + else + { + cmdlet.WriteVerbose(message); + } + } + } +} diff --git a/src/Chocolatey.PowerShell/Helpers/Paths.cs b/src/Chocolatey.PowerShell/Helpers/Paths.cs new file mode 100644 index 0000000000..d1e58f02f1 --- /dev/null +++ b/src/Chocolatey.PowerShell/Helpers/Paths.cs @@ -0,0 +1,166 @@ +// Copyright © 2017 - 2024 Chocolatey Software, Inc +// Copyright © 2011 - 2017 RealDimensions Software, LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +using System; +using System.Collections.Generic; +using System.IO; +using System.Management.Automation; +using System.Text; +using System.Text.RegularExpressions; +using Chocolatey.PowerShell.Shared; + +namespace Chocolatey.PowerShell.Helpers +{ + internal static class Paths + { + private const string PathSplitPattern = "(?<=\\G(?:[^;\"]|\"[^\"]*\")*);"; + + private static readonly Regex _pathSplitRegex = new Regex(PathSplitPattern, RegexOptions.Compiled); + + /// + /// Split the given at each semicolon, excepting if the semicolon is in double quotes. + /// Blank entries are preserved, such as those caused by a trailing semicolon. + /// + /// A PATH string to parse and split into a list of entries. + /// The list of entries, with any surrounding quotes trimmed from each entry. + internal static string[] ParsePathString(string pathString) + { + var pathList = _pathSplitRegex.Split(pathString ?? string.Empty); + + // Strip any quotes from the PATH entries, if present + for (var i = 0; i < pathList.Length; i++) + { + var entry = pathList[i]; + if (entry.Length >= 2 && entry.StartsWith("\"", StringComparison.Ordinal) && entry.EndsWith("\"", StringComparison.Ordinal)) + { + pathList[i] = entry.Substring(1, entry.Length - 2); + } + } + + return pathList; + } + + /// + /// Case-insensitively find the index of the given in the list of . + /// + /// The list of paths to look in. + /// The value to search for. + /// + internal static int FindPathIndex(List paths, string value) + { + // Ensure we trim any trailing directory separators (slashes) off the end of both the input value to find and the values to compare against. + var valueWithoutTrailingSlash = value.TrimEnd(Path.DirectorySeparatorChar); + + return paths.FindIndex(s => s.TrimEnd(Path.DirectorySeparatorChar).Equals(valueWithoutTrailingSlash, StringComparison.OrdinalIgnoreCase)); + } + + /// + /// Construct a PATH string from a list of entries and add quotes around any entries that contain PATH-reserved characters (; on Windows). + /// + /// The list of paths to format. + /// A correctly-formatted PATH string containing all the input paths, each quoted if necessary. + internal static string GetPathString(IList paths) + { + var result = new StringBuilder(); + + // Quote paths if necessary + for (var i = 0; i < paths.Count; i++) + { + if (result.Length > 0) + { + result.Append(Path.PathSeparator); + } + + var path = paths[i]; + if (path?.IndexOf(Path.PathSeparator) > -1 && !path.StartsWith("\"") && !path.EndsWith("\"")) + { + result.Append($"\"{path}\""); + } + else + { + result.Append(path); + } + } + + return result.ToString(); + } + + /// + /// Installs/adds a new PATH entry at the target . + /// + /// The cmdlet running the method. + /// The path entry to add/install. + /// The target scope of the PATH variable to modify. + public static void InstallPathEntry(PSCmdlet cmdlet, string pathEntry, EnvironmentVariableTarget scope) + { + var pathEntries = new List(ParsePathString(EnvironmentHelper.GetVariable(cmdlet, EnvironmentVariables.Path, scope, preserveVariables: true))); + if (FindPathIndex(pathEntries, pathEntry) == -1) + { + PSHelper.WriteHost(cmdlet, $"PATH environment variable does not have {pathEntry} in it. Adding..."); + + pathEntries.Add(pathEntry); + var newPath = GetPathString(pathEntries); + + void updatePath() + { + EnvironmentHelper.SetVariable(cmdlet, EnvironmentVariables.Path, scope, newPath); + } + + if (scope == EnvironmentVariableTarget.Machine) + { + Elevation.RunElevated(cmdlet, updatePath, $"Install-ChocolateyPath -PathToInstall '{pathEntry}' -PathType {scope}"); + } + else + { + updatePath(); + } + } + } + + /// + /// Uninstalls/removes a PATH entry at the target . + /// + /// The cmdlet running the method. + /// The path entry to remove/uninstall. + /// The target scope of the PATH variable to modify. + public static void UninstallPathEntry(PSCmdlet cmdlet, string pathEntry, EnvironmentVariableTarget scope) + { + var pathEntries = new List(ParsePathString(EnvironmentHelper.GetVariable(cmdlet, EnvironmentVariables.Path, scope, preserveVariables: true))); + var removeIndex = FindPathIndex(pathEntries, pathEntry); + if (removeIndex >= 0) + { + PSHelper.WriteHost(cmdlet, $"Found {pathEntry} in PATH environment variable. Removing..."); + + pathEntries.RemoveAt(removeIndex); + var newPath = GetPathString(pathEntries); + + void updatePath() + { + EnvironmentHelper.SetVariable(cmdlet, EnvironmentVariables.Path, scope, newPath); + } + + if (scope == EnvironmentVariableTarget.Machine) + { + Elevation.RunElevated(cmdlet, updatePath, $"Uninstall-ChocolateyPath -PathToInstall '{pathEntry}' -PathType {scope}"); + } + else + { + updatePath(); + } + } + } + } +} diff --git a/src/Chocolatey.PowerShell/Helpers/ProcessInformation.cs b/src/Chocolatey.PowerShell/Helpers/ProcessInformation.cs new file mode 100644 index 0000000000..1237742abe --- /dev/null +++ b/src/Chocolatey.PowerShell/Helpers/ProcessInformation.cs @@ -0,0 +1,57 @@ +// Copyright © 2017 - 2024 Chocolatey Software, Inc +// Copyright © 2011 - 2017 RealDimensions Software, LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +using System.Runtime.InteropServices; +using System.Security.Principal; + +namespace Chocolatey.PowerShell.Helpers +{ + public static class ProcessInformation + { + /// + /// Helper method for determining current OS platform. + /// + /// True if the current OS is Windows. + public static bool IsWindows() + { + return RuntimeInformation.IsOSPlatform(OSPlatform.Windows); + } + + /// + /// Determines whether the current process has administrative rights. + /// + /// True if running on Windows and the process has administrative rights. + public static bool IsElevated() + { + if (!IsWindows()) + { + return false; + } + + using (var identity = WindowsIdentity.GetCurrent(TokenAccessLevels.Query | TokenAccessLevels.Duplicate)) + { + if (identity is null) + { + return false; + } + + var principal = new WindowsPrincipal(identity); + + return principal.IsInRole(WindowsBuiltInRole.Administrator); + } + } + } +} diff --git a/src/Chocolatey.PowerShell/Properties/AssemblyInfo.cs b/src/Chocolatey.PowerShell/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..7e2f53a358 --- /dev/null +++ b/src/Chocolatey.PowerShell/Properties/AssemblyInfo.cs @@ -0,0 +1,20 @@ +// Copyright © 2017 - 2024 Chocolatey Software, Inc +// Copyright © 2011 - 2017 RealDimensions Software, LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +using System.Runtime.InteropServices; + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("88396c46-8089-4814-a7d1-e18777ff6083")] \ No newline at end of file diff --git a/src/Chocolatey.PowerShell/Shared/ChocolateyCmdlet.cs b/src/Chocolatey.PowerShell/Shared/ChocolateyCmdlet.cs new file mode 100644 index 0000000000..458975cb8c --- /dev/null +++ b/src/Chocolatey.PowerShell/Shared/ChocolateyCmdlet.cs @@ -0,0 +1,141 @@ +// Copyright © 2017 - 2024 Chocolatey Software, Inc +// Copyright © 2011 - 2017 RealDimensions Software, LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +using System.Collections; +using System.Management.Automation; +using System.Text; +using Chocolatey.PowerShell.Helpers; + +namespace Chocolatey.PowerShell.Shared +{ + /// + /// Base class for all Chocolatey cmdlets. + /// Contains a number of helpers and common code that is used by all cmdlets. + /// + public abstract class ChocolateyCmdlet : PSCmdlet + { + /// + /// For compatibility reasons, we always add the -IgnoredArguments parameter, so that newly added parameters + /// won't break things too much if a package is run with an older version of Chocolatey. + /// + [Parameter(ValueFromRemainingArguments = true)] + public object[] IgnoredArguments { get; set; } + + /// + /// Sets whether the cmdlet writes its parameters and name to the debug log when it is called and + /// when it completes its operation (after End() is called). + /// This should remain set to true for all commands that are considered part of the public Chocolatey CLI API, + /// unless there are concerns about potentially sensitive information making it into a log file from the parameters of the command. + /// + protected virtual bool Logging { get; } = true; + + protected sealed override void BeginProcessing() + { + WriteCmdletCallDebugMessage(); + Begin(); + } + + /// + /// Override this method to define the cmdlet's begin {} block behaviour. + /// Note that parameters that are defined as ValueFromPipeline or ValueFromPipelineByPropertyName + /// will not be available for the duration of this method. + /// + protected virtual void Begin() + { + } + + protected sealed override void ProcessRecord() + { + Process(); + } + + /// + /// Override this method to define the cmdlet's process {} block behaviour. + /// This is called once for every item the cmdlet receives to a pipeline parameter, or only once if the value is supplied directly. + /// Parameters that are defined as ValueFromPipeline or ValueFromPipelineByPropertyName will be available during this method call. + /// + protected virtual void Process() + { + } + + protected sealed override void EndProcessing() + { + End(); + WriteCmdletCompletionDebugMessage(); + } + + /// + /// Override this method to define the cmdlet's end {} block behaviour. + /// Note that parameters that are defined as ValueFromPipeline or ValueFromPipelineByPropertyName + /// may not be available or have complete data during this method call. + /// + protected virtual void End() + { + } + + protected void WriteHost(string message) + { + PSHelper.WriteHost(this, message); + } + + protected new void WriteObject(object value) + { + PSHelper.WriteObject(this, value); + } + + protected void WriteCmdletCallDebugMessage() + { + if (!Logging) + { + return; + } + + var logMessage = new StringBuilder() + .Append("Running ") + .Append(MyInvocation.InvocationName); + + foreach (var param in MyInvocation.BoundParameters) + { + var paramNameLower = param.Key.ToLower(); + + if (paramNameLower == "ignoredarguments") + { + continue; + } + + var paramValue = paramNameLower == "sensitivestatements" || paramNameLower == "password" + ? "[REDACTED]" + : param.Value is IList list + ? string.Join(" ", list) + : LanguagePrimitives.ConvertTo(param.Value, typeof(string)); + + logMessage.Append($" -{param.Key} '{paramValue}'"); + } + + WriteDebug(logMessage.ToString()); + } + + protected void WriteCmdletCompletionDebugMessage() + { + if (!Logging) + { + return; + } + + WriteDebug($"Finishing '{MyInvocation.InvocationName}'"); + } + } +} diff --git a/src/Chocolatey.PowerShell/Shared/EnvironmentVariables.cs b/src/Chocolatey.PowerShell/Shared/EnvironmentVariables.cs new file mode 100644 index 0000000000..117478640f --- /dev/null +++ b/src/Chocolatey.PowerShell/Shared/EnvironmentVariables.cs @@ -0,0 +1,30 @@ +// Copyright © 2017 - 2024 Chocolatey Software, Inc +// Copyright © 2011 - 2017 RealDimensions Software, LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +namespace Chocolatey.PowerShell.Shared +{ + public static class EnvironmentVariables + { + public const string ChocolateyLastPathUpdate = "ChocolateyLastPathUpdate"; + public const string ComputerName = "COMPUTERNAME"; + public const string Path = "PATH"; + public const string ProcessorArchitecture = "PROCESSOR_ARCHITECTURE"; + public const string PSModulePath = "PSModulePath"; + public const string System = "SYSTEM"; + public const string SystemRoot = "SystemRoot"; + public const string Username = "USERNAME"; + } +} diff --git a/src/Chocolatey.PowerShell/Win32/NativeMethods.cs b/src/Chocolatey.PowerShell/Win32/NativeMethods.cs new file mode 100644 index 0000000000..0f2c0eb540 --- /dev/null +++ b/src/Chocolatey.PowerShell/Win32/NativeMethods.cs @@ -0,0 +1,35 @@ +// Copyright © 2017 - 2024 Chocolatey Software, Inc +// Copyright © 2011 - 2017 RealDimensions Software, LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +using System; +using System.Runtime.InteropServices; + +namespace Chocolatey.PowerShell.Win32 +{ + internal static class NativeMethods + { + internal const int HWND_BROADCAST = 0xffff; + internal const int WM_SETTINGCHANGE = 0x1a; + + /// + /// See https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-sendmessagetimeoutw for documentation. + /// + [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)] + internal static extern IntPtr SendMessageTimeout( + IntPtr hWnd, uint Msg, UIntPtr wParam, string lParam, + uint fuFlags, uint uTimeout, out UIntPtr lpdwResult); + } +} diff --git a/src/chocolatey.console/Program.cs b/src/chocolatey.console/Program.cs index 1f89ff978b..51c10e1535 100644 --- a/src/chocolatey.console/Program.cs +++ b/src/chocolatey.console/Program.cs @@ -14,39 +14,39 @@ // See the License for the specific language governing permissions and // limitations under the License. -namespace chocolatey.console -{ - using System; - using System.Collections.Generic; - using System.IO; - using System.Linq; - using System.Reflection; - using Microsoft.Win32; - using chocolatey.infrastructure.information; - using infrastructure.app; - using infrastructure.app.builders; - using infrastructure.app.configuration; - using infrastructure.app.runners; - using infrastructure.commandline; - using infrastructure.extractors; - using infrastructure.licensing; - using infrastructure.logging; - using infrastructure.platforms; - using infrastructure.registration; - using infrastructure.tolerance; - using SimpleInjector; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using Microsoft.Win32; +using chocolatey.infrastructure.information; +using chocolatey.infrastructure.app; +using chocolatey.infrastructure.app.builders; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.runners; +using chocolatey.infrastructure.commandline; +using chocolatey.infrastructure.extractors; +using chocolatey.infrastructure.licensing; +using chocolatey.infrastructure.logging; +using chocolatey.infrastructure.platforms; +using chocolatey.infrastructure.registration; +using chocolatey.infrastructure.tolerance; +using SimpleInjector; #if !NoResources - using resources; +using chocolatey.resources; #endif - using Assembly = infrastructure.adapters.Assembly; - using Console = System.Console; - using Environment = System.Environment; - using IFileSystem = infrastructure.filesystem.IFileSystem; +using Assembly = chocolatey.infrastructure.adapters.Assembly; +using Console = System.Console; +using Environment = System.Environment; +using IFileSystem = chocolatey.infrastructure.filesystem.IFileSystem; +namespace chocolatey.console +{ public sealed class Program { private static void Main(string[] args) @@ -58,9 +58,12 @@ private static void Main(string[] args) { AddAssemblyResolver(); - string loggingLocation = ApplicationParameters.LoggingLocation; + var loggingLocation = ApplicationParameters.LoggingLocation; //no file system at this point - if (!Directory.Exists(loggingLocation)) Directory.CreateDirectory(loggingLocation); + if (!Directory.Exists(loggingLocation)) + { + Directory.CreateDirectory(loggingLocation); + } Log4NetAppenderConfiguration.Configure(loggingLocation, excludeLoggerNames: ChocolateyLoggers.Trace.ToStringSafe()); Bootstrap.Initialize(); @@ -107,7 +110,7 @@ private static void Main(string[] args) ReportVersionAndExitIfRequested(args, config); - TrapExitScenarios(config); + TrapExitScenarios(); if (config.RegularOutput) { @@ -144,7 +147,7 @@ private static void Main(string[] args) Log4NetAppenderConfiguration.EnableVerboseLoggingIf(config.Verbose, config.Debug, verboseAppenderName); Log4NetAppenderConfiguration.EnableTraceLoggingIf(config.Trace, traceAppenderName); "chocolatey".Log().Debug(() => "{0} is running on {1} v {2}".FormatWith(ApplicationParameters.Name, config.Information.PlatformType, config.Information.PlatformVersion.ToStringSafe())); - //"chocolatey".Log().Debug(() => "Command Line: {0}".format_with(Environment.CommandLine)); + //"chocolatey".Log().Debug(() => "Command Line: {0}".FormatWith(Environment.CommandLine)); RemoveOldChocoExe(fileSystem); @@ -178,7 +181,10 @@ private static void Main(string[] args) "chocolatey".Log().Error(ChocolateyLoggers.LogFileOnly, () => "More Details: {0}".FormatWith(ex.ToString())); } - if (Environment.ExitCode == 0) Environment.ExitCode = 1; + if (Environment.ExitCode == 0) + { + Environment.ExitCode = 1; + } } finally { @@ -228,7 +234,10 @@ private static void AddAssemblyResolver() private static void ReportVersionAndExitIfRequested(string[] args, ChocolateyConfiguration config) { - if (args == null || args.Length == 0) return; + if (args == null || args.Length == 0) + { + return; + } var firstArg = args.FirstOrDefault(); if (firstArg.IsEqualTo("-v") || firstArg.IsEqualTo("--version")) @@ -240,7 +249,7 @@ private static void ReportVersionAndExitIfRequested(string[] args, ChocolateyCon } } - private static void TrapExitScenarios(ChocolateyConfiguration config) + private static void TrapExitScenarios() { ExitScenarioHandler.SetHandler(); } diff --git a/src/chocolatey.console/chocolatey.console.csproj b/src/chocolatey.console/chocolatey.console.csproj index 92cfc151e8..3da9b03260 100644 --- a/src/chocolatey.console/chocolatey.console.csproj +++ b/src/chocolatey.console/chocolatey.console.csproj @@ -224,6 +224,10 @@ {5563DC61-35FD-4FAB-B331-9AE1FDB23F80} chocolatey + + {88396c46-8089-4814-a7d1-e18777ff6083} + Chocolatey.PowerShell + @@ -238,4 +242,10 @@ --> + + + + + + \ No newline at end of file diff --git a/src/chocolatey.install/chocolatey.wxs b/src/chocolatey.install/chocolatey.wxs index 5ea061104d..07a4befa27 100644 --- a/src/chocolatey.install/chocolatey.wxs +++ b/src/chocolatey.install/chocolatey.wxs @@ -32,8 +32,8 @@ - + Value=""[SystemFolder]\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -ExecutionPolicy Bypass -Command "& '[#ChocolateyInstall]' -ChocolateyDownloadUrl '[#ChocolateyNupkg]' -UseNativeUnzip"" /> + @@ -42,14 +42,6 @@ - - - - - - - - @@ -58,23 +50,13 @@ - - - - - - - + - - - - diff --git a/src/chocolatey.resources/chocolatey.resources.csproj b/src/chocolatey.resources/chocolatey.resources.csproj index 9ac71dba5f..207c9f7487 100644 --- a/src/chocolatey.resources/chocolatey.resources.csproj +++ b/src/chocolatey.resources/chocolatey.resources.csproj @@ -82,7 +82,6 @@ - @@ -91,7 +90,6 @@ - @@ -108,14 +106,6 @@ - - - - - - - - diff --git a/src/chocolatey.resources/helpers/ChocolateyTabExpansion.ps1 b/src/chocolatey.resources/helpers/ChocolateyTabExpansion.ps1 index 2eb13a8341..149bcd0827 100644 --- a/src/chocolatey.resources/helpers/ChocolateyTabExpansion.ps1 +++ b/src/chocolatey.resources/helpers/ChocolateyTabExpansion.ps1 @@ -35,30 +35,31 @@ function script:chocoCmdOperations($commands, $command, $filter, $currentArgumen Where-Object { $_ -like "$filter*" } } -$script:chocoCommands = @('-?','search','list','info','install','outdated','upgrade','uninstall','new','pack','push','-h','--help','pin','source','config','feature','apikey','export','help','template','cache','--version') +$script:chocoCommands = @('-?','search','list','info','install','outdated','upgrade','uninstall','new','pack','push','-h','--help','pin','source','config','feature','apikey','export','help','template','cache','--version','rule') # ensure these all have a space to start, or they will cause issues $allcommands = " --debug --verbose --trace --noop --help -? --online --accept-license --confirm --limit-output --no-progress --log-file='' --execution-timeout='' --cache-location='' --proxy='' --proxy-user='' --proxy-password='' --proxy-bypass-list='' --proxy-bypass-on-local --force --no-color --skip-compatibility-checks --ignore-http-cache" $commandOptions = @{ list = "--id-only --pre --exact --by-id-only --id-starts-with --detailed --prerelease --include-programs --source='' --page='' --page-size=''" - search = "--id-only --pre --exact --by-id-only --id-starts-with --detailed --approved-only --not-broken --source='' --user='' --password='' --prerelease --include-programs --page='' --page-size='' --order-by-popularity --download-cache-only --disable-package-repository-optimizations" - info = "--pre --source='' --user='' --password='' --prerelease --disable-package-repository-optimizations" - install = "-y -whatif --pre --version= --params='' --install-arguments='' --override-arguments --ignore-dependencies --source='' --source='windowsfeatures' --user='' --password='' --prerelease --forcex86 --not-silent --package-parameters='' --exit-when-reboot-detected --ignore-detected-reboot --allow-downgrade --force-dependencies --require-checksums --use-package-exit-codes --ignore-package-exit-codes --skip-automation-scripts --ignore-checksums --allow-empty-checksums --allow-empty-checksums-secure --download-checksum='' --download-checksum-type='' --download-checksum-x64='' --download-checksum-type-x64='' --stop-on-first-package-failure --disable-package-repository-optimizations --pin" + search = "--id-only --pre --exact --by-id-only --id-starts-with --detailed --approved-only --not-broken --source='' --user='' --password='' --prerelease --include-programs --page='' --page-size='' --order-by-popularity --download-cache-only --disable-package-repository-optimizations --include-configured-sources" + info = "--source='' --local-only --version='' --prerelease --user='' --password='' --cert='' --certpassword='' --disable-package-repository-optimizations --include-configured-sources" + install = "-y -whatif --pre --version='' --params='' --install-arguments='' --override-arguments --ignore-dependencies --source='' --source='windowsfeatures' --user='' --password='' --prerelease --forcex86 --not-silent --package-parameters='' --exit-when-reboot-detected --ignore-detected-reboot --allow-downgrade --force-dependencies --require-checksums --use-package-exit-codes --ignore-package-exit-codes --skip-automation-scripts --ignore-checksums --allow-empty-checksums --allow-empty-checksums-secure --download-checksum='' --download-checksum-type='' --download-checksum-x64='' --download-checksum-type-x64='' --stop-on-first-package-failure --disable-package-repository-optimizations --pin --include-configured-sources" pin = "--name='' --version=''" - outdated = "--source='' --user='' --password='' --ignore-pinned --ignore-unfound --pre --prerelease --disable-package-repository-optimizations" - upgrade = "-y -whatif --pre --version='' --except='' --params='' --install-arguments='' --override-arguments --ignore-dependencies --source='' --source='windowsfeatures' --user='' --password='' --prerelease --forcex86 --not-silent --package-parameters='' --exit-when-reboot-detected --ignore-detected-reboot --allow-downgrade --require-checksums --use-package-exit-codes --ignore-package-exit-codes --skip-automation-scripts --fail-on-unfound --fail-on-not-installed --ignore-checksums --allow-empty-checksums --allow-empty-checksums-secure --download-checksum='' --download-checksum-type='' --download-checksum-x64='' --download-checksum-type-x64='' --exclude-prerelease --stop-on-first-package-failure --use-remembered-options --ignore-remembered-options --skip-when-not-installed --install-if-not-installed --disable-package-repository-optimizations --pin" - uninstall = "-y -whatif --force-dependencies --remove-dependencies --all-versions --source='windowsfeatures' --version= --uninstall-arguments='' --override-arguments --not-silent --params='' --package-parameters='' --exit-when-reboot-detected --ignore-detected-reboot --use-package-exit-codes --ignore-package-exit-codes --skip-automation-scripts --use-autouninstaller --skip-autouninstaller --fail-on-autouninstaller --ignore-autouninstaller-failure --stop-on-first-package-failure" + outdated = "--source='' --user='' --password='' --ignore-pinned --ignore-unfound --pre --prerelease --disable-package-repository-optimizations --include-configured-sources" + upgrade = "-y -whatif --pre --version='' --except='' --params='' --install-arguments='' --override-arguments --ignore-dependencies --source='' --source='windowsfeatures' --user='' --password='' --prerelease --forcex86 --not-silent --package-parameters='' --exit-when-reboot-detected --ignore-detected-reboot --allow-downgrade --require-checksums --use-package-exit-codes --ignore-package-exit-codes --skip-automation-scripts --fail-on-unfound --fail-on-not-installed --ignore-checksums --allow-empty-checksums --allow-empty-checksums-secure --download-checksum='' --download-checksum-type='' --download-checksum-x64='' --download-checksum-type-x64='' --exclude-prerelease --stop-on-first-package-failure --use-remembered-options --ignore-remembered-options --skip-when-not-installed --install-if-not-installed --disable-package-repository-optimizations --pin --ignore-pinned --include-configured-sources" + uninstall = "-y -whatif --force-dependencies --remove-dependencies --all-versions --source='windowsfeatures' --version='' --uninstall-arguments='' --override-arguments --not-silent --params='' --package-parameters='' --exit-when-reboot-detected --ignore-detected-reboot --use-package-exit-codes --ignore-package-exit-codes --skip-automation-scripts --use-autouninstaller --skip-autouninstaller --fail-on-autouninstaller --ignore-autouninstaller-failure --stop-on-first-package-failure" new = "--template-name='' --output-directory='' --automaticpackage --version='' --maintainer='' packageversion='' maintainername='' maintainerrepo='' installertype='' url='' url64='' silentargs='' --use-built-in-template" pack = "--version='' --output-directory=''" push = "--source='' --api-key='' --timeout=''" - source = "--name='' --source='' --user='' --password='' --priority= --bypass-proxy --allow-self-service" + source = "--name='' --source='' --user='' --password='' --priority='' --bypass-proxy --allow-self-service" config = "--name='' --value=''" feature = "--name=''" apikey = "--source='' --api-key='' --remove" export = "--include-version-numbers --output-file-path=''" template = "--name=''" cache = "--expired" + rule = "--name=''" } $commandOptions['find'] = $commandOptions['search'] @@ -213,7 +214,7 @@ function ChocolateyTabExpansion($lastBlock) { # Handles feature first tab "^(feature)\s+(?[^-\s]*)$" { - @('list', 'disable', 'enable', '-?') | Where-Object { $_ -like "$($matches['subcommand'])*" } + @('list', 'get', 'disable', 'enable', '-?') | Where-Object { $_ -like "$($matches['subcommand'])*" } } # Handles config first tab "^(config)\s+(?[^-\s]*)$" { @@ -284,3 +285,215 @@ function TabExpansion($line, $lastWord) { } } } + +# SIG # Begin signature block +# MIInKwYJKoZIhvcNAQcCoIInHDCCJxgCAQExDzANBglghkgBZQMEAgEFADB5Bgor +# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWC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IhvcNAQkD +# MQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMjQwNTIyMTMzMDQwWjAvBgkq +# hkiG9w0BCQQxIgQgvJ+p+XvO8qqJJxl+oqDwn4/SC6uhKsEDc9eH6TKOSg4wDQYJ +# KoZIhvcNAQEBBQAEggIAhx1u8DUXkkV7lmzhuio+uCJFRqXbWjcn8oab1uua3M7O +# 1Y7s29oKoigLvli7FEkXA2m8mAyyhtbe+boALKzpHinFJfDcQ+ZLqrPp308RxAFt +# iPs8XX/JUIv7vIdGQ1lLxNv8oD8mLl8DbsX7uB0IX1I2nmHP2/oZEqxM9xexK5Ca +# mPKZYpHGmU+u8ofVxZALW8Z+t8PK8dYTwHmgd41TTSYNAtx8Gahx9cjE+YU/n7+C +# gM1OXOYrxnG/dOiDWaq0/a8UoHJGdCeGS0xoJnY4D6C7z59Ey+5gc/r5IfNWapam +# yDrA2RNyyDaJurAd/jetTPhT12xpCYCa1do/ttszojp3B62QLj4jezaXphvAgvHr +# uKTKhf2Iu6KCrX3j1n5j7X8NRlP9/eGEFovVCW9maKe2cKlorETGJP7Jmb0L3KFB +# pqMvWG6A5G7e0M2uUB56m+HO5a2wF/cIY/2jzXTQOzsimsWjdO+X21i7zw8RN0We +# wSDuYbTETvxgmUBoDSEPgAOzdEptKpRJncr1HV+heEkMnnByNMTdSeYg4hIG+obC +# uByQFOmraRVrrPrqPqx3zTcRHtt8ruS7xIhtUU95XBKxumfDnCT/skmaTf4rq+Yx +# 8FeDnp4tyF17uzUkQDRgIXw92V58CPUKBV54ckuqotC7wrHIg9UfNC6aOkfCgUA= +# SIG # End signature block diff --git a/src/chocolatey.resources/helpers/chocolateyInstaller.psm1 b/src/chocolatey.resources/helpers/chocolateyInstaller.psm1 index 4b01918725..d71dfe2ed1 100644 --- a/src/chocolatey.resources/helpers/chocolateyInstaller.psm1 +++ b/src/chocolatey.resources/helpers/chocolateyInstaller.psm1 @@ -46,13 +46,46 @@ Get-Item -Path "$helpersPath\functions\*.ps1" | . $_.FullName } +$currentAssemblies = [System.AppDomain]::CurrentDomain.GetAssemblies() + +# Import commands from Chocolatey.PowerShell.dll +$chocolateyCmdlets = @{} + +$dllPath = "$helpersPath\Chocolatey.PowerShell.dll" +if (Test-Path $dllPath) { + # Try to import from already-loaded assembly, otherwise fallback to importing from dll + $cmdletsAssembly = $currentAssemblies | + Where-Object { $_.GetName().Name -eq 'Chocolatey.PowerShell' } | + Select-Object -First 1 + + if ($cmdletsAssembly) { + Import-Module $cmdletsAssembly.Location -Force + } + else { + Import-Module $dllPath + } + + # Cache module commands for helping resolve lookups + $chocolateyCmdlets.Default = @( (Get-Module Chocolatey.PowerShell).ExportedCmdlets.Keys ) + + Write-Debug "Cmdlets exported from Chocolatey.PowerShell.dll" + $chocolateyCmdlets.Default | Write-Debug + + # Set aliases for imported cmdlets + Set-Alias refreshenv Update-SessionEnvironment + + # Check for & remove Chocolatey.PowerShell.dll.old left-over from an upgrade/reinstall + $dllOldPath = "$dllPath.old" + if (Test-Path $dllOldPath) { + Remove-Item -Path $dllOldPath -Force -ErrorAction SilentlyContinue + } +} + # Export built-in functions prior to loading extensions so that # extension-specific loading behavior can be used based on built-in # functions. This allows those overrides to be much more deterministic Export-ModuleMember -Function * -Alias * -Cmdlet * -$currentAssemblies = [System.AppDomain]::CurrentDomain.GetAssemblies() - # Load community extensions if they exist $extensionsPath = Join-Path $helpersPath -ChildPath '..\extensions' if (Test-Path $extensionsPath) { @@ -68,13 +101,23 @@ if (Test-Path $extensionsPath) { Select-Object -First 1 if ($licensedAssembly) { - # It's already loaded, just import the existing assembly as a module for PowerShell to use - Import-Module $licensedAssembly + # Import-Module -Assembly doesn't work if the parent module is reimported, so force the import by path. + if ($licensedAssembly.Location) { + Import-Module $licensedAssembly.Location -Force + } else { + Import-Module $licensedAssembly + } } else { # Fallback: load the extension DLL from the path directly. Import-Module $licensedExtensionPath } + + # Store commands from licensed module, stripping any 'Cmdlet' suffix from the command name + $chocolateyCmdlets.Licensed = @( (Get-Module chocolatey.licensed).ExportedCmdlets.Keys | ForEach-Object { $_ -replace "Cmdlet$" } ) + + Write-Debug "Cmdlets exported from chocolatey.licensed" + $chocolateyCmdlets.Licensed | Write-Debug } catch { # Only write a warning if the Licensed extension failed to load in some way. @@ -91,5 +134,262 @@ if (Test-Path $extensionsPath) { } } +# Exercise caution and test _thoroughly_ with AND without the licensed extension installed +# when making any changes here. And make sure to update this comment if needed when any +# changes are being made. +# +# This code overrides PowerShell's default command lookup semantics as follows: +# +# 1. If the command being looked up is available in chocolatey.licensed.dll as +# a cmdlet with OR without a "Cmdlet" suffix in its name, resolve to this command. +# (in other words, looking for `Get-ChocolateyThing` will _also_ accept something +# called `Get-ChocolateyThingCmdlet` if it's from the licensed extension) +# 2. If nothing comes back from the licensed extension, then look through the cmdlets +# exported from the Chocolatey.PowerShell.dll module. If we find a match, make sure +# we resolve to this command from the Chocolatey.PowerShell.dll module. +# 3. Finally, if neither of the above find the command being looked up, do nothing and allow +# PowerShell to use its default command lookup semantics. +# +# In effect we ensure that any command calls that match the name of one of our commands +# will resolve to _our_ commands (preferring licensed cmdlets in the case of a name collision), +# preventing packages from overriding them with their own commands and potentially breaking things. +# +# This functionality is only available in v3 and later, so using this in v2 will not +# work; check for the property before trying to set it. +if ($ExecutionContext.InvokeCommand.PreCommandLookupAction) { + $ExecutionContext.InvokeCommand.PreCommandLookupAction = { + param($command, $eventArgs) + + # Don't run this handler for stuff PowerShell is looking up internally + if ($eventArgs.CommandOrigin -eq 'Runspace') { + $resolvedCommand = if ($chocolateyCmdlets.Licensed -contains $command) { + Get-Command "$command*" -Module 'chocolatey.licensed' -CommandType Cmdlet -ErrorAction SilentlyContinue | + Where-Object { @($command, "$($command)Cmdlet") -contains $_.Name } | + Select-Object -First 1 + } + elseif ($chocolateyCmdlets.Default -contains $command) { + Get-Command $command -Module "Chocolatey.PowerShell" -CommandType Cmdlet -ErrorAction SilentlyContinue + } + + if ($resolvedCommand) { + $eventArgs.Command = $resolvedCommand + $eventArgs.StopSearch = $true + } + } + }.GetNewClosure() +} + # todo: explore removing this for a future version Export-ModuleMember -Function * -Alias * -Cmdlet * + +# SIG # Begin signature block +# MIInKwYJKoZIhvcNAQcCoIInHDCCJxgCAQExDzANBglghkgBZQMEAgEFADB5Bgor +# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDNL/wxXxTwoao9 +# +niutFOSQWJKM7QvRr2vKMT3E6T+AKCCIK4wggWNMIIEdaADAgECAhAOmxiO+dAt +# 5+/bUOIIQBhaMA0GCSqGSIb3DQEBDAUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK +# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV +# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0yMjA4MDEwMDAwMDBa +# Fw0zMTExMDkyMzU5NTlaMGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy +# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNVBAMTGERpZ2lD +# ZXJ0IFRydXN0ZWQgUm9vdCBHNDCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC +# ggIBAL/mkHNo3rvkXUo8MCIwaTPswqclLskhPfKK2FnC4SmnPVirdprNrnsbhA3E +# MB/zG6Q4FutWxpdtHauyefLKEdLkX9YFPFIPUh/GnhWlfr6fqVcWWVVyr2iTcMKy +# unWZanMylNEQRBAu34LzB4TmdDttceItDBvuINXJIB1jKS3O7F5OyJP4IWGbNOsF +# xl7sWxq868nPzaw0QF+xembud8hIqGZXV59UWI4MK7dPpzDZVu7Ke13jrclPXuU1 +# 5zHL2pNe3I6PgNq2kZhAkHnDeMe2scS1ahg4AxCN2NQ3p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MfOL1kM9fgLlUCKORaN9sB1kEKOGXGFGkpKyWQNGlpQn/EuKKqHEhwl4= +# SIG # End signature block diff --git a/src/chocolatey.resources/helpers/chocolateyProfile.psm1 b/src/chocolatey.resources/helpers/chocolateyProfile.psm1 index b76f6448fc..aeed368810 100644 --- a/src/chocolatey.resources/helpers/chocolateyProfile.psm1 +++ b/src/chocolatey.resources/helpers/chocolateyProfile.psm1 @@ -20,10 +20,223 @@ if (Get-Module chocolateyProfile) { $thisDirectory = (Split-Path -Parent $MyInvocation.MyCommand.Definition) +Import-Module "$thisDirectory\Chocolatey.PowerShell.dll" -Cmdlet "Get-EnvironmentVariable", "Get-EnvironmentVariableNames", "Update-SessionEnvironment" + . $thisDirectory\functions\Write-FunctionCallLogMessage.ps1 -. $thisDirectory\functions\Get-EnvironmentVariable.ps1 -. $thisDirectory\functions\Get-EnvironmentVariableNames.ps1 -. $thisDirectory\functions\Update-SessionEnvironment.ps1 . $thisDirectory\ChocolateyTabExpansion.ps1 -Export-ModuleMember -Alias refreshenv -Function 'Update-SessionEnvironment', 'TabExpansion' +Set-Alias refreshenv Update-SessionEnvironment + +Export-ModuleMember -Alias refreshenv -Cmdlet 'Update-SessionEnvironment' -Function 'TabExpansion' + +# SIG # Begin signature block +# MIInKwYJKoZIhvcNAQcCoIInHDCCJxgCAQExDzANBglghkgBZQMEAgEFADB5Bgor +# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCC7eXGNrikxA4wn +# J9PdpPo/8IvwVFuZPVPleXxyzmxMLaCCIK4wggWNMIIEdaADAgECAhAOmxiO+dAt +# 5+/bUOIIQBhaMA0GCSqGSIb3DQEBDAUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK +# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV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21Dtkgk02BsVHlSCjOyLtbIEPT8ZaX0SNz37EOblUCTl8n6gwj +# eAFcZDp6Rtm+L/SBCq4BQOg4SCiTUB4FmspN1S0qHRM98lHKf7gTnwPTN5E7zRDQ +# 3z84RVmqdK0IqrwVtZx64CJeXBTnoi44Dw4AaS01OCaRuobW/FDaJXFRaqgjttVi +# 6I+DmF8sul931i8ySTS1alI/RezVkBnWaFqTVYeh8YOUDmxEqcq6XVVqF+cP8Ulh +# 0X9hgPFwJ/8pMILt+gwTiRiGBE3hv+IsipRmgz22LjbtcmYKbMjN5zp2tJTTJ1bM +# 5RFZlg4CRC4keFVa/R4uWsx7KDcS1twsZWAm/OyU4i+3DH28XpfV3iMOy/okXWHg +# hMGUbwdXr4bk5+KbuVMgfFw4WEh6NN8jtJyLHCzoFA0Tc/p3cnwKn9IFxnvLQlS9 +# ez3648Bp+LCEWNneZ8j9F6nowqBr9woGww86XEQuHOgc3GGJfqiRLZ7V+NG2X6OT +# yUyo1Zdb3++Bd2QOi2AnU4V0O+zIoDzcU6b7Qi569P2tVE0l62vqfp4lmp9wdJcd +# hwxODFnTQjo3751hZVmjAioeud86X6019CBFjk9o59tcB2oDDjhBqxiAr18CEp0= +# SIG # End signature block diff --git a/src/chocolatey.resources/helpers/chocolateyScriptRunner.ps1 b/src/chocolatey.resources/helpers/chocolateyScriptRunner.ps1 index acf12ec874..c3f6230e79 100644 --- a/src/chocolatey.resources/helpers/chocolateyScriptRunner.ps1 +++ b/src/chocolatey.resources/helpers/chocolateyScriptRunner.ps1 @@ -96,3 +96,215 @@ if ($postRunHookScripts) { Write-Debug '----------------------------------------------------------------------' Exit $exitCode + +# SIG # Begin signature block +# MIInKwYJKoZIhvcNAQcCoIInHDCCJxgCAQExDzANBglghkgBZQMEAgEFADB5Bgor +# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAw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+# MQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMjQwNTE2MTYxOTEzWjAvBgkq +# hkiG9w0BCQQxIgQgQAKzrUwnfIRZmtQuvSL8uukhHvsx/zEwYMo87/thJhowDQYJ +# KoZIhvcNAQEBBQAEggIAZECDidRXCXDsbmdNiMx4ic9VNaYZdvQ+lQ9TUjxinCP3 +# meskP0r9lnB0KHDmPWu4lIRVquW9o/k7zDjZHTokPRB1Hx1uYNzcxYMPuRp7X1wH +# gccOPV7ACummXsLuVAsHoZmw65TJuAp/ey315tcHe59kDDff71+VT7wmykh60DMv +# cvTc8DY0HYRAk+dW6pQbeic4DWXw628wedZh+gBgTZ2Mkzcqc4jipJRsYDQKolyH +# aNrXh0EpgiwqUTzZ2mg+18X/8BAoZLTudLBguIjw0rLE/PEwRV9ZzOqRgc5cuyit +# 8ngKLmkqPlrb9+KfwQIb50O7CnB56AD5LLvgKNOSkxgTq8v6fzRXeDzCtegev19r +# My+/NJcv6bUIHolB0ujZDFPQshyfZi+tWpNsVUSnuBnLNwMBoEhukMeF1HUx6aC8 +# TlE7IZ4BrMiVPa+RFE7dVLEN2TpQGHcP90kx4l3wrVUqBq0wcFt8UD+Ha2ZQzf7G +# 5Yal+ODNUhFP+TsyvHAKzAdrRqjKJKlsOGNgu5buYAy8mZFlgyGrKUMVYSDSq3TH +# MnOZg8PXZk2dkYkxu8pALFLGHiLY4iRiJQzxQgtOg0IHL7QKYmPmmHhcTWQZLASq +# H62ZI2lmPZQTs15iZocvRmcETkR4ClNcxUk8lwKGKgpnQes8gatD5+jsa+XOFw0= +# SIG # End signature block diff --git a/src/chocolatey.resources/helpers/functions/Format-FileSize.ps1 b/src/chocolatey.resources/helpers/functions/Format-FileSize.ps1 index a6a92abb2a..085aeaeabd 100644 --- a/src/chocolatey.resources/helpers/functions/Format-FileSize.ps1 +++ b/src/chocolatey.resources/helpers/functions/Format-FileSize.ps1 @@ -60,3 +60,215 @@ Get-WebFile return [string]::Format("{0:0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QQGEwJVUzEXMBUGA1UEChMORGlnaUNlcnQsIEluYy4xOzA5BgNVBAMTMkRp +# Z2lDZXJ0IFRydXN0ZWQgRzQgUlNBNDA5NiBTSEEyNTYgVGltZVN0YW1waW5nIENB +# AhAFRK/zlJ0IOaa/2z9f5WEWMA0GCWCGSAFlAwQCAQUAoGkwGAYJKoZIhvcNAQkD +# MQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMjQwNTE2MTYxOTE1WjAvBgkq +# hkiG9w0BCQQxIgQgmxZpctCrRzJqyKXolDzXu6HgTMgdRvRya6NJEf+kRjQwDQYJ +# KoZIhvcNAQEBBQAEggIAOdm9TAlNvHN4JeF0LVknQxd06Is8Sbimp8yUo3RLqZcr +# mIKpu/ohAOHSmOda3ng/HlzB6lZ57OSUDc1blZWKVjSZIT4RYAMAyp8svUAyez31 +# VYdW1Zo3WWnx20iNxOakkqUI43wCVBhDAtTaBYVi8j73Hc1ANNvJKR2eddWl7eI1 +# IUmtrVs6cCOvGKgDxRk+IxoSWSD3rHcyEKoZ9J7imO86ScnmBySErMwO2T1DZ89I +# NIgtWrQnxI5wPPk/MI3mENz3WrJp4WNlIl5bO4/YTc6rxfG+2RMnfy39OobtjDmM +# VCqdi9+KStae0dGthXq4N1vliHbV9H9GopJ2UtbzTCiVDsbDIDfTdWGrqAlQwRjt +# VvjumluPI1bXuxg0PSpvgyxIHfIbWXxAhwgGwvoBEXsYwQnhbF1BviX9PyRbH38Q +# LlLkKd3J9kFKRspENjZifidSp7SsgW9I0FP5/mFAeRMJCBypAQiof7Bw8atVJndu +# iRhDvwvG8/vfCufI/F5r6xuNyI0VEV37PmwxExp1RG7MT14V5S7CcZY1l0NkK9Hu +# 8bmQVgxi8hSKdK3o3le3QUyvHojdQV5mmT6WY5aCytwHO35iZvm7bZovks1Vka29 +# jP2fnCC+satvTspmMAnle9CgNORmbjFFWM2cw1B3rNNW7R2Z2dUsJuSOABCZia0= +# SIG # End signature block diff --git a/src/chocolatey.resources/helpers/functions/Get-CheckSumValid.ps1 b/src/chocolatey.resources/helpers/functions/Get-CheckSumValid.ps1 index 0c94845661..5206586726 100644 --- a/src/chocolatey.resources/helpers/functions/Get-CheckSumValid.ps1 +++ b/src/chocolatey.resources/helpers/functions/Get-CheckSumValid.ps1 @@ -220,3 +220,215 @@ Install-ChocolateyPackage # throw "CheckSum for `'$file'` did not meet `'$checkSum`'." # } } + +# SIG # Begin signature block +# MIInKwYJKoZIhvcNAQcCoIInHDCCJxgCAQExDzANBglghkgBZQMEAgEFADB5Bgor +# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCB2C8DV+23E5keM +# 058E9c67jcShgUMIAFLVjBdLSTJE5aCCIK4wggWNMIIEdaADAgECAhAOmxiO+dAt +# 5+/bUOIIQBhaMA0GCSqGSIb3DQEBDAUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK +# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV +# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0yMjA4MDEwMDAwMDBa +# Fw0zMTExMDkyMzU5NTlaMGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy +# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNVBAMTGERpZ2lD +# ZXJ0IFRydXN0ZWQgUm9vdCBHNDCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC +# ggIBAL/mkHNo3rvkXUo8MCIwaTPswqclLskhPfKK2FnC4SmnPVirdprNrnsbhA3E +# MB/zG6Q4FutWxpdtHauyefLKEdLkX9YFPFIPUh/GnhWlfr6fqVcWWVVyr2iTcMKy +# unWZanMylNEQRBAu34LzB4TmdDttceItDBvuINXJI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 +# 3y97kPIk3mOZzwf3V/gPJ0JOkTtq+upuEuDEOaoO+mzf8yrXPWFSNzRbSngUFx9l +# LohCtxr5IP85tpR1weQYzFaSoujocWdxGgWlmZfO9AMPiRfOkpYd/HVwuA0HEg+h +# MuOZlRSByKZGpyvKYvkirFtixC3MXEdO+tLX2QybBV0cAtFMDg9zfZsOVwtgqgY= +# SIG # End signature block diff --git a/src/chocolatey.resources/helpers/functions/Get-ChocolateyConfigValue.ps1 b/src/chocolatey.resources/helpers/functions/Get-ChocolateyConfigValue.ps1 index fc2936b224..564a794461 100644 --- a/src/chocolatey.resources/helpers/functions/Get-ChocolateyConfigValue.ps1 +++ b/src/chocolatey.resources/helpers/functions/Get-ChocolateyConfigValue.ps1 @@ -61,3 +61,215 @@ $value = Get-ChocolateyConfigValue -configKey 'cacheLocation' Write-Error "Unable to read config value '$configKey' with error" -Exception $_ } } + +# SIG # Begin signature block +# MIInKwYJKoZIhvcNAQcCoIInHDCCJxgCAQExDzANBglghkgBZQMEAgEFADB5Bgor +# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAMDWjN41Z5K4a6 +# gDUOWVq2Ld90gTRCfeauAwu9YMKzSaCCIK4wggWNMIIEdaADAgECAhAOmxiO+dAt +# 5+/bUOIIQBhaMA0GCSqGSIb3DQEBDAUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK +# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV +# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0yMjA4MDEwMDAwMDBa +# Fw0zMTExMDkyMzU5NTlaMGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy +# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2Vyd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I3FJxBPrynSiw8hUxx9Q2rzdoLF35xGtQK5EiJHKrbM85zr +# J/+ligqwS1FqQy88X8lMmAL+4BRrxCWR8swFyx2zo9n2epbyjiz1ybwQQ29BBUN3 +# N9H7A1rcf+KLrQJIi2eMwNmkPgUfC0gecZOmjX5dHXWpXoFvY5fLpabPLLlWfX42 +# uiUqRxVt6AHZgih7l8hfIG4uTIYt9PZy8u35WDuefBkFntTi8LVC6HdVRNJCzdG+ +# YfR6K3mek2UCYti2qXiUMVZiGPEdxoaRQXjQWltFeVvj+y406H3I7zalvpEZvVPA +# S5Ix5fzxqWGnyYI+rB+3doc6QPMAaRQdRpBzqn8BSa0PF5zlAfdqqpgSpOK314rI +# 4VlgE6tRRsyagCpwPaXEMzuCmKtL+x7Rki/zUQL0KMw3eOh8jZYYe5bBOYe1Hz4= +# SIG # End signature block diff --git a/src/chocolatey.resources/helpers/functions/Get-ChocolateyPath.ps1 b/src/chocolatey.resources/helpers/functions/Get-ChocolateyPath.ps1 index 6a6ba5b9c2..c22ea789b1 100644 --- a/src/chocolatey.resources/helpers/functions/Get-ChocolateyPath.ps1 +++ b/src/chocolatey.resources/helpers/functions/Get-ChocolateyPath.ps1 @@ -84,4 +84,215 @@ $path = Get-ChocolateyPath -PathType 'PackagePath' if ((Test-Path $result)) { $result } -} \ No newline at end of file +} +# SIG # Begin signature block +# MIInKwYJKoZIhvcNAQcCoIInHDCCJxgCAQExDzANBglghkgBZQMEAgEFADB5Bgor +# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDYvxRtvsa3Gl7F +# 8VMi+o2S/Zsn9Sd+kCoXj9+uTrO9oKCCIK4wggWNMIIEdaADAgECAhAOmxiO+dAt +# 5+/bUOIIQBhaMA0GCSqGSIb3DQEBDAUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK +# EwxEaW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iaH9+0rB3dSYyE0pwH2ig0dFAj0Buunav5j8s3st +# 6euD3suqzMNPR0OnJyASIH+Ouu+ymLu9Ms6dwyx413JFGg+rBKNO3y75tmk0sXus +# UcYFpUa7y4+TCTNjv+tAZTFzih+rzJLuPDR/x7Ko3fhXMfplkqus17oE163Jij+I +# dnswdVVK640Se0HlLRH/SGu83uU7ulC9tOPe36Gc8hndzMfsOZ6npz85p/6xPIKa +# oFoiFsaGnFrhPQwVk2xo+RXfyidlyXrcqdGBq18v1CL0glSIk7ma+DbEQ1nRWaAD +# yGIUgojJO8GDbVCk+I/8lU3/MGQ08yWlsZZf09TTZrjTO72ZvVQutnaNcvGvTEXA +# MmLLz3mDY5oWYQpLgJqQSqZuMl3uS+5pfbizDwpIGv5tlRcRnKCwuMesy+HlWCu7 +# /52jKmDgEk5faNDpP3NjZ625xnXO2vycv0t3KmiydU+JDXNoF6QsGgpkTYrIsXHN +# /37sZHW1n+cl7TgeMuwTs7H+Bar7Eaj8EERF7FM9UJQqNSfd4D7mr9Br6i+SOLba +# +bhbubY/eumQLVLhG3hyKXnx8e1d/71T5sptVGjTycn1fJVqVx5r99qdRJKxkg/Z +# l/P6lCMr/arb6+F03KHisZM1XF7HJGGEzF/1AX8pVgWYRz5JZH0yRnjvJwe+k4A= +# SIG # End signature block diff --git a/src/chocolatey.resources/helpers/functions/Get-ChocolateyUnzip.ps1 b/src/chocolatey.resources/helpers/functions/Get-ChocolateyUnzip.ps1 index c95f30e3d7..6e8cbe0d51 100644 --- a/src/chocolatey.resources/helpers/functions/Get-ChocolateyUnzip.ps1 +++ b/src/chocolatey.resources/helpers/functions/Get-ChocolateyUnzip.ps1 @@ -279,3 +279,215 @@ Install-ChocolateyZipPackage $env:ChocolateyPackageInstallLocation = $destination return $destination } + +# SIG # Begin signature block +# MIInKwYJKoZIhvcNAQcCoIInHDCCJxgCAQExDzANBglghkgBZQMEAgEFADB5Bgor +# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYC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W1waW5nIENB +# AhAFRK/zlJ0IOaa/2z9f5WEWMA0GCWCGSAFlAwQCAQUAoGkwGAYJKoZIhvcNAQkD +# MQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMjQwNTE2MTYxOTE4WjAvBgkq +# hkiG9w0BCQQxIgQgtXwq7AvU2w+m0jFjwbJaBvPc1CquT/Iz0lq3VSa5jUIwDQYJ +# KoZIhvcNAQEBBQAEggIAcCk8aALxXctZJK/tHScKU6Hd6H2MwO81yFngahluC0cQ +# GTADdCsdLpJWWsP6W4+r1YxdcqK8PK1CwimCTsAFb2doDN88tQ/3EzK7e1KQ57VI +# vmbWcaqYxZUOO5B6V0IwRNV23Q+gnX0ThZAIVLzzyy+UcOpZslb5XKIpz9Hkbrh4 +# knRRBRoUTyxTWH3kAO2D5DWPo8gYILZw+FSOSh6vuEPKBg0DlR5DtPidFAK9142k +# BhnjIjEBqTcFk52GQTunM3OUqDm7WYzpOKGpKNTOK8HHahbB8Run+PV/jrU2mB18 +# 6IkW7qiXb59F6VKiwVjyR+Mxikuwu99FYxCkxi+mZEHJDrIMvnoIXeWhhf8bnJiy +# aiyCoI/nOx5uBeqN+yHol7+Muwj++r8XtHZRaXk7iTAMB35idK1DZ2KgmE+/SmAf +# Nj0dA+Z5rT0FFoE1Usb16xthtgjSL4IFAu6XA0XuIXvr9tpaAohXexSr3UuwINpH +# rpIv523mR8wCoocoj14b8MUMWcqkCBtBntYuRlCsymN1QuMA4bF8FbtGv5odMBFx +# TD85aHEMpcKfvfTPUZh1V5qNAh2ShbLc/RmAwyD5pRPjtpB6DQQRFBWBaYeOy3L1 +# 9wvG+wU4CyJxsbF5W8BcqkIodHz3nPOzl1CFN6mcjT+b807xou91ze1Mg6TIwnM= +# SIG # End signature block diff --git a/src/chocolatey.resources/helpers/functions/Get-ChocolateyWebFile.ps1 b/src/chocolatey.resources/helpers/functions/Get-ChocolateyWebFile.ps1 index 772761eae9..0b3fb35575 100644 --- a/src/chocolatey.resources/helpers/functions/Get-ChocolateyWebFile.ps1 +++ b/src/chocolatey.resources/helpers/functions/Get-ChocolateyWebFile.ps1 @@ -423,3 +423,215 @@ Get-FtpFile return $fileFullPath } + +# SIG # Begin signature block +# MIInKwYJKoZIhvcNAQcCoIInHDCCJxgCAQExDzANBglghkgBZQMEAgEFADB5Bgor +# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAhzUcxvXikvKn9 +# 5n0YtdLoV+7kdoMqsZbXJjND9uqSDaCCIK4wggWNMIIEdaADAgECAhAOmxiO+dAt +# 5+/bUOIIQBhaMA0GCSqGSIb3DQEBDAUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK +# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV +# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0yMjA4MDEwMDAwMDBa +# Fw0zMTExMDkyMzU5NTlaMGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy +# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNVBAMTGERpZ2lD +# ZXJ0IFRydXN0ZWQgUm9vdCBHNDCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC +# ggIBAL/mkHNo3rvkXUo8MCIwaTPswqclLskhPfKK2FnC4SmnPVirdprNrnsbhA3E +# MB/zG6Q4FutWxpdtHauyefLKEdLkX9YFPFIPUh/GnhWlfr6fqVcWWVVyr2iTcMKy +# unWZanMylNEQRBAu34LzB4TmdDttceItDBvuINXJIB1jKS3O7F5OyJP4IWGbNOsF +# xl7sWxq868nPzaw0QF+xembud8hIqGZXV59UWI4MK7dPpzDZVu7Ke13jrclPXuU1 +# 5zHL2pNe3I6PgNq2kZhAkH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MIpKeVio+Rq0fxUrm0wmiT0JsPy9u+tsR4+hqChzhsmwVNHTj72+ojmM= +# SIG # End signature block diff --git a/src/chocolatey.resources/helpers/functions/Get-EnvironmentVariable.ps1 b/src/chocolatey.resources/helpers/functions/Get-EnvironmentVariable.ps1 deleted file mode 100644 index d5c49324c0..0000000000 --- a/src/chocolatey.resources/helpers/functions/Get-EnvironmentVariable.ps1 +++ /dev/null @@ -1,110 +0,0 @@ -# Copyright © 2017 - 2021 Chocolatey Software, Inc. -# Copyright © 2015 - 2017 RealDimensions Software, LLC -# Copyright © 2011 - 2015 RealDimensions Software, LLC & original authors/contributors from https://github.com/chocolatey/chocolatey -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -function Get-EnvironmentVariable { - <# -.SYNOPSIS -Gets an Environment Variable. - -.DESCRIPTION -This will will get an environment variable based on the variable name -and scope while accounting whether to expand the variable or not -(e.g.: `%TEMP%`-> `C:\User\Username\AppData\Local\Temp`). - -.NOTES -This helper reduces the number of lines one would have to write to get -environment variables, mainly when not expanding the variables is a -must. - -.PARAMETER Name -The environment variable you want to get the value from. - -.PARAMETER Scope -The environment variable target scope. This is `Process`, `User`, or -`Machine`. - -.PARAMETER PreserveVariables -A switch parameter stating whether you want to expand the variables or -not. Defaults to false. - -.PARAMETER IgnoredArguments -Allows splatting with arguments that do not apply. Do not use directly. - -.EXAMPLE -Get-EnvironmentVariable -Name 'TEMP' -Scope User -PreserveVariables - -.EXAMPLE -Get-EnvironmentVariable -Name 'PATH' -Scope Machine - -.LINK -Get-EnvironmentVariableNames - -.LINK -Set-EnvironmentVariable -#> - [CmdletBinding()] - [OutputType([string])] - param( - [Parameter(Mandatory = $true)][string] $Name, - [Parameter(Mandatory = $true)][System.EnvironmentVariableTarget] $Scope, - [Parameter(Mandatory = $false)][switch] $PreserveVariables = $false, - [parameter(ValueFromRemainingArguments = $true)][Object[]] $ignoredArguments - ) - - # Do not log function call, it may expose variable names - ## Called from chocolateysetup.psm1 - wrap any Write-Host in try/catch - - [string] $MACHINE_ENVIRONMENT_REGISTRY_KEY_NAME = "SYSTEM\CurrentControlSet\Control\Session Manager\Environment\"; - [Microsoft.Win32.RegistryKey] $win32RegistryKey = [Microsoft.Win32.Registry]::LocalMachine.OpenSubKey($MACHINE_ENVIRONMENT_REGISTRY_KEY_NAME) - if ($Scope -eq [System.EnvironmentVariableTarget]::User) { - [string] $USER_ENVIRONMENT_REGISTRY_KEY_NAME = "Environment"; - [Microsoft.Win32.RegistryKey] $win32RegistryKey = [Microsoft.Win32.Registry]::CurrentUser.OpenSubKey($USER_ENVIRONMENT_REGISTRY_KEY_NAME) - } - elseif ($Scope -eq [System.EnvironmentVariableTarget]::Process) { - return [Environment]::GetEnvironmentVariable($Name, $Scope) - } - - [Microsoft.Win32.RegistryValueOptions] $registryValueOptions = [Microsoft.Win32.RegistryValueOptions]::None - - if ($PreserveVariables) { - Write-Verbose "Choosing not to expand environment names" - $registryValueOptions = [Microsoft.Win32.RegistryValueOptions]::DoNotExpandEnvironmentNames - } - - [string] $environmentVariableValue = [string]::Empty - - try { - #Write-Verbose "Getting environment variable $Name" - if ($win32RegistryKey -ne $null) { - # Some versions of Windows do not have HKCU:\Environment - $environmentVariableValue = $win32RegistryKey.GetValue($Name, [string]::Empty, $registryValueOptions) - } - } - catch { - Write-Debug "Unable to retrieve the $Name environment variable. Details: $_" - } - finally { - if ($win32RegistryKey -ne $null) { - $win32RegistryKey.Close() - } - } - - if ($environmentVariableValue -eq $null -or $environmentVariableValue -eq '') { - $environmentVariableValue = [Environment]::GetEnvironmentVariable($Name, $Scope) - } - - return $environmentVariableValue -} diff --git a/src/chocolatey.resources/helpers/functions/Get-EnvironmentVariableNames.ps1 b/src/chocolatey.resources/helpers/functions/Get-EnvironmentVariableNames.ps1 deleted file mode 100644 index 229c99ec61..0000000000 --- a/src/chocolatey.resources/helpers/functions/Get-EnvironmentVariableNames.ps1 +++ /dev/null @@ -1,67 +0,0 @@ -# Copyright © 2017 - 2021 Chocolatey Software, Inc. -# Copyright © 2015 - 2017 RealDimensions Software, LLC -# Copyright © 2011 - 2015 RealDimensions Software, LLC & original authors/contributors from https://github.com/chocolatey/chocolatey -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -function Get-EnvironmentVariableNames([System.EnvironmentVariableTarget] $Scope) { - <# -.SYNOPSIS -Gets all environment variable names. - -.DESCRIPTION -Provides a list of environment variable names based on the scope. This -can be used to loop through the list and generate names. - -.NOTES -Process dumps the current environment variable names in memory / -session. The other scopes refer to the registry values. - -.INPUTS -None - -.OUTPUTS -A list of environment variables names. - -.PARAMETER Scope -The environment variable target scope. This is `Process`, `User`, or -`Machine`. - -.EXAMPLE -Get-EnvironmentVariableNames -Scope Machine - -.LINK -Get-EnvironmentVariable - -.LINK -Set-EnvironmentVariable -#> - - # Do not log function call - - # HKCU:\Environment may not exist in all Windows OSes (such as Server Core). - switch ($Scope) { - 'User' { - Get-Item 'HKCU:\Environment' -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Property - } - 'Machine' { - Get-Item 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment' | Select-Object -ExpandProperty Property - } - 'Process' { - Get-ChildItem Env:\ | Select-Object -ExpandProperty Key - } - default { - throw "Unsupported environment scope: $Scope" - } - } -} diff --git a/src/chocolatey.resources/helpers/functions/Get-FtpFile.ps1 b/src/chocolatey.resources/helpers/functions/Get-FtpFile.ps1 index 3d2e38a727..1136966f40 100644 --- a/src/chocolatey.resources/helpers/functions/Get-FtpFile.ps1 +++ b/src/chocolatey.resources/helpers/functions/Get-FtpFile.ps1 @@ -232,3 +232,215 @@ Get-WebFile Start-Sleep 1 } } + +# SIG # Begin signature block +# MIInKwYJKoZIhvcNAQcCoIInHDCCJxgCAQExDzANBglghkgBZQMEAgEFADB5Bgor +# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBslYH+Nw8c8SKa +# HFPtEtR93jc2V00j6iGK6N7Y0qYYXaCCIK4wggWNMIIEdaADAgECAhAOmxiO+dAt +# 5+/bUOIIQBhaMA0GCSqGSIb3DQEBDAUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK +# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV +# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0yMjA4MDEwMDAwMDBa +# Fw0zMTExMDkyMzU5NTlaMGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy +# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNVBAMTGERpZ2lD +# ZXJ0IFRydXN0ZWQgUm9vdCBHNDCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC +# ggIBAL/mkHNo3rvkXUo8MCIwaTPswqclLskhPfKK2FnC4SmnPVirdprNrnsbhA3E +# MB/zG6Q4FutWxpdtHauyefLKEdLkX9YFPFIPUh/GnhWlfr6fqVcWWVVyr2iTcMKy +# unWZanMylNEQRBAu34LzB4TmdDttceItDBvuINXJIB1jKS3O7F5OyJP4IWGbNOsF +# xl7sWxq868nPzaw0QF+xembud8h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4/yBVvjpNByVz2J2/l4dEsZlWh +# Lp2x4rGrgrpSfhn/HSRZPBCBI4qeSWEV0L6BKxbxdbMtGx4BueCVPrrCo6098fUr +# VSQGAWezz4pLlOXOfUk36ylC3iunbXVGrTTdW4wiLw+zOwuguHuTRF0rzmPR7Ro= +# SIG # End signature block diff --git a/src/chocolatey.resources/helpers/functions/Get-OSArchitectureWidth.ps1 b/src/chocolatey.resources/helpers/functions/Get-OSArchitectureWidth.ps1 index 37d41b83c9..f6464336a3 100644 --- a/src/chocolatey.resources/helpers/functions/Get-OSArchitectureWidth.ps1 +++ b/src/chocolatey.resources/helpers/functions/Get-OSArchitectureWidth.ps1 @@ -84,3 +84,215 @@ depending on whether or not the bit width matches. Set-Alias Get-ProcessorBits Get-OSArchitectureWidth Set-Alias Get-OSBitness Get-OSArchitectureWidth + +# SIG # Begin signature block +# MIInKwYJKoZIhvcNAQcCoIInHDCCJxgCAQExDzANBglghkgBZQMEAgEFADB5Bgor +# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCB+L1AGG7qroX0+ +# A1B0yS7LttNN6HXUXRua0CLG4jPKdqCCIK4wggWNMIIEdaADAgECAhAOmxiO+dAt +# 5+/bUOIIQBhaMA0GCSqGSIb3DQEBDAUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK +# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV +# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0yMjA4MDEwMDAwMDBa +# Fw0zMTExMDkyMzU5NTlaMGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy +# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNVBAMTGERpZ2lD +# ZX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x3t/07hqxBfuWJOB6vM/NhPgFtAercQjnXCrnB +# VP7IA3BP6XWrOsjrO3DuPjG8oDSiShhcWeKYHFtNz1Zj1po8yCr4mH+JHCa7qxD+ +# 1C4uPM+1wqOkhad4W7vEm1ACqcpYhV1izUf5GSljAMNCPhqadMd/udtMKEtqMf4E +# 5OqRrpbaFbD63ji7j+zIKO5qbtnXG6WTqvzzR0mXFwiEoJs/aBoShXEWFWKkyJZn +# T9T4dVarUE505nRGK26rrwRsrkDWrnXZKmU8r4a2L8XAAizhGfMOvw2FA9RanfHX +# YIHAkfSMEhPXkqviRqS+RIPLys87YUXRXSiaLUI3i3sm6B0OtobDOG1gIQ506Nat +# J/UZHxSJ7IyU2b+VN6uHifoonUIBksAgjA+t1gKg9p/9B4MfxDEgjXEBqCrKjsg= +# SIG # End signature block diff --git a/src/chocolatey.resources/helpers/functions/Get-PackageParameters.ps1 b/src/chocolatey.resources/helpers/functions/Get-PackageParameters.ps1 index 2901a98ee9..08789907be 100644 --- a/src/chocolatey.resources/helpers/functions/Get-PackageParameters.ps1 +++ b/src/chocolatey.resources/helpers/functions/Get-PackageParameters.ps1 @@ -175,3 +175,215 @@ Install-ChocolateyZipPackage Copy-Item Function:Get-PackageParameters Function:Get-PackageParametersBuiltIn -Force #Rename-Item Function:Get-PackageParameters Get-PackageParametersBuiltIn Set-Alias -Name Get-PackageParameters -Value Get-PackageParametersBuiltIn -Scope Global + +# SIG # Begin signature block +# MIInKwYJKoZIhvcNAQcCoIInHDCCJxgCAQExDzANBglghkgBZQMEAgEFADB5Bgor +# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCJfmARIaUvswGV +# 6+CzIBt16rh6a5OszJiGhsZy1V8eaKCCIK4wggWNMIIEdaADAgECAhAOmxiO+dAt +# 5+/bUOIIQBhaMA0GCSqGSIb3DQEBDAU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tREAum1IZvIwDQYJ +# KoZIhvcNAQEBBQAEggIAHo55rDW1QyUER5tgqbMXRMYBhXJTG8HlARo1VKUBswdd +# XkGTkKJD+WYD0iOl0GuJIsMjeqBnTQecTcuY4uznEMSdJnKzenTnVM4duAp0UTpO +# J0hHGx5Q1a2vjiN8rsX3giXxdS1THkjIeR2byU5PYswN9wezGQnDXhB9Sf29jS2Z +# 4eB62BAxquyl2yJd+acDww/Tjd9Qt37VKYciYh/1yNUv5X7Yr2dFIAuknUSsCNQ2 +# Vi2FABPeYbJvFAycJAcD7UrVYx4mLmRqoyfZFeO+pgcdqOSJHND5e6VAmo9QCsNJ +# 27YKfkO2E2lSST6wcK8SD0nEeuMB9Rka8liP5P5sen6ULlKTl5gtqPunqZ7hbt7q +# MZA0wy2g04UsS/EZtShC8N6L8aG42tm2Wh53UfD1bo3NKMeLPTAaqSX6L/y4EV7h +# h95E1R0ofKRz9ptupO6eHOGdnX+js/h5A8Za7pqjhnZa95Cl3wt5qTC7sAVetUWI +# aezn7rG2DY1Skn2ZJXEjCgoA1DhxTaxL3p3aOOuHYsIdO+UtJdU0yKnMMSOqEjpj +# ql/ORCmNpxiiZ/QWG+EbDfYrJiENf+wP3Gs8i/dC2RR4CU2L4v2A8G+gr8PXyybU +# SbGdm00AZPYjcxhzjz5K0mYFewPEN7W2Cb01BVuSl3hC0W3O1pW93IiUJuqrseA= +# SIG # End signature block diff --git a/src/chocolatey.resources/helpers/functions/Get-ToolsLocation.ps1 b/src/chocolatey.resources/helpers/functions/Get-ToolsLocation.ps1 index 4b523aa8de..914b5f586e 100644 --- a/src/chocolatey.resources/helpers/functions/Get-ToolsLocation.ps1 +++ b/src/chocolatey.resources/helpers/functions/Get-ToolsLocation.ps1 @@ -88,3 +88,215 @@ None return $toolsLocation } + +# SIG # Begin signature block +# MIInKwYJKoZIhvcNAQcCoIInHDCCJxgCAQExDzANBglghkgBZQMEAgEFADB5Bgor +# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3Ag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YW1waW5nIENB +# AhAFRK/zlJ0IOaa/2z9f5WEWMA0GCWCGSAFlAwQCAQUAoGkwGAYJKoZIhvcNAQkD +# MQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMjQwNTE2MTYxOTIzWjAvBgkq +# hkiG9w0BCQQxIgQgZtKIIv+QkbNgM0yjXmk0ETOomSHIERmtQV+dJpVsVnMwDQYJ +# KoZIhvcNAQEBBQAEggIAm5JeIVm2WLcmFnU6aitap7UF416gvLdWbbeHjR1iHq/V +# FucMYVBz68Ts3vC1ZLZX9zTOMzub7G138BrsK+0GCNYpP5QKxXIK3KE+HvU2gL+8 +# 2iBF7jR5DjHo+zJndnrI3DxyYpa1VcInUavXEpkHgZBRdWULP3FbIXZmZ7K2p/6z +# l4E7koEEJU19D6V7k6Rmf4THbop/OCdjK2MOfHYeiHq3AM8ke28nQEO/x1fJanzN +# u83MdptD5Hdy+IkqJsnDdnEbK5G7ibFcBhhvjGxBS2qCySkA3ZmqdNKGdJ/ZiqOd +# pvlM8fY+JF5RWvMsm2GtcBBTlQ6TnYe9ispFxmfE1crcT1qdo9KtIWQFZjYM81Pw +# hLf29raZTUuhw9Xm/N3oJDKgued01rhocK7vLiD2MnrPjRy7SijzDDKp5rAnNCDu +# QTvXkIEbn6ozWgCxZJ3dty605adEmYe8mOJr7wNUVyO5brYy69AyLojmfZtfXP0a +# HoxA5alKHe2w5EpDfeKQ9V6WDiEAZRhKhZlqhWOC5he8VZZ0HncC/y5vCmLYJJII +# WMWR0e4VJ1UF8ZE6TeZmeCHAyz2Mfu97sgXP9lFR4I9CgUTkiJd4cJkfluAjT3j0 +# ei4OuWFgRwKYLM744/68UaorKkoeDeUHKPmOVhPV7b752QDZf88tn2l6SdcU9Es= +# SIG # End signature block diff --git a/src/chocolatey.resources/helpers/functions/Get-UACEnabled.ps1 b/src/chocolatey.resources/helpers/functions/Get-UACEnabled.ps1 index c6ee50bcaf..e18d9c96e2 100644 --- a/src/chocolatey.resources/helpers/functions/Get-UACEnabled.ps1 +++ b/src/chocolatey.resources/helpers/functions/Get-UACEnabled.ps1 @@ -57,3 +57,215 @@ System.Boolean return $uacEnabled } + +# SIG # Begin signature block +# MIInKwYJKoZIhvcNAQcCoIInHDCCJxgCAQExDzANBglghkgBZQMEAgEFADB5Bgor +# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBfnkAX1xa4ujrT +# pCSNxfBGNOCUu+JxbrgALkAS4BAJOqCCIK4wggWNMIIEdaADAgECAhAOmxiO+dAt +# 5+/bUOIIQBhaMA0GCSqGSIb3DQEBDAUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK +# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV +# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0yMjA4MDEwMDAwMDBa +# Fw0zMTExMDkyMzU5NTlaMGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy +# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNVBAMTGERpZ2lD +# ZXJ0IFRydXN0ZWQgUm9vdCBHNDCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC +# ggIBAL/mkHNo3rvkXUo8MCIwaTPswqclLskhPfKK2FnC4SmnPVirdprNrnsbhA3E +# MB/zG6Q4FutWxpdtHauyefLKEdLkX9YFPFIPUh/GnhWlfr6fqVcWWVVyr2iTcMKy +# unWZanMylNEQRBAu34LzB4TmdDttceItDBvuINXJIB1jKS3O7F5OyJP4IWGbNOsF +# xl7sWxq868nPzaw0QF+xembud8hIqGZXV59UWI4MK7dPpzDZVu7Ke13jrclPXuU1 +# 5zHL2pNe3I6PgNq2kZhAkHnDeMe2scS1ahg4Ax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P8McXnJVwhpPC5nx +# 4O+wz7f5q3j+nE6GhCjafjugsVzAFm69xlDCUKpQZeccl4EuHMaKU8Bupl/egHU= +# SIG # End signature block diff --git a/src/chocolatey.resources/helpers/functions/Get-UninstallRegistryKey.ps1 b/src/chocolatey.resources/helpers/functions/Get-UninstallRegistryKey.ps1 index 2b78392d2e..c22b4f207d 100644 --- a/src/chocolatey.resources/helpers/functions/Get-UninstallRegistryKey.ps1 +++ b/src/chocolatey.resources/helpers/functions/Get-UninstallRegistryKey.ps1 @@ -160,3 +160,215 @@ Uninstall-ChocolateyPackage } Set-Alias Get-InstallRegistryKey Get-UninstallRegistryKey + +# SIG # Begin signature block +# MIInKwYJKoZIhvcNAQcCoIInHDCCJxgCAQExDzANBglghkgBZQMEAgEFADB5Bgor +# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAr7rSv15BEVAdd +# Hi9DFdA/R4f9zSgZHYO+xkt+mPq16qCCIK4wggWNMIIEdaADAgECAhAOmxiO+dAt +# 5+/bUOIIQBhaMA0GCSqGSIb3DQEBDAUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK +# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV +# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0yMjA4MDEwMDAwMDBa +# Fw0zMTExMDkyMzU5NTlaMGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy +# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNVBAMTGERpZ2lD +# ZXJ0IFRydXN0ZWQgUm9vdCBHNDCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC +# ggIBAL/mkHNo3rvkXUo8MCIwaTPswqclLskhP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6+oz +# ijl3PuYnwB0vXflJSjQeXOpkjXEKPKZAiESsaAZJwYsyZzlX2BjXMsIFmWzpLVwq +# ypv+wWxnySgaKwPIOZiFZT6RmVz0FkRhr2FB9ODrAadWgxF88qqB0HpVUQFNSs+z +# hN3QkfxieuDQ7AO4Huq2lQjDvDAlCKVHq/zHwxykfhKSA8CQpgij4e/P5p/rnUva +# nqVa0Q0QyOAeE+UrBxGs5Kw6LQkHgO0i37raMuTLVitvixlfTtZXB7GxB3slMdcF +# GGwe4OzDcR/mlzIS82XIiN8P1lzZGm7aOnUhNOj0zVA9gic27D4n68I3mETyosw= +# SIG # End signature block diff --git a/src/chocolatey.resources/helpers/functions/Get-VirusCheckValid.ps1 b/src/chocolatey.resources/helpers/functions/Get-VirusCheckValid.ps1 index f8291d6f0a..ac658eefa5 100644 --- a/src/chocolatey.resources/helpers/functions/Get-VirusCheckValid.ps1 +++ b/src/chocolatey.resources/helpers/functions/Get-VirusCheckValid.ps1 @@ -50,3 +50,215 @@ Allows splatting with arguments that do not apply. Do not use directly. ) Write-Debug "No runtime virus checking built into FOSS Chocolatey. Check out Pro/Business - https://chocolatey.org/compare" } + +# SIG # Begin signature block +# MIInKwYJKoZIhvcNAQcCoIInHDCCJxgCAQExDzANBglghkgBZQMEAgEFADB5Bgor +# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDG1/ZcTQ8Fw0wX +# xC0a6tre8EyI2lMxa3ectF95/hpiCKCCIK4wggWNMIIEdaADAgECAhAOmxiO+dAt +# 5+/bUOIIQBhaMA0GCSqGSIb3DQEBDAUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK +# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV +# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgU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ygw1C41jVK+Z04s76Z8 +# Lc5U+NKL6GVeyR/1tT6+Jtpeu0OVJ2GOKjU4sJiSkfFWHM5oPFFRjFtZfK8j5bPj +# IujXfbnNGZv42VagLURG2AcKTafpioE2nKNd2nX9cUygm+fedL52fqHmxoEOKYWz +# blBy2e1nTzUsW3yGZLQaCF2tK2zCx+AgGmX6NdYocbLWbc/xY4J90RcVyj3EMBB1 +# TFdbxJ7YSR+/rh6xvl1ufCIw6kYmPUyBUEtZXB/SrVcFnZCrRPBRrSS7dc4W2buG +# JU9RVsPM9L0RhVKx/rHtAnChLv78xq/W6zbDpkPSCRepGnQYKZ2r8v18/C3xIw22 +# pkb5xfQFSaoNYIVIrnzAmzfA8J2D0E8aCoMgWpF4rsYSGPXlrp7zuwHutuKx2w67 +# 2+FYvSaY82gwV87BHXlUUDGYu0IdIUz42NVeJjk3FTANp4FWqQoMLkpZoYzQ080n +# dgfeecLRKcpv6YRa8+OySiaNTFMhGyTHVeum5XGA94jsAmW53k77WuPb3ph1aqfj +# 4ko77i6PR2ycjuhgfetgKZucBQG2oADpOq4VZXzl8HcS3sBDe6eYAatmeOS7HnI= +# SIG # End signature block diff --git a/src/chocolatey.resources/helpers/functions/Get-WebFile.ps1 b/src/chocolatey.resources/helpers/functions/Get-WebFile.ps1 index 774a2ede0f..3a3f84f8fc 100644 --- a/src/chocolatey.resources/helpers/functions/Get-WebFile.ps1 +++ b/src/chocolatey.resources/helpers/functions/Get-WebFile.ps1 @@ -361,3 +361,215 @@ Get-WebFileName } # this could be cleaned up with http://learn-powershell.net/2013/02/08/powershell-and-events-object-events/ + +# SIG # Begin signature block +# MIInKwYJKoZIhvcNAQcCoIInHDCCJxgCAQExDzANBglghkgBZQMEAgEFADB5Bgor +# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCD9kFJKsngp7JEq +# Q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w0BCQUxDxcNMjQwNTE2MTYxOTI1WjAvBgkq +# hkiG9w0BCQQxIgQgp6r/Tkw37bSHWL1M0g2gwMS7LQjBCPoFv91H4Gci9bMwDQYJ +# KoZIhvcNAQEBBQAEggIATzM8XvgirO4QbUW2dok4Pn2hQf/qyN63pI+pQcCVvo3U +# Kh6a7RSdaO7PCo4CEzcnpmIIC2RH6lYV4erIbYu+Qx5NsED5sP/3WO1NnvhxtdqB +# Uu1Bl35wwRH4W/IS+zcQ6zIAnB1Yn9YDHjJCeU10EvYfRkY3mkAMmqR3S6xYSi1Y +# +ckXOlhO078sdWMNK/vlzr6T8eCej7FAcPaJPbwNOlKd2kxHWhFbSdxpN4lkBQ52 +# t4H5PzucC3tw5mvYoNG6fSl68M6gzrcBRoS9iIt5+SV75atditTODYXLbSMpvWY+ +# alVMu8wbWfR5cD0g56pxr5y1o5isbc0LALUxAkobxZVaL/OmOxbvcKZU8X9dFkZ5 +# fVvb3udCOw8rgujgYieDxmIAMAICBQHXV+3dI5cRRh3AmnNJheC9/gKfQ1XxAZO1 +# 3ibszfkW2ANygdmRd/CM8dOfPlA4s2SiZsAzIQTPJwCk/XRCLiLl+j7oKKFD2don +# o+/NOYFBpl7Hr7KmqC6nzGhcAFmDH52koMECPPTtJWV5vDIxlFXQXXbUmh0wNSfS +# gD/v/etEL2UoHDTG6DENaRu/yP7PNQAk/3DOjKTDHL3dpN05m1nFeDvjXiJT7ZX/ +# cNRvGlHH64DPMcOIKbCi2fGEu8/ufbvl25XKQfNlZXBuuRZqiV73+1fCwAbSIpY= +# SIG # End signature block diff --git a/src/chocolatey.resources/helpers/functions/Get-WebFileName.ps1 b/src/chocolatey.resources/helpers/functions/Get-WebFileName.ps1 index e186e401dc..36f5bdf903 100644 --- a/src/chocolatey.resources/helpers/functions/Get-WebFileName.ps1 +++ b/src/chocolatey.resources/helpers/functions/Get-WebFileName.ps1 @@ -262,3 +262,215 @@ Get-ChocolateyWebFile } } } + +# SIG # Begin signature block +# MIInK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a/src/chocolatey.resources/helpers/functions/Get-WebHeaders.ps1 b/src/chocolatey.resources/helpers/functions/Get-WebHeaders.ps1 index 02cb01d730..8fd96503bf 100644 --- a/src/chocolatey.resources/helpers/functions/Get-WebHeaders.ps1 +++ b/src/chocolatey.resources/helpers/functions/Get-WebHeaders.ps1 @@ -176,3 +176,215 @@ Get-WebFile $headers } + +# SIG # Begin signature block +# MIInKwYJKoZIhvcNAQcCoIInHDCCJxgCAQExDzANBglghkgBZQMEAgEFADB5Bgor +# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCA5cZuAxttY+XGb +# LEUw2Nj5ed/VeNgis9fwk5pQwKM1X6CCIK4wggWNMIIEdaADAgECAhAOmxiO+dAt +# 5+/bUOIIQBhaMA0GCSqGSIb3DQEBDAUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK +# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV +# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0yMjA4MDEwMDAwMDBa +# Fw0zMTExMDkyMzU5NTlaMGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy +# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNVBAMTGERpZ2lD +# ZXJ0IFRydXN0ZWQgUm9vdCBHNDCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC +# ggIBAL/mkHNo3rvkXUo8MCIwaTPswqclLskhPfKK2FnC4SmnPVirdprNrnsbhA3E +# MB/zG6Q4FutWxpdtHauyefLKEdLkX9YFPFIPUh/GnhWlfr6fqVcWWVVyr2iTcMKy +# unWZanMylNEQRBAu34LzB4TmdDttceItDBvuINXJIB1jKS3O7F5OyJP4IWGbN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oPyrbJo50y+Z6J3fyP+AvjNeRDha7ml3zGxaW4oYXBD9AQfc6u +# f1kQOp2LGBv2NuxjlsPQTqW7MZBjEH7qbtwPobZt3PnB1x7AcSwwwGhn6VI+lUng +# W9eLhv7s1St7W8n9izLaQrfHDhSYDXWNjEbsptJAtwjUrWbTQV586dJQziV5p64= +# SIG # End signature block diff --git a/src/chocolatey.resources/helpers/functions/Install-BinFile.ps1 b/src/chocolatey.resources/helpers/functions/Install-BinFile.ps1 index fbe90a4bd5..48f6403380 100644 --- a/src/chocolatey.resources/helpers/functions/Install-BinFile.ps1 +++ b/src/chocolatey.resources/helpers/functions/Install-BinFile.ps1 @@ -176,3 +176,215 @@ exit /b %ERRORLEVEL%" | Out-File $packageBatchFileName -Encoding ASCII Set-Alias Generate-BinFile Install-BinFile Set-Alias Add-BinFile Install-BinFile + +# SIG # Begin signature block +# MIInKwYJKoZIhvcNAQcCoIInHDCCJxgCAQExDzANBglghkgBZQMEAgEFADB5Bgor +# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDGT2WwFVwN4W09 +# /EM11/hMvWPr+Dj5ahXiacNu7k+zc6CCIK4wggWNMIIEdaADAgECAhAOmxiO+dAt +# 5+/bUOIIQBhaMA0GCSqGSIb3DQEBDAUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK +# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV +# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0yMjA4MDEwMDAwMDBa +# Fw0zMTExMDkyMzU5NTlaMGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy +# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNVBAMTGERpZ2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v6Qlk3UmdOw6wetAH0Iwzf/kWsWba3810VNUY+dDtYj +# HQH+jraiNc9Eiu7q+motGPLhNLIoLjsG+bWhvMOt3fvrAE/uE3hbKlnsx/4lwTlw +# DAs2CgrCTwxQmSZAQSz+Jvem8xbfMpto5rL+SwrrJ/fPAJa5xhLLmcIZixpWm0zV +# o/hVwKOCljbuExx3uOj24E1UYVauo35L/xTJE7bNfZMZHzzU+p3QBYorWQAaR6/Y +# btAp9BvvlPGGSv8srDT7YlhX6Ibkaji8o11cHtQGgArw7tPXlr2E3WLReHE6BKQY +# hCtbga6NHQ96t4lzs5GlS56/mAfbcTn4UWE0KuVMSHgVC4mtRDEcG4M4WfyGyUie +# 6qpvjqOO5jcSOl5gX3eJUxyhUH6jUA+NB4IXyZmV126ngfROkb+yIlNc4jhdDg4= +# SIG # End signature block diff --git a/src/chocolatey.resources/helpers/functions/Install-ChocolateyEnvironmentVariable.ps1 b/src/chocolatey.resources/helpers/functions/Install-ChocolateyEnvironmentVariable.ps1 index 5520143fac..c7c7f2bb45 100644 --- a/src/chocolatey.resources/helpers/functions/Install-ChocolateyEnvironmentVariable.ps1 +++ b/src/chocolatey.resources/helpers/functions/Install-ChocolateyEnvironmentVariable.ps1 @@ -124,3 +124,215 @@ Install-ChocolateyPath Set-Content env:\$variableName $variableValue } + +# SIG # Begin signature block +# MIInKwYJKoZIhvcNAQcCoIInHDCCJxgCAQExDzANBglghkgBZQMEAgEFADB5Bgor +# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDE5dMephuomiqs +# 6Yz9kjlPZLUUQa4+nMuQIhWkKS3PTqCCIK4wggWNMIIEdaADAgECAhAOmxiO+dAt +# 5+/bUOIIQBhaMA0GCSqGSIb3DQEBDAUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK +# EwxEaWdpQ2VydCBJbm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y2N2T6+24pxtLT9C5 +# SkgzL0z0Ny0DIlKXElSE+CfoS48d4QDHrCCF8q3yH1RB0c5oRT9bIsGroLaZ23dh +# km8Tq9Yfhh+Wl2j/3rJ7aJy8RnbQjPer8mL5QJvzRVefBq1wNC3KYCqYzhD8UGpl +# PZUWYL+5C3jqoOqGjXOwVMwhNH02HqJO4u+MW3iHzBjLTrYxkxp85jGyDRN0QDIt +# wW8pUz1y3sHUyJLgD4ULU3e4Q8cT44XnBUvxcamTpRsTXtOxghzxpXJJoR7aw+rP +# 0mKaqESrsE++nQYgjHYZOdsfV/41wxo+EWSbi5krRbtcVnLESM3nJdib/XDkoAtB +# vxWMC6Fj0kRjEdA7qlulhBLcBgIx2Ly81UtDWBvzPLS0r6VNoyC0Algppt43wp3S +# wgiwuwnezoa83FmoFeZAuJ05C0QULWHVihbumIL2BZiGUi5qZLvhuBe25xmHPeBu +# 421sgpPj0L3xwe2VBgRG0A8dB3pXu0/UzeBZPv+sydDjcJcAfYP4jpdrXxDgbJD5 +# /njcok3s2ydXa7gkLGgoNxdG6+RA+flrUCH5/V6vXLfug8+TlbxFEEyg9H33bU0j +# /3BOGn78fgpCb6xtkrlUhVl5yu6twlEL4x/9QYPp53wQsrwDYoAVrl/jI1vLSO0= +# SIG # End signature block diff --git a/src/chocolatey.resources/helpers/functions/Install-ChocolateyExplorerMenuItem.ps1 b/src/chocolatey.resources/helpers/functions/Install-ChocolateyExplorerMenuItem.ps1 index 257c8521fb..c7662e50e1 100644 --- a/src/chocolatey.resources/helpers/functions/Install-ChocolateyExplorerMenuItem.ps1 +++ b/src/chocolatey.resources/helpers/functions/Install-ChocolateyExplorerMenuItem.ps1 @@ -118,3 +118,215 @@ Install-ChocolateyShortcut Write-Warning $errorMessage } } + +# SIG # Begin signature block +# MIInKwYJKoZIhvcNAQcCoIInHDCCJxgCAQExDzANBglghkgBZQMEAgEFADB5Bgor +# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH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RK/zlJ0IOaa/2z9f5WEWMA0GCWCGSAFlAwQCAQUAoGkwGAYJKoZIhvcNAQkD +# MQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMjQwNTE2MTYxOTI4WjAvBgkq +# hkiG9w0BCQQxIgQgS46/OPP94j/9sI/N8ECHyR4W2BGSiBO9JBDzzCU7bxQwDQYJ +# KoZIhvcNAQEBBQAEggIAhPy87qfjfL5decUT/0aPCxY4t6/4LGC8knHv7j/xZobH +# 5gZOL2GrWn+vD/DOXSHuAgjN79ZBnT2NtcqXhqWb2YZ12P4c/879lzrymWPZrWSd +# SOfE9TCRb1g11s83jyt+HRzf9GokOX7R/HIrhSq7d1BN3H1qk/lYaCzJkayTw9yi +# LIOeZSxmsXG3wGXzOMH3XOjngWAcNy7knngFst+eyjaCGhd0soC4O4C16ZoNsXJR +# FnKLWiQcIqIH50A1LWK1HeUXaUPV2LMtVXzu38LwwHxUQ/BVOBDmpPZRDgbj28gH +# Pz97pCJbpF0TJ3S2M8vBJNIEExheSSCOQ7ufvx4YDeb8vech+PShshym8GIpyvh6 +# 9SMQ5c7PYd9objJlTUavkUuJ0vNHH5SSMahuKKQzKJZbm4FLoY48keDTsy/XV0I9 +# 39c9Tb8+o5E9R5+qh0CPuZHcvgvfxwOWQUi+ivsoGn5Vf5vLzFDtSQ7bQ84LRzA7 +# RqcO+cKp5YN6LYBKw4N1p2VQWc9hjooQIIb5dVatLwpsG/Uz1N6jCxdiZ9i11++B +# KnK3SjLzTF5/2HCdC3uhY1i2m6OauCssKQvrCS+RPkMcyYP+EE57kO34Y/twefN1 +# DilXPM4mEXhvttZVmoGlyb+T1oFnGa30E4QNnWXL3K8DMjZTEdDuLhW6PUTjQgc= +# SIG # End signature block diff --git a/src/chocolatey.resources/helpers/functions/Install-ChocolateyFileAssociation.ps1 b/src/chocolatey.resources/helpers/functions/Install-ChocolateyFileAssociation.ps1 index 6470b772e6..5835988386 100644 --- a/src/chocolatey.resources/helpers/functions/Install-ChocolateyFileAssociation.ps1 +++ b/src/chocolatey.resources/helpers/functions/Install-ChocolateyFileAssociation.ps1 @@ -82,3 +82,215 @@ Install-ChocolateyFileAssociation ".txt" $sublimeExe Start-ChocolateyProcessAsAdmin $elevated Write-Host "`'$extension`' has been associated with `'$executable`'" } + +# SIG # Begin signature block +# MIInKwYJKoZIhvcNAQcCoIInHDCCJxgCAQExDzANBglghkgBZQMEAgEFADB5Bgor +# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBWRS19K2cNmt1M +# 0+s+Kj3EjAVNYBpO/t0p1E5eMZ+4fqCCIK4wggWNMIIEdaADAgECAhAOmxiO+dAt +# 5+/bUOIIQBhaMA0GCSqGSIb3DQEBDAUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK +# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV +# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0yMjA4MDEwMDAwMDBa +# Fw0zMTExMDkyMzU5NTlaMGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy +# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNVBAMTGERpZ2lD +# ZXJ0IFRydXN0ZWQgUm9vdCBHNDCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC +# ggIBAL/mkHNo3rvkXUo8MCIwaTPswqclLskhPfKK2FnC4SmnPVirdprNrnsbhA3E +# MB/zG6Q4FutWxpdtHauyefLKEdLkX9YFPFIPUh/GnhWlfr6fqVcWWVVyr2iTcMKy +# unWZanMylNEQRBAu34LzB4TmdDttceItDBvuINXJIB1jKS3O7F5OyJP4IWGbNOsF +# xl7sWxq868nPzaw0QF+xembud8hIqGZXV59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hg +# +JI6zKpKfWvGeAQCHnmHak+SZGOEg/qS+slI0yuxzc3ENOZIvbGtk0S/Qowb7SJ5 +# 8GziW4Tmz6bVyHUUyMW33BpSa5EHC1ppkB3smqY98LeKyPBZtezeERYkCXwKDRw= +# SIG # End signature block diff --git a/src/chocolatey.resources/helpers/functions/Install-ChocolateyInstallPackage.ps1 b/src/chocolatey.resources/helpers/functions/Install-ChocolateyInstallPackage.ps1 index 5945aa924f..5cfbc47e8a 100644 --- a/src/chocolatey.resources/helpers/functions/Install-ChocolateyInstallPackage.ps1 +++ b/src/chocolatey.resources/helpers/functions/Install-ChocolateyInstallPackage.ps1 @@ -336,10 +336,10 @@ Pro / Business supports a single, ubiquitous install directory option. $msiArgs = "/i `"$fileFullPath`"" $msiArgs = if ($overrideArguments) { Write-Host "Overriding package arguments with '$additionalInstallArgs' (replacing '$silentArgs')" - "$msiArgs $additionalInstallArgs" + (($msiArgs, $additionalInstallArgs) | Where-Object { $_ }) -join " " } else { - "$msiArgs $silentArgs $additionalInstallArgs" + (($msiArgs, $silentArgs, $additionalInstallArgs) | Where-Object { $_ }) -join " " } $env:ChocolateyExitCode = Start-ChocolateyProcessAsAdmin "$msiArgs" "$($env:SystemRoot)\System32\msiexec.exe" -validExitCodes $validExitCodes -workingDirectory $workingDirectory @@ -347,37 +347,251 @@ Pro / Business supports a single, ubiquitous install directory option. if ($fileType -like 'msp') { $msiArgs = '/update "{0}"' -f $fileFullPath - if ($overrideArguments) { + $msiArgs = if ($overrideArguments) { Write-Host "Overriding package arguments with '$additionalInstallArgs' (replacing '$silentArgs')"; - $msiArgs = "$msiArgs $additionalInstallArgs"; + (($msiArgs, $additionalInstallArgs) | Where-Object { $_ }) -join " " } else { - $msiArgs = "$msiArgs $silentArgs $additionalInstallArgs"; + (($msiArgs, $silentArgs, $additionalInstallArgs) | Where-Object { $_ }) -join " " } $env:ChocolateyExitCode = Start-ChocolateyProcessAsAdmin "$msiArgs" "$($env:SystemRoot)\System32\msiexec.exe" -validExitCodes $validExitCodes -workingDirectory $workingDirectory } if ($fileType -like 'exe') { - if ($overrideArguments) { + $exeArgs = if ($overrideArguments) { Write-Host "Overriding package arguments with '$additionalInstallArgs' (replacing '$silentArgs')"; - $env:ChocolateyExitCode = Start-ChocolateyProcessAsAdmin "$additionalInstallArgs" $fileFullPath -validExitCodes $validExitCodes -workingDirectory $workingDirectory + $additionalInstallArgs } else { - $env:ChocolateyExitCode = Start-ChocolateyProcessAsAdmin "$silentArgs $additionalInstallArgs" $fileFullPath -validExitCodes $validExitCodes -workingDirectory $workingDirectory + (($silentArgs, $additionalInstallArgs) | Where-Object { $_ }) -join " " } + $env:ChocolateyExitCode = Start-ChocolateyProcessAsAdmin "$exeArgs" $fileFullPath -validExitCodes $validExitCodes -workingDirectory $workingDirectory } if ($fileType -like 'msu') { - if ($overrideArguments) { + $msuArgs = "`"$fileFullPath`"" + $msuArgs = if ($overrideArguments) { Write-Host "Overriding package arguments with '$additionalInstallArgs' (replacing '$silentArgs')"; - $msuArgs = "`"$fileFullPath`" $additionalInstallArgs" + (($msuArgs, $additionalInstallArgs) | Where-Object { $_ }) -join " " } else { - $msuArgs = "`"$fileFullPath`" $silentArgs $additionalInstallArgs" + (($msuArgs, $silentArgs, $additionalInstallArgs) | Where-Object { $_ }) -join " " } $env:ChocolateyExitCode = Start-ChocolateyProcessAsAdmin "$msuArgs" "$($env:SystemRoot)\System32\wusa.exe" -validExitCodes $validExitCodes -workingDirectory $workingDirectory } Write-Host "$packageName has been installed." } + +# SIG # Begin signature block +# MIInKwYJKoZIhvcNAQcCoIInHDCCJxgCAQExDzANBglghkgBZQMEAgEFADB5Bgor +# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDEFCluw8LAcLTa +# 4zjmI5S2haxH3p68uQUAQr4SA0b0n6CCIK4wggWNMIIEdaADAgECA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0BCQQxIgQgPJPXDiHOjtgCoPDCzZGtgemO1wQUV5XImEbr7NGvlPwwDQYJ +# KoZIhvcNAQEBBQAEggIASsih4Lo9+KDlTVhGET01InC3Vc9EAF9SFuWxLHkHTHYH +# mYFbtBjiijmNyaJvfDM5EZ+KL9vmRAp2x4lu7GnmqRtF8gBch8lcfGeY1RLjNi+a +# nCXGUEyAbi/pAp5XYZQN/T80/yRvGaBcR45HJCV+Y1bNZ01D+PNnraxuzN3AmYrn +# R7FTvtxDpXrVZARMcf/tiT5EfLdO+t/DiiUJUpBe6clekGuP6BZniUvrlEBYmHPq +# pc/rkhcDqfqicU0rJI2trUgTTas7bjac0iXJJQ7zYFDwI1RUEjLwsYTGrfD+gjwR +# cmU1ak47yU3Vbj+mGSoYplvPo9wfX/RvexAIzN46w/PjyIDcYFEVxyRHC3cjLjUk +# iI0QY8ndN9zHPMkVk4OQ7+48/TW1A5BYwlu9ARaSZ2VIj/rMAXMOOqaMAZe7aHl1 +# 8F6B2LaELMvf5Wl4WXYKpuK9x0TGqNP/DgwPADP8zK0VOIUBa5OvBRBb89C+H3LN +# IEDpQm3UM3uIJxKtEMUEkb2o4SCSIU3yZd0yAtyADz9K8EBBJWMoqxBG6/z1xq8f +# 0JRtM/b/y1fzWay0k5XTQRSRh0NChHTV3FweJad0aSpTZuEP9FL4ZYhycMPMP4mK +# /JcA3ftfh2L/IK0DoO17Qx7hMzrkpzb2Lw04Ab9xcJgEq2b0uJaChIUoHBjLrkA= +# SIG # End signature block diff --git a/src/chocolatey.resources/helpers/functions/Install-ChocolateyPackage.ps1 b/src/chocolatey.resources/helpers/functions/Install-ChocolateyPackage.ps1 index 5883432193..a9b9715d9c 100644 --- a/src/chocolatey.resources/helpers/functions/Install-ChocolateyPackage.ps1 +++ b/src/chocolatey.resources/helpers/functions/Install-ChocolateyPackage.ps1 @@ -427,3 +427,215 @@ Install-ChocolateyZipPackage -validExitCodes $validExitCodes ` -UseOnlyPackageSilentArguments:$useOnlyPackageSilent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src/chocolatey.resources/helpers/functions/Install-ChocolateyPath.ps1 b/src/chocolatey.resources/helpers/functions/Install-ChocolateyPath.ps1 deleted file mode 100644 index efcd967161..0000000000 --- a/src/chocolatey.resources/helpers/functions/Install-ChocolateyPath.ps1 +++ /dev/null @@ -1,124 +0,0 @@ -# Copyright © 2017 - 2021 Chocolatey Software, Inc. -# Copyright © 2015 - 2017 RealDimensions Software, LLC -# Copyright © 2011 - 2015 RealDimensions Software, LLC & original authors/contributors from https://github.com/chocolatey/chocolatey -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -function Install-ChocolateyPath { - <# -.SYNOPSIS -**NOTE:** Administrative Access Required when `-PathType 'Machine'.` - -This puts a directory to the PATH environment variable. - -.DESCRIPTION -Looks at both PATH environment variables to ensure a path variable -correctly shows up on the right PATH. - -.NOTES -This command will assert UAC/Admin privileges on the machine if -`-PathType 'Machine'`. - -This is used when the application/tool is not being linked by Chocolatey -(not in the lib folder). - -.INPUTS -None - -.OUTPUTS -None - -.PARAMETER PathToInstall -The full path to a location to add / ensure is in the PATH. - -.PARAMETER PathType -Which PATH to add it to. If specifying `Machine`, this requires admin -privileges to run correctly. - -.PARAMETER IgnoredArguments -Allows splatting with arguments that do not apply. Do not use directly. - -.EXAMPLE -Install-ChocolateyPath -PathToInstall "$($env:SystemDrive)\tools\gittfs" - -.EXAMPLE -Install-ChocolateyPath "$($env:SystemDrive)\Program Files\MySQL\MySQL Server 5.5\bin" -PathType 'Machine' - -.LINK -Install-ChocolateyEnvironmentVariable - -.LINK -Get-EnvironmentVariable - -.LINK -Set-EnvironmentVariable - -.LINK -Get-ToolsLocation -#> - param( - [parameter(Mandatory = $true, Position = 0)][string] $pathToInstall, - [parameter(Mandatory = $false, Position = 1)][System.EnvironmentVariableTarget] $pathType = [System.EnvironmentVariableTarget]::User, - [parameter(ValueFromRemainingArguments = $true)][Object[]] $ignoredArguments - ) - - Write-FunctionCallLogMessage -Invocation $MyInvocation -Parameters $PSBoundParameters - ## Called from chocolateysetup.psm1 - wrap any Write-Host in try/catch - - $originalPathToInstall = $pathToInstall - - #get the PATH variable - Update-SessionEnvironment - $envPath = $env:PATH - if (!$envPath.ToLower().Contains($pathToInstall.ToLower())) { - try { - Write-Host "PATH environment variable does not have $pathToInstall in it. Adding..." - } - catch { - Write-Verbose "PATH environment variable does not have $pathToInstall in it. Adding..." - } - - $actualPath = Get-EnvironmentVariable -Name 'Path' -Scope $pathType -PreserveVariables - - $statementTerminator = ";" - #does the path end in ';'? - $hasStatementTerminator = $actualPath -ne $null -and $actualPath.EndsWith($statementTerminator) - # if the last digit is not ;, then we are adding it - If (!$hasStatementTerminator -and $actualPath -ne $null) { - $pathToInstall = $statementTerminator + $pathToInstall - } - if (!$pathToInstall.EndsWith($statementTerminator)) { - $pathToInstall = $pathToInstall + $statementTerminator - } - $actualPath = $actualPath + $pathToInstall - - if ($pathType -eq [System.EnvironmentVariableTarget]::Machine) { - if (Test-ProcessAdminRights) { - Set-EnvironmentVariable -Name 'Path' -Value $actualPath -Scope $pathType - } - else { - $psArgs = "Install-ChocolateyPath -pathToInstall `'$originalPathToInstall`' -pathType `'$pathType`'" - Start-ChocolateyProcessAsAdmin "$psArgs" - } - } - else { - Set-EnvironmentVariable -Name 'Path' -Value $actualPath -Scope $pathType - } - - #add it to the local path as well so users will be off and running - $envPSPath = $env:PATH - $env:Path = $envPSPath + $statementTerminator + $pathToInstall - } -} - -# [System.Text.RegularExpressions.Regex]::Match($Path,[System.Text.RegularExpressions.Regex]::Escape('locationtoMatch') + '(?>;)?', '', [System.Text.RegularExpressions.RegexOptions]::IgnoreCase) diff --git a/src/chocolatey.resources/helpers/functions/Install-ChocolateyPinnedTaskBarItem.ps1 b/src/chocolatey.resources/helpers/functions/Install-ChocolateyPinnedTaskBarItem.ps1 index cd8ae15344..13f98a25a6 100644 --- a/src/chocolatey.resources/helpers/functions/Install-ChocolateyPinnedTaskBarItem.ps1 +++ b/src/chocolatey.resources/helpers/functions/Install-ChocolateyPinnedTaskBarItem.ps1 @@ -82,3 +82,215 @@ Install-ChocolateyExplorerMenuItem Write-Warning "Unable to create pin. Error captured was $($_.Exception.Message)." } } + +# SIG # Begin signature block +# MIInKwYJKoZIhvcNAQcCoIInHDCCJxgCAQExDzANBglghkgBZQMEAgEFADB5Bgor +# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCACPNT8H8lk6G+z +# J5mz3jzyUCC6QP631eSzsXMvk6y786CCIK4wggWNMIIEdaADAgECAhAOmxiO+dAt +# 5+/bUOIIQBhaMA0GCSqGSIb3DQEBDAUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK +# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV +# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0yMjA4MDEwMDAwMDBa +# Fw0zMTExMDkyMzU5NTlaMGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy +# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNVBAMTGERpZ2lD +# ZXJ0IFRydXN0ZWQgUm9vdCBHNDCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC +# ggIBAL/mkHNo3rvkXUo8MCIwaTPswqclLskhPfKK2FnC4SmnPVirdprNrnsbhA3E +# MB/zG6Q4FutWxpdtHauyefLKEdLkX9YFPFIPUh/GnhWlfr6fqVcWWVVyr2iTcMKy +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r95sQ2GR0QSWsXe0pSLkbyHg/Zs +# Tn5RfIqwxlRhoqakIk9nnURj7cUW36OmBI4nGHnbSnSNRRbAPAPxfw5lII5BOeAG +# S/YJDoMT3ZGpCA7OzQ8P0I9NGw4e83pbYEe5ZB3XFs9YgCXKzVe9kA8StP/shbnr +# EflqCSH5h8Y6g3VNEKaZp+03mnCC87ADFqHx7IclYIPzM86k733YRVmePm1/Rzk= +# SIG # End signature block diff --git a/src/chocolatey.resources/helpers/functions/Install-ChocolateyPowershellCommand.ps1 b/src/chocolatey.resources/helpers/functions/Install-ChocolateyPowershellCommand.ps1 index dba7607c0b..ffab250de7 100644 --- a/src/chocolatey.resources/helpers/functions/Install-ChocolateyPowershellCommand.ps1 +++ b/src/chocolatey.resources/helpers/functions/Install-ChocolateyPowershellCommand.ps1 @@ -210,3 +210,215 @@ Install-ChocolateyZipPackage "@echo off powershell -NoProfile -ExecutionPolicy unrestricted -Command ""& `'$psFileFullPath`' %*"""| Out-File $packageBatchFileName -Encoding ASCII } + +# SIG # Begin signature block +# MIInKwYJKoZIhvcNAQcCoIInHDCCJxgCAQExDzANBglghkgBZQMEAgEFADB5Bgor +# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCByFd8T1xR8XrS5 +# xLco3Xoc9XFJ4obOkd+eiJyOJCv/JaCCIK4wggWNMIIEdaADAgECAhAOmxiO+dAt +# 5+/bUOIIQBhaMA0GCSqGSIb3DQEBDAUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK +# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV +# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0yMjA4MDEwMDAwMDBa +# Fw0zMTExMDkyMzU5NTlaMGIxCzAJBgNVBAYTA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ag+3E7aQxbgG3 +# Hv00bCv7rRViSR5XLXN/x06Vy+HD/VL6cF/StN2MfWj0r+7vD4M6Ds6Htay/hwqY +# sL7Wx3ch80f1tNgwkFZhGU1aef1cTTBf63H/zocl/XsTdL1GU3ctA3wtF3+CxTbs +# hlvpi0XIKob3Ej5/N0y3nIPDOoytqsERMVjrLcrIxHJKfMwwTaigkgHdX0pymUqc +# pz8scamYgbEqxEidyUPgPpsm8ADZakZkbMrQ3O/RdUEbbHnIG9Vd43q/7BR/Xaxz +# KnEj+ytmjudpaUrDZ47VMjF3ohDnO6hQAaHq0KUosDENmXkEooUEW4QP4JhTmMSc +# a+jgXbBA6O4LeIZX6IQMNS12E9T3lWylpPkdmOol8QjMUq02D07NYyo16jGO5KjC +# veQ02TSp+jhiUQzYU7Mu5YTXj9QEfih89ujWNvNLG6KXzoLOaZZ7MXC6t3cCIu7h +# iBpFs7GxCvvZNLBsHnMmdSFrf2Dkfa85OS0xHlDGuq6C1COF3Fa+xCChovrlT5s= +# SIG # End signature block diff --git a/src/chocolatey.resources/helpers/functions/Install-ChocolateyShortcut.ps1 b/src/chocolatey.resources/helpers/functions/Install-ChocolateyShortcut.ps1 index a299a69b42..a79251be8d 100644 --- a/src/chocolatey.resources/helpers/functions/Install-ChocolateyShortcut.ps1 +++ b/src/chocolatey.resources/helpers/functions/Install-ChocolateyShortcut.ps1 @@ -226,3 +226,215 @@ Install-ChocolateyPinnedTaskBarItem Write-Warning "Unable to create shortcut. Error captured was $($_.Exception.Message)." } } + +# SIG # Begin signature block +# MIInKwYJKoZIhvcNAQcCoIInHDCCJxgCAQExDzANBglghkgBZQMEAgEFADB5Bgor +# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBFpWm+N2Mljr+b +# rOl3sHa2biRgJkri6s88vLvASyFsFqCCIK4wggWNMIIEdaADAgEC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w0BCQQxIgQgHmeVEKEXJcXasMMyCj8YCjnAL6saivje3NuKDTblD8kwDQYJ +# KoZIhvcNAQEBBQAEggIARSpwJWynlj50r+U+CZ1y8sBElYLSQoLss9IJKCf7k82X +# RtOEQFxUj48HA70YKDRuNkCluBWyxLSX7n+PGDYum5Q/jZUjoCTD+FV68QjYXi8q +# +CgG2IEFz1G/RwuHzMRSm+PHXmwYV317L1LNfDzlVDCeOHaJcyMrRoiIh2KzsY96 +# EfpUM0W8RHIc6jISU/miUL4pazqg4G6AJ43WVo855rHKM28CV+krYyWcEumcH5rz +# 7FbgCODNEJdBwPxmGuCCcENFyjosYmA+NnvV9p8eHEcRDLR7qWWJGYvED3Ip7Jxf +# tTZz4Br/JQUAEsW0LmZwMOLKgdPJPw8N/VR8EE0ankncL7pAaiNaITqYxxb1wf08 +# dHlppRZi1TUqiELdB0oaVXvOz3tOgF1odjE4oC10rwVjvuCCEBFoY4Wgsc7ytXXx +# /gUlMxPLtUiL5cIk8SqVVi7+dDIR+yQKY0TdG/kSZW6JmijRnW+4Y3wIVFUDwbgI +# 9kZJBf19xymFrkbs9DtfOcL12t/at0WgGaz9srw0o1t3nO1vCQXAOOGhQGYEEq/d +# wyky82cwqVASO6mZqADxC6pH5UeaZVt5TUvI5jxJSvDqVlUTOq6L6L45RtUoRpDX +# nhJ7Zr32hHFjK+74z0YKjpqsPVjqGw87rc+YKIrs4vrQEIEcolfPFtqQxdPo5yg= +# SIG # End signature block diff --git a/src/chocolatey.resources/helpers/functions/Install-ChocolateyVsixPackage.ps1 b/src/chocolatey.resources/helpers/functions/Install-ChocolateyVsixPackage.ps1 index 1048c72b56..68a09745c1 100644 --- a/src/chocolatey.resources/helpers/functions/Install-ChocolateyVsixPackage.ps1 +++ b/src/chocolatey.resources/helpers/functions/Install-ChocolateyVsixPackage.ps1 @@ -210,3 +210,215 @@ Install-ChocolateyZipPackage throw "Visual Studio is not installed or the specified version is not present." } } + +# SIG # Begin signature block +# MIInKwYJKoZIhvc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BAMTMkRp +# Z2lDZXJ0IFRydXN0ZWQgRzQgUlNBNDA5NiBTSEEyNTYgVGltZVN0YW1waW5nIENB +# AhAFRK/zlJ0IOaa/2z9f5WEWMA0GCWCGSAFlAwQCAQUAoGkwGAYJKoZIhvcNAQkD +# MQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMjQwNTE2MTYxOTMyWjAvBgkq +# hkiG9w0BCQQxIgQg6ZidwU4mWsNzLlzL3ABvi8MVVRrCQrMplBeScZJAH0EwDQYJ +# KoZIhvcNAQEBBQAEggIAXCzRsfnKN3dLOKK/my3vMH8Qi4zkRbRz68hkpbJhh4+s +# BQDewqKI3HXCDGHr8BknZWX7xGC7K9fMJmPh7H48fbDQj6a+EMrB4rDFhXUnnBSV +# js/R3hzRphhRL6HpVfjgJyhHckbGhHJQ/vnrf5jC6X9EcdNcQp/0qaA3hOoL7HXx +# HX1Kdd/D1iM3DXLjYJuSEHx7MvMs6OOgPu7Uj6cyUGgd5E/L2iGV/uv5uS2cM8g7 +# 7pFW0tksaOEIU12AGy2HHHTeN56r65IJyf3JkLtmQwQ37GCOiU/0iMHVKssfR69A +# LVLcC+SaHWftOvWxEZvld/x9VFeu7QfF1Apnme3iarfeOCqjs0L4qmn51XfkjlDY +# HaR5NxOOjowdK5wtqiyrnCAa756C0z92+kEfhRJpxX3OQQUJHlTPMkuT1VaAczua +# aqWw4374G0gWoWM+U7XMRp6AkMXutLWAiL90OtEduXq+WldgsreYYLfG4GnnEjco +# z1tJRTosBjhdxbR+03uIWAXNcPj4rJRqBe26/o7bOfki8HxH0279pO98cHgKooVh +# AqcjgEAxq4ML35P0jZPP0nfOwydMkCwmY6qRR3UH/wa5VCleABGwICYcaGnBUzlB +# TnRhlyLNw7+5SiwD8lh/ioDXSsJUfOVRLv4A0VS7i4V3v7NePxjkc0teWoiykGs= +# SIG # End signature block diff --git a/src/chocolatey.resources/helpers/functions/Install-ChocolateyZipPackage.ps1 b/src/chocolatey.resources/helpers/functions/Install-ChocolateyZipPackage.ps1 index 1d956418dd..d5302805e3 100644 --- a/src/chocolatey.resources/helpers/functions/Install-ChocolateyZipPackage.ps1 +++ b/src/chocolatey.resources/helpers/functions/Install-ChocolateyZipPackage.ps1 @@ -228,3 +228,215 @@ Get-ChocolateyUnzip $filePath = Get-ChocolateyWebFile $packageName $downloadFilePath $url $url64bit -checkSum $checkSum -checksumType $checksumType -checkSum64 $checkSum64 -checksumType64 $checksumType64 -options $options -getOriginalFileName Get-ChocolateyUnzip "$filePath" $unzipLocation $specificFolder $packageName -disableLogging:$disableLogging } + +# SIG # Begin signature block +# MIInKwYJKoZIhvcNAQcCoIInHDCCJxgCAQExDzANBglghkgBZQMEAgEFADB5Bgor +# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDKQVBTDy7pxVkV +# M29VOlaRW9UA29hkVL8a7C5Kjnz+T6CCIK4wggWNMIIEdaADAgECAhAOmxiO+dAt +# 5+/bUOIIQBhaMA0GCSqGSIb3DQEBDAUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK +# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV +# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0yMjA4MDEwMDAwMDBa +# Fw0zMTExMDkyMzU5NTlaMGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy +# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNVBAMTGERpZ2lD +# ZXJ0IFRydXN0ZWQgUm9vdCBHNDCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC +# ggIBAL/mkHNo3rvkXUo8MCIwaTPswqclLskhPfKK2FnC4SmnPVirdprNrnsbhA3E +# MB/zG6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kjmFudgSDFeXd0DMapFGXKo +# CyP/lQXG/v/jPhk1gJsjfQzA0ez71TJXH2wA5l8o5G9/zDxE/bLp7COvPvGGXMFL +# jflwQP7U3Ny6GN+tVMqRcpFOHAy/0c+eG2swiF9eJ7Lt5DyrCaGyhpaxkS/KyemH +# 6BLH/TorXcfCP9uJaI41pBNrly52ToDJkq09Pa4/mQrcjTzRjoEbhexjFx4RIXMx +# LuXO0uKwujlJdudcphcTiDxF9obIb5Ohd9rvn4fW7T7iw51/ja/YMRCo3t1V4jY= +# SIG # End signature block diff --git a/src/chocolatey.resources/helpers/functions/Install-Vsix.ps1 b/src/chocolatey.resources/helpers/functions/Install-Vsix.ps1 index be95e360d6..4473725b95 100644 --- a/src/chocolatey.resources/helpers/functions/Install-Vsix.ps1 +++ b/src/chocolatey.resources/helpers/functions/Install-Vsix.ps1 @@ -65,3 +65,215 @@ Install-ChocolateyVsixPackage return $s.ExitCode } + +# SIG # Begin signature block +# MIInKwYJKoZIhvcNAQcCoIInHDCCJxgCAQExDzANBglghkgBZQMEAgEFADB5Bgor +# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCiROvWtF7IgbZv +# jubDiROu0XfHW0zmhNtN/WDSHo8uq6CCIK4wggWNMIIEdaADAgECAhAOmxiO+dAt +# 5+/bUOIIQBhaMA0GCSqGSIb3DQEBDAUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK +# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV +# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0yMjA4MDEwMDAwMDBa +# Fw0zMTExMDkyMzU5NTlaMGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy +# dCBJbmMxGTAXBgNV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NP7NA9c5cR +# kiPiq+tvYGYktjDVqTPD24wU2LNqqTeHDHSm90HjfuUf+jqLuICtPvfCTJlAac6c +# 0NLahua57sjqEgkzDDizZCxTqmYTw1OBVKzw8AaOMYOWlp3kxD6ROSzaOh0owF4o +# wge88TRyIFLutRwjIXIL4z0zY46L2rCae5pRuzvZXiD3woJPZwQteILzaQ51DZ1w +# 4iAHuoGxUUqYL5+BEeJjIKqdGspue6q7rypkt+l0qmO/ktWuNW6dM0v/8GEeGjpp +# lQFxPGsxYb/2eDTE40zZSnnKm4Yx4WEkHtkQTttzGZVYmuu091brMFEbhOukcdJp +# OYZMaa63WQ0WM2PzGgy083K8BtztlZpRVlZh6J5iYlQidks0IuRdYZ3MU8admPPW +# +YhMF6kgXN0hE7uhaI0iObnn4YkTxmaSfDSCPxECRWkcaOIMRo7byhoNzZ2Ehug= +# SIG # End signature block diff --git a/src/chocolatey.resources/helpers/functions/Set-EnvironmentVariable.ps1 b/src/chocolatey.resources/helpers/functions/Set-EnvironmentVariable.ps1 deleted file mode 100644 index 64e465e758..0000000000 --- a/src/chocolatey.resources/helpers/functions/Set-EnvironmentVariable.ps1 +++ /dev/null @@ -1,128 +0,0 @@ -# Copyright © 2017 - 2021 Chocolatey Software, Inc. -# Copyright © 2015 - 2017 RealDimensions Software, LLC -# Copyright © 2011 - 2015 RealDimensions Software, LLC & original authors/contributors from https://github.com/chocolatey/chocolatey -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -function Set-EnvironmentVariable { - <# -.SYNOPSIS -**NOTE:** Administrative Access Required when `-Scope 'Machine'.` - -DO NOT USE. Not part of the public API. Use -`Install-ChocolateyEnvironmentVariable` instead. - - -.DESCRIPTION -Saves an environment variable. - -.NOTES -This command will assert UAC/Admin privileges on the machine if -`-Scope 'Machine'`. - -.INPUTS -None - -.OUTPUTS -None - -.PARAMETER Name - -.PARAMETER Value - -.PARAMETER IgnoredArguments -Allows splatting with arguments that do not apply. Do not use directly. - -.LINK -Install-ChocolateyEnvironmentVariable - -.LINK -Uninstall-ChocolateyEnvironmentVariable - -.LINK -Install-ChocolateyPath - -.LINK -Get-EnvironmentVariable -#> - param ( - [parameter(Mandatory = $true, Position = 0)][string] $Name, - [parameter(Mandatory = $false, Position = 1)][string] $Value, - [parameter(Mandatory = $false, Position = 2)] - [System.EnvironmentVariableTarget] $Scope, - [parameter(ValueFromRemainingArguments = $true)][Object[]] $ignoredArguments - ) - - Write-FunctionCallLogMessage -Invocation $MyInvocation -Parameters $PSBoundParameters - - if ($Scope -eq [System.EnvironmentVariableTarget]::Process -or $Value -eq $null -or $Value -eq '') { - return [Environment]::SetEnvironmentVariable($Name, $Value, $Scope) - } - - [string]$keyHive = 'HKEY_LOCAL_MACHINE' - [string]$registryKey = "SYSTEM\CurrentControlSet\Control\Session Manager\Environment\" - [Microsoft.Win32.RegistryKey] $win32RegistryKey = [Microsoft.Win32.Registry]::LocalMachine.OpenSubKey($registryKey) - if ($Scope -eq [System.EnvironmentVariableTarget]::User) { - $keyHive = 'HKEY_CURRENT_USER' - $registryKey = "Environment" - [Microsoft.Win32.RegistryKey] $win32RegistryKey = [Microsoft.Win32.Registry]::CurrentUser.OpenSubKey($registryKey) - } - - [Microsoft.Win32.RegistryValueKind]$registryType = [Microsoft.Win32.RegistryValueKind]::String - try { - if ($win32RegistryKey.GetValueNames() -contains $Name) { - $registryType = $win32RegistryKey.GetValueKind($Name) - } - } - catch { - # the value doesn't yet exist - # move along, nothing to see here - } - Write-Debug "Registry type for $Name is/will be $registryType" - - if ($Name -eq 'PATH') { - $registryType = [Microsoft.Win32.RegistryValueKind]::ExpandString - } - - [Microsoft.Win32.Registry]::SetValue($keyHive + "\" + $registryKey, $Name, $Value, $registryType) - - try { - # make everything refresh - # because sometimes explorer.exe just doesn't get the message that things were updated. - if (-not ("win32.nativemethods" -as [type])) { - # import sendmessagetimeout from win32 - Add-Type -Namespace Win32 -Name NativeMethods -MemberDefinition @" -[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)] -public static extern IntPtr SendMessageTimeout( - IntPtr hWnd, uint Msg, UIntPtr wParam, string lParam, - uint fuFlags, uint uTimeout, out UIntPtr lpdwResult); -"@ - } - - $HWND_BROADCAST = [intptr]0xffff; - $WM_SETTINGCHANGE = 0x1a; - $result = [uintptr]::zero - - # notify all windows of environment block change - [win32.nativemethods]::SendMessageTimeout($HWND_BROADCAST, $WM_SETTINGCHANGE, [uintptr]::Zero, "Environment", 2, 5000, [ref]$result) | Out-Null - - # Set a user environment variable making the system refresh - $setx = "$($env:SystemRoot)\System32\setx.exe" - & "$setx" ChocolateyLastPathUpdate `"$((Get-Date).ToFileTime())`" | Out-Null - } - catch { - Write-Warning "Failure attempting to let Explorer know about updated environment settings.`n $($_.Exception.Message)" - } - - Update-SessionEnvironment -} diff --git a/src/chocolatey.resources/helpers/functions/Set-PowerShellExitCode.ps1 b/src/chocolatey.resources/helpers/functions/Set-PowerShellExitCode.ps1 index 99590e96ae..37f2ead6d9 100644 --- a/src/chocolatey.resources/helpers/functions/Set-PowerShellExitCode.ps1 +++ b/src/chocolatey.resources/helpers/functions/Set-PowerShellExitCode.ps1 @@ -62,3 +62,215 @@ Set-PowerShellExitCode 3010 $env:ChocolateyExitCode = $exitCode; } + +# SIG # Begin signature block +# MIInKwYJKoZIhvcNAQcCoIInHDCCJxgCAQExDzANBglghkgBZQMEAgEFADB5Bgor +# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCGyfPjf4S7AHcj +# +EisqFe9/JCNyD63YRevf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2MTYxOTM0WjAvBgkq +# hkiG9w0BCQQxIgQgVj8Ts3TDPaVPEI1aX6hiO7Q+736fg5CcwuKgMYOChhEwDQYJ +# KoZIhvcNAQEBBQAEggIAYJuln+dJyteREF0zZNOTg8y5osmHrmQ79xRh1/Kxv6cG +# clbcrrESvDMIH88IkPQ2zcUlk7ny/5MOACE1iF+1VpPE9DBrhuM2w9R4gUcGKXIO +# MBnq1bJgkUcuasDlzcKwFEEuSj6+u/ahtNU5eFEU1piayssIA7eHXsfKJm86S/8X +# CHn17Ue4Wfqz0kQFAqk+F9EyHoZzZiQpKA1+os2jlubbxFfK4OuJM4dF7ydzb/kN +# lPoGAaKz0tvgcief9aSdX9lS/fyO5/h0Agt1h8aNpnVsIeGf7P7trN6s+f9Ojsd8 +# QGg7XEH6C7uVmdR1jqxTZexhgvG+IowEwPDct4zMLB8scz2qb0IrQy1mTSOSsznL +# W9c6wxXMdJtSv40Do28imObb91ddrYX+xaadlkzPu67/QhIy8QNlpkOsjFuR52US +# 62xBz8RmANybDDXe2iMpZGVITogVRFyfx3UJ74W0ajBAzsvW/9KJ/C7ZkQ88ZrMN +# BVpIPTqNxu9sjCqf6JezqBf/DXrRmEXEDbdXE3MThuNc6CfQ2PfCC4Qvme9j+Nta +# Iw9+HJjp1obVCfXXQASdwR5PgODOPH+0I4pWMumxAlWnrRdNabKZOW9jESDhbmhN +# 2tDydCoqNKNfwUbrlqhucZ7io387Pk1kfbGM0wKVqlASgP6oNQk3LV1d/9dlr38= +# SIG # End signature block diff --git a/src/chocolatey.resources/helpers/functions/Start-ChocolateyProcessAsAdmin.ps1 b/src/chocolatey.resources/helpers/functions/Start-ChocolateyProcessAsAdmin.ps1 index 4ca8dec71b..ae7b266348 100644 --- a/src/chocolatey.resources/helpers/functions/Start-ChocolateyProcessAsAdmin.ps1 +++ b/src/chocolatey.resources/helpers/functions/Start-ChocolateyProcessAsAdmin.ps1 @@ -127,11 +127,17 @@ Install-ChocolateyInstallPackage } $workingDirectory = $pwd.ProviderPath } + $alreadyElevated = $false if (Test-ProcessAdminRights) { $alreadyElevated = $true } + if ($elevated -and -not $alreadyElevated -and $env:ChocolateyAttemptedElevation) { + $env:ChocolateyAttemptedElevation = [string]::Empty + throw "Elevation attempt failed. Aborting..." + } + $dbMessagePrepend = "Elevating permissions and running" if (!$elevated) { $dbMessagePrepend = "Running" @@ -257,31 +263,42 @@ $dbMessagePrepend [`"$exeToRun`" $wrappedStatements]. This may take a while, dep $process.StartInfo.WindowStyle = [System.Diagnostics.ProcessWindowStyle]::Minimized } - $process.Start() | Out-Null - if ($process.StartInfo.RedirectStandardOutput) { - $process.BeginOutputReadLine() - } - if ($process.StartInfo.RedirectStandardError) { - $process.BeginErrorReadLine() - } - $process.WaitForExit() - - # For some reason this forces the jobs to finish and waits for - # them to do so. Without this it never finishes. - Unregister-Event -SourceIdentifier "LogOutput_ChocolateyProc" - Unregister-Event -SourceIdentifier "LogErrors_ChocolateyProc" + try { + if ($elevated -and -not $alreadyElevated) { + # Set this in case of recursive calls into Start-ChocolateyProcessAsAdmin + $env:ChocolateyAttemptedElevation = "true" + } - # sometimes the process hasn't fully exited yet. - for ($loopCount = 1; $loopCount -le 15; $loopCount++) { - if ($process.HasExited) { - break; + $process.Start() | Out-Null + if ($process.StartInfo.RedirectStandardOutput) { + $process.BeginOutputReadLine() + } + if ($process.StartInfo.RedirectStandardError) { + $process.BeginErrorReadLine() + } + $process.WaitForExit() + + # For some reason this forces the jobs to finish and waits for + # them to do so. Without this it never finishes. + Unregister-Event -SourceIdentifier "LogOutput_ChocolateyProc" + Unregister-Event -SourceIdentifier "LogErrors_ChocolateyProc" + + # sometimes the process hasn't fully exited yet. + for ($loopCount = 1; $loopCount -le 15; $loopCount++) { + if ($process.HasExited) { + break; + } + Write-Debug "Waiting for process to exit - $loopCount/15 seconds"; + Start-Sleep 1; } - Write-Debug "Waiting for process to exit - $loopCount/15 seconds"; - Start-Sleep 1; - } - $exitCode = $process.ExitCode - $process.Dispose() + $exitCode = $process.ExitCode + $process.Dispose() + } + finally { + # Unset the value so that any further invocations do not get confused. + $env:ChocolateyAttemptedElevation = [string]::Empty + } Write-Debug "Command [`"$exeToRun`" $wrappedStatements] exited with `'$exitCode`'." @@ -393,3 +410,215 @@ $dbMessagePrepend [`"$exeToRun`" $wrappedStatements]. This may take a while, dep Set-Alias Start-ChocolateyProcess Start-ChocolateyProcessAsAdmin Set-Alias Invoke-ChocolateyProcess Start-ChocolateyProcessAsAdmin + +# SIG # Begin signature block +# MIInKwYJKoZIhvcNAQcCoIInHDCCJxgCAQExDzANBglghkgBZQMEAgEFADB5Bgor +# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBkscKuwgb3Y8/Q +# sjo3E9b3jZgzhxiCIfXOeQYd4jnjS6CCIK4wggWNMIIEdaADAgECAhAOmxiO+dAt +# 5+/bUOIIQBhaMA0GCSqGSIb3DQEBDAUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK +# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV +# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0yMjA4MDEwMDAwMDBa +# Fw0zMTExMDkyMzU5NTlaMGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy +# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNVBAMTGERpZ2lD +# ZXJ0IFRydXN0ZWQgUm9vdCBHNDCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC +# ggIBAL/mkHNo3rvkXUo8MCIwaTPswqclLskhPfKK2FnC4SmnPVirdprNrnsbhA3E +# MB/zG6Q4FutWxpdtHauyefLKEdLkX9YFPFIPUh/GnhWlfr6fqVcWWVVyr2iTc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pe3N9dkM7r42SorZ1TiRrW8wyMzxbkfRUHKnl4VFuhirvBH +# L+2gcJdXUk+2Y7WbUFqjwc9/RVfVAcLYUihdegW0ODo9gcxUkh1lCSeLyklrgg5G +# wmzP2rF/7QTc6iFKpLoyAyHBvoUWGIB3PRszcToBu3U+HTmMZFgoyIyJ0qnfV1rM +# dioHMkCqsUFn4/DmkA1kkqxGBIFQUngncyZ2NoKOP7Zqlt+LgUUx3Cll/1wU62o= +# SIG # End signature block diff --git a/src/chocolatey.resources/helpers/functions/Test-ProcessAdminRights.ps1 b/src/chocolatey.resources/helpers/functions/Test-ProcessAdminRights.ps1 deleted file mode 100644 index 41c4ee620e..0000000000 --- a/src/chocolatey.resources/helpers/functions/Test-ProcessAdminRights.ps1 +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright © 2017 - 2021 Chocolatey Software, Inc. -# Copyright © 2015 - 2017 RealDimensions Software, LLC -# Copyright © 2011 - 2015 RealDimensions Software, LLC & original authors/contributors from https://github.com/chocolatey/chocolatey -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -function Test-ProcessAdminRights { - <# -.SYNOPSIS -Tests whether the current process is running with administrative rights. - -.DESCRIPTION -This function checks whether the current process has administrative -rights by checking if the current user identity is a member of the -Administrators group. It returns `$true` if the current process is -running with administrative rights, `$false` otherwise. - -On Windows Vista and later, with UAC enabled, the returned value -represents the actual rights available to the process, e.g. if it -returns `$true`, the process is running elevated. - -.INPUTS -None - -.OUTPUTS -System.Boolean -#> - - # do not log function call - ## Called from chocolateysetup.psm1 - wrap any Write-Host in try/catch - - $currentPrincipal = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent([Security.Principal.TokenAccessLevels]'Query,Duplicate')) - $isAdmin = $currentPrincipal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator) - Write-Debug "Test-ProcessAdminRights: returning $isAdmin" - - return $isAdmin -} diff --git a/src/chocolatey.resources/helpers/functions/UnInstall-ChocolateyZipPackage.ps1 b/src/chocolatey.resources/helpers/functions/UnInstall-ChocolateyZipPackage.ps1 index d84bb505f4..a14b860fcb 100644 --- a/src/chocolatey.resources/helpers/functions/UnInstall-ChocolateyZipPackage.ps1 +++ b/src/chocolatey.resources/helpers/functions/UnInstall-ChocolateyZipPackage.ps1 @@ -82,3 +82,215 @@ Uninstall-ChocolateyPackage } } } + +# SIG # Begin signature block +# MIInKwYJKoZIhvcNAQcCoIInHDCCJxgCAQExDzANBglghkgBZQMEAgEFADB5Bgor +# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBPZKamtW7HD6i5 +# 97suMw/lPh2b2Mnl7j1kGntpT+0fb6CCIK4wggWNMIIEdaADAgECAhAOmxiO+dAt +# 5+/bUOIIQBhaMA0GCSqGSIb3DQEBDAUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK +# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV +# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0yMjA4MDEwMDAwMDBa +# Fw0zMTExMDkyMzU5NTlaMGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy +# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNVBAMTGERpZ2lD +# ZXJ0IFRydXN0ZWQgUm9vdCBHNDCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC +# ggIBAL/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XB89z1meZE1n1v5ycb1kWLnQKvmu9 +# M+AlQESsK6B0slJKuv0kkNy7hulGHpXm/pTK/qJflGA95zj/50VryL4NVTSrsg74 +# K8lYAVG+Aw42UFYXbQ5vLvXRq7FowG1hK/aGIYPkEi6BYL7M3E4uF8C2mW09utpe +# 5/qKrsbrBMKJs98sBPCpXJFIEeH4hphhS6jbr8yt59AK7WXY7gUcP3oV84RbuaqJ +# kckfL7I2+96nVQ/HM2571OjIDR+NVGMuuBrXYzoa4u84cXxGB4ENIlwrbVpASop/ +# CBnXaRbos/6glY0H6uVG796mLUj+gI1Cjd/WWk2WISvlnO3aMQvvWu+pQ3fHwJ4= +# SIG # End signature block diff --git a/src/chocolatey.resources/helpers/functions/Uninstall-BinFile.ps1 b/src/chocolatey.resources/helpers/functions/Uninstall-BinFile.ps1 index bc63888880..9611dfb6e6 100644 --- a/src/chocolatey.resources/helpers/functions/Uninstall-BinFile.ps1 +++ b/src/chocolatey.resources/helpers/functions/Uninstall-BinFile.ps1 @@ -97,3 +97,215 @@ Install-BinFile } Set-Alias Remove-BinFile Uninstall-BinFile + +# SIG # Begin signature block +# MIInKwYJKoZIhvcNAQcCoIInHDCCJxgCAQExDzANBglghkgBZQMEAgEFADB5Bgor +# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCGCanYHehFEq7f +# dP288JBYcbhuKT5nFifnBVi+2jbtjaCCIK4wggWNMIIEdaADAgECAhAOmxiO+dAt +# 5+/bUOIIQBhaMA0GCSqGSIb3DQEBDAUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK +# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV +# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0yMjA4MDEwMDAwMDBa +#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9dZH7P5iM2zcp4BAA5uHBRrEMV0vPduUfpyP +# /QxBH+N6yVlKILFvdZzL2yj5uDb/vFQC7enWJm00UEmpDzE7Dnq1gGfiRKbgojzO +# wepJ+aLtThzV+yPTqrWaO886YwMt4QlH/sGNKwfUYsYSM4yJoVDM8c0MYDKM0nJ/ +# DUvo4lTUNa0Q8au2dVtwvX41nTjLbE/V3xPYCeJiQYN3bfBeUDkT7SIku0BQuJiv +# IjaAy+rXxfuN415iheyvFmqZwUkxtmBt8H/WCf8zttb8hRG/fy1sQP7QDTFNzXEM +# KzyXDDK16nlQpDBAwDgyLWLUhCmjMc4p3/RAIAdXEI6YxapRuK9ZsYYQY5PVP972 +# TjL0yQHUbtrGDIzAAWZbn28fNIG+3CMKPUlrEZ+LR3WohmYZjpNHUKvqvma6hSsF +# LtELs7Tyizxco6M0Fll+tEwp3JvEO/2zbyvX+XA2lT9Zmg8/XosmJzaYdwmtHlZ8 +# Hwq2brP34KtQ9MsfxyFMVOqo+FHOIY/IqSfpsInDJ0gIVInvk8a8mje3NM7iENE= +# SIG # End signature block diff --git a/src/chocolatey.resources/helpers/functions/Uninstall-ChocolateyEnvironmentVariable.ps1 b/src/chocolatey.resources/helpers/functions/Uninstall-ChocolateyEnvironmentVariable.ps1 index f7071de5be..573bcdf4e8 100644 --- a/src/chocolatey.resources/helpers/functions/Uninstall-ChocolateyEnvironmentVariable.ps1 +++ b/src/chocolatey.resources/helpers/functions/Uninstall-ChocolateyEnvironmentVariable.ps1 @@ -92,3 +92,215 @@ Install-ChocolateyPath Set-Content env:\$variableName $null } + +# SIG # Begin signature block +# MIInKwYJKoZIhvcNAQcCoIInHDCCJxgCAQExDzANBglghkgBZQMEAgEFADB5Bgor +# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCmEta6wcrW7tAh +# P9RCrI/077TRcWw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xcNMjQwNTE2MTYxOTM3WjAvBgkq +# hkiG9w0BCQQxIgQgkOvt60X4aZJleEpHNeswYLuzIsgAcNBjPHaZSBQEwPMwDQYJ +# KoZIhvcNAQEBBQAEggIAidp056ExHMDDoKUK7kmG7Mie1NqMcpo+IpYndp1DBuy2 +# p0k0fd+nXNpOQplDo0siexIswfTvynLBJRN7f7vPHMpLLJZrOzoSpRF6D1lwVVC3 +# t50Of533AAmkYcxl+oZyhj2igmCOeZst+SPL92NYiPY9SvjAOf9O2AEi4fLCzJgT +# jww3oKeCg++hemVJXkkkT9ozLhXhr9aDqtpuIr43F3f/4hLX8KBKuR9Z14i3en7K +# k54k+iQWHg1KRWRvPpHIvUtPTAJ/CF6dblo1E7Tr+JZC33Hh9PVJUqUPIm5N3uQa +# i+ZVFGU/BHma//iwd6uGc4q4vVXuAW1T1RqEFgwWPDTls6hUPBNV6IcIAE4XatDZ +# Q0M6I7MrRJIrlIwCDnV//peZ496AZtR1KQUiC47lLZ1Tz6Jsg+aMD+EzD5zdcMNd +# JWacWzDOJQtfQ2lGwyI5cpmxjxBDPZso2lDNOskqXDU2cSpDu6OR94pcKn6cDlW4 +# H/kHk5NuYf+44U1JO1Ixt6QAGQOvelSVsoAcrS3o0rv4rqK2dSmsHNb7L9r66pcV +# JdtwID6+QIgXUtWuzgwKZUuj0I+DjmFLDKagZjU4ugTqjRJOB/LgcPonwaVvigc7 +# LbDymoshMCFhED7ebnWCaiAMFsMZKY+3x6YinlLHKdVtk8g3xuIMd/qEFsxKP6A= +# SIG # End signature block diff --git a/src/chocolatey.resources/helpers/functions/Uninstall-ChocolateyPackage.ps1 b/src/chocolatey.resources/helpers/functions/Uninstall-ChocolateyPackage.ps1 index 44f8172e86..cbd1e1ace3 100644 --- a/src/chocolatey.resources/helpers/functions/Uninstall-ChocolateyPackage.ps1 +++ b/src/chocolatey.resources/helpers/functions/Uninstall-ChocolateyPackage.ps1 @@ -160,3 +160,215 @@ Get-UninstallRegistryKey Write-Host "$packageName has been uninstalled." } + +# SIG # Begin signature block +# MIInKwYJKoZIhvcNAQcCoIInHDCCJxgCAQExDzANBglghkgBZQMEAgEFADB5Bgor +# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCB1uX+OOmFNr9PE +# k9P0x2cnNka8iJvVqmP126Dwy1hSs6CCIK4wggWNMIIEdaADAgECAhAOmxiO+dAt +# 5+/bUOIIQBhaMA0GCSqGSIb3DQEBDAUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK +# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV +# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0yMjA4MDEwMDAwMDBa +# Fw0zMTExMDkyMzU5NTlaMGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy +# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNVBAMTGERpZ2lD +# ZXJ0IFRydXN0ZWQgUm9vdCBHNDCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC +# ggIBAL/mkHNo3rvkXUo8MCIwaTPswqclLskhPfKK2FnC4SmnPVirdprNrnsbhA3E +# MB/zG6Q4FutWxpdtHauyefLKEdLkX9YFPFIPUh/GnhWlfr6fqVcWWVVyr2iTcMKy +# unWZanMylNEQRBAu34LzB4TmdDttceItDBvuINXJIB1jKS3O7F5OyJP4IWGbNOsF +# xl7sWxq868nPzaw0QF+xembud8hIqGZXV59UWI4MK7dPpzDZVu7Ke13jrclPXuU1 +# 5zHL2pNe3I6PgNq2kZhAkHnDeMe2scS1ahg4AxCN2NQ3pC4FfYj1gj4QkXCrVYJB +# MtfbBHMqbpEBfCFM1LyuGwN1XXhm2ToxRJozQL8I11pJpMLmq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EwJVUzEXMBUGA1UEChMORGlnaUNlcnQsIEluYy4xOzA5BgNVBAMTMkRp +# Z2lDZXJ0IFRydXN0ZWQgRzQgUlNBNDA5NiBTSEEyNTYgVGltZVN0YW1waW5nIENB +# AhAFRK/zlJ0IOaa/2z9f5WEWMA0GCWCGSAFlAwQCAQUAoGkwGAYJKoZIhvcNAQkD +# MQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMjQwNTE2MTYxOTM3WjAvBgkq +# hkiG9w0BCQQxIgQgYMdWBqR75OPIznYBtaDleErNWEDRz2p3nTOHPKY9XNowDQYJ +# KoZIhvcNAQEBBQAEggIAJhPGWv5KfLo0dObDzOUSwdlMdsVsRizWxpic3CKyPruV +# d/gwE+3vwq3jPsvkliOL6r6i+d01c12beZZU4SQMf4ZAv4POecZWZg0zvX9ML1ZY +# lfKpD1R2QzcbvT5uDYONypp9ki79zyltEu6cGgtjq4VqdqWkrLdB1RZB3r3UxHG/ +# qQpngmoUXoiIwlrlLhcFWfUsI18XL4EYx7Zl5749gJFFJmwbGHeB3Sml85eb9jp5 +# 9Td0B9Bs6gF8jEpg2gMIwhnoMrGBKjZzVHjs5+E03uY7r35dl5iY7VIePNF2I7Js +# aORMzwSvRqIinXFJa6THXcQirpqqYgWBLHS5b2w/vRNMft7PFas0FmBjNLtSkGO8 +# KvugwxJn985qnJurzE6w/KTgxB3dkaMzWqdx+2/LmdekxCnnqCDLG/HbhfuEs712 +# yhVh9KDU2UWsHX9qgjKa69LUuyiTvPyWsgDdOcCXM8PHx4zdthX6QdOF1+P0zfHG +# CR+hRMK3X2hpPlEWI6qjWdx1c0cSoShOHind04SwiJVi1T3h9BfOJjgJoX+FN+Iz +# bsqROiMxrBLHsoR8lN8V0O+DmQtV+ttGCsSSUz7UVkTk/CYwrfXjYsYNnqSVI4S0 +# muz16mdbx5tWpU1OYRaDHbHYBSb4ETI4DpbWKZzvsxzSrX/oBCQi+632a8vI4cE= +# SIG # End signature block diff --git a/src/chocolatey.resources/helpers/functions/Update-SessionEnvironment.ps1 b/src/chocolatey.resources/helpers/functions/Update-SessionEnvironment.ps1 deleted file mode 100644 index 725b22bd0f..0000000000 --- a/src/chocolatey.resources/helpers/functions/Update-SessionEnvironment.ps1 +++ /dev/null @@ -1,106 +0,0 @@ -# Copyright © 2017 - 2021 Chocolatey Software, Inc. -# Copyright © 2015 - 2017 RealDimensions Software, LLC -# Copyright © 2011 - 2015 RealDimensions Software, LLC & original authors/contributors from https://github.com/chocolatey/chocolatey -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -function Update-SessionEnvironment { - <# -.SYNOPSIS -Updates the environment variables of the current powershell session with -any environment variable changes that may have occurred during a -Chocolatey package install. - -.DESCRIPTION -When Chocolatey installs a package, the package author may add or change -certain environment variables that will affect how the application runs -or how it is accessed. Often, these changes are not visible to the -current PowerShell session. This means the user needs to open a new -PowerShell session before these settings take effect which can render -the installed application nonfunctional until that time. - -Use the Update-SessionEnvironment command to refresh the current -PowerShell session with all environment settings possibly performed by -Chocolatey package installs. - -.NOTES -This method is also added to the user's PowerShell profile as -`refreshenv`. When called as `refreshenv`, the method will provide -additional output. - -Preserves `PSModulePath` as set by the process. - -.INPUTS -None - -.OUTPUTS -None -#> - - Write-FunctionCallLogMessage -Invocation $MyInvocation -Parameters $PSBoundParameters - - $refreshEnv = $false - $invocation = $MyInvocation - if ($invocation.InvocationName -eq 'refreshenv') { - $refreshEnv = $true - } - - if ($refreshEnv) { - Write-Output 'Refreshing environment variables from the registry for powershell.exe. Please wait...' - } - else { - Write-Verbose 'Refreshing environment variables from the registry.' - } - - $userName = $env:USERNAME - $architecture = $env:PROCESSOR_ARCHITECTURE - $psModulePath = $env:PSModulePath - - #ordering is important here, $user should override $machine... - $ScopeList = 'Process', 'Machine' - if ('SYSTEM', "${env:COMPUTERNAME}`$" -notcontains $userName) { - # but only if not running as the SYSTEM/machine in which case user can be ignored. - $ScopeList += 'User' - } - foreach ($Scope in $ScopeList) { - Get-EnvironmentVariableNames -Scope $Scope | - ForEach-Object { - Set-Item "Env:$_" -Value (Get-EnvironmentVariable -Scope $Scope -Name $_) - } - } - - #Path gets special treatment b/c it munges the two together - $paths = 'Machine', 'User' | - ForEach-Object { - (Get-EnvironmentVariable -Name 'PATH' -Scope $_) -split ';' - } | - Select-Object -Unique - $Env:PATH = $paths -join ';' - - # PSModulePath is almost always updated by process, so we want to preserve it. - $env:PSModulePath = $psModulePath - - # reset user and architecture - if ($userName) { - $env:USERNAME = $userName; - } - if ($architecture) { - $env:PROCESSOR_ARCHITECTURE = $architecture; - } - - if ($refreshEnv) { - Write-Output 'Finished' - } -} - -Set-Alias refreshenv Update-SessionEnvironment diff --git a/src/chocolatey.resources/helpers/functions/Write-FunctionCallLogMessage.ps1 b/src/chocolatey.resources/helpers/functions/Write-FunctionCallLogMessage.ps1 index d5eb6638fa..5fa5e1db21 100644 --- a/src/chocolatey.resources/helpers/functions/Write-FunctionCallLogMessage.ps1 +++ b/src/chocolatey.resources/helpers/functions/Write-FunctionCallLogMessage.ps1 @@ -68,3 +68,215 @@ Write-FunctionCallLogMessage -Invocation $MyInvocation -Parameters $PSBoundParam Write-Debug "Running $($invocation.InvocationName) $argumentsPassed" } + +# SIG # Begin signature block +# MIInKwYJKoZIhvcNAQcCoIInHDCCJxgCAQExDzANBglghkgBZQMEAgEFADB5Bgor +# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBmZ9hx8t9mbor1 +# 2HZLgl2t3ra4kkPVN3xJvHZiNfftoKCCIK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Bgkq +# hkiG9w0BCQQxIgQgjujDUsym96vIW+RzMtDYviZeLE5qPc7DX4KgzkYxGtswDQYJ +# KoZIhvcNAQEBBQAEggIAAhzpaqFJtE9wj2ahWYrytW1BXabvKnFowJyUgAtWfYVh +# 53R+9PU9kjNbxj90axp4Zlle6GTfD/2uEUAAJHZlEvr2BCbkYRmK5o5PJuUt6Hpq +# 3sTRARPQsHo1kioAtO0ux6b+znWxJFcqzzk8nBKJaNbvni6D7yoficfq8DWJGzV0 +# UygeMhylgsGf4WpfgqwvECm8tPT66gxBD+1m/LWRq/4r4kxxOjbl6wzrrcbAhN/w +# VuogDLXXft01HMZwLRRXubZULggpB+O/tONzUbu/rGEceiJM+SmKl3+dT1BRFrnh +# QPX47mp9dFnuEGt0bBs1CSGRL9nylVgslfmgmtXxDOxRB42rJv4+O/jhtWxVQ1n0 +# YGtNqrTvk0mE1Y2qNOPT8xb/BloDVoRQVmIkJ+nTj0UHg1zXWNvDhrVWYDSjxxEM +# fGXWthq+eHzJ/SC/WCK1QQagKhk4HAL5rdcCfZDAs4B0fAQ3DyDo681zK52Lzqqc +# xshLdova6dIGDeBnPiQmIzCkJ8M1RDpwmJdLtgz8eCv+UCHEjUfNGiAniMygIUM5 +# wBBN0wv/CBdTjHps/j34CuhenbwwqpEUwGka9eyv2cG6afDjkk8cyiAF4XcQsgtf +# i2LOqOJ76fczdFL8xza6wXkrcpefFK5zQ87ez8ord1HRvgs9UtgFOiDpHAKFFwY= +# SIG # End signature block diff --git a/src/chocolatey.sln b/src/chocolatey.sln index c2b6ac88fa..8bbca092e6 100644 --- a/src/chocolatey.sln +++ b/src/chocolatey.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.32901.82 +# Visual Studio Version 17 +VisualStudioVersion = 17.8.34330.188 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "chocolatey.console", "chocolatey.console\chocolatey.console.csproj", "{E24E3386-244F-4404-9E6E-5B53818EA903}" EndProject @@ -54,6 +54,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "chocolatey", "chocolatey", EndProject Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "chocolatey.install", "chocolatey.install\chocolatey.install.wixproj", "{6B96B4AE-8FD2-4719-AAFB-BA027B798089}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Chocolatey.PowerShell", "Chocolatey.PowerShell\Chocolatey.PowerShell.csproj", "{88396C46-8089-4814-A7D1-E18777FF6083}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -240,6 +242,42 @@ Global {6B96B4AE-8FD2-4719-AAFB-BA027B798089}.WIX|Mixed Platforms.Build.0 = WIX|x86 {6B96B4AE-8FD2-4719-AAFB-BA027B798089}.WIX|x86.ActiveCfg = WIX|x86 {6B96B4AE-8FD2-4719-AAFB-BA027B798089}.WIX|x86.Build.0 = WIX|x86 + {88396C46-8089-4814-A7D1-E18777FF6083}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {88396C46-8089-4814-A7D1-E18777FF6083}.Debug|Any CPU.Build.0 = Debug|Any CPU + {88396C46-8089-4814-A7D1-E18777FF6083}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {88396C46-8089-4814-A7D1-E18777FF6083}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {88396C46-8089-4814-A7D1-E18777FF6083}.Debug|x86.ActiveCfg = Debug|Any CPU + {88396C46-8089-4814-A7D1-E18777FF6083}.Debug|x86.Build.0 = Debug|Any CPU + {88396C46-8089-4814-A7D1-E18777FF6083}.NoResources|Any CPU.ActiveCfg = Debug|Any CPU + {88396C46-8089-4814-A7D1-E18777FF6083}.NoResources|Any CPU.Build.0 = Debug|Any CPU + {88396C46-8089-4814-A7D1-E18777FF6083}.NoResources|Mixed Platforms.ActiveCfg = Debug|Any CPU + {88396C46-8089-4814-A7D1-E18777FF6083}.NoResources|Mixed Platforms.Build.0 = Debug|Any CPU + {88396C46-8089-4814-A7D1-E18777FF6083}.NoResources|x86.ActiveCfg = Debug|Any CPU + {88396C46-8089-4814-A7D1-E18777FF6083}.NoResources|x86.Build.0 = Debug|Any CPU + {88396C46-8089-4814-A7D1-E18777FF6083}.Release|Any CPU.ActiveCfg = Release|Any CPU + {88396C46-8089-4814-A7D1-E18777FF6083}.Release|Any CPU.Build.0 = Release|Any CPU + {88396C46-8089-4814-A7D1-E18777FF6083}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {88396C46-8089-4814-A7D1-E18777FF6083}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {88396C46-8089-4814-A7D1-E18777FF6083}.Release|x86.ActiveCfg = Release|Any CPU + {88396C46-8089-4814-A7D1-E18777FF6083}.Release|x86.Build.0 = Release|Any CPU + {88396C46-8089-4814-A7D1-E18777FF6083}.ReleaseOfficial|Any CPU.ActiveCfg = ReleaseOfficial|Any CPU + {88396C46-8089-4814-A7D1-E18777FF6083}.ReleaseOfficial|Any CPU.Build.0 = ReleaseOfficial|Any CPU + {88396C46-8089-4814-A7D1-E18777FF6083}.ReleaseOfficial|Mixed Platforms.ActiveCfg = ReleaseOfficial|Any CPU + {88396C46-8089-4814-A7D1-E18777FF6083}.ReleaseOfficial|Mixed Platforms.Build.0 = ReleaseOfficial|Any CPU + {88396C46-8089-4814-A7D1-E18777FF6083}.ReleaseOfficial|x86.ActiveCfg = ReleaseOfficial|Any CPU + {88396C46-8089-4814-A7D1-E18777FF6083}.ReleaseOfficial|x86.Build.0 = ReleaseOfficial|Any CPU + {88396C46-8089-4814-A7D1-E18777FF6083}.ReleaseOfficialNo7zip|Any CPU.ActiveCfg = ReleaseOfficial|Any CPU + {88396C46-8089-4814-A7D1-E18777FF6083}.ReleaseOfficialNo7zip|Any CPU.Build.0 = ReleaseOfficial|Any CPU + {88396C46-8089-4814-A7D1-E18777FF6083}.ReleaseOfficialNo7zip|Mixed Platforms.ActiveCfg = ReleaseOfficial|Any CPU + {88396C46-8089-4814-A7D1-E18777FF6083}.ReleaseOfficialNo7zip|Mixed Platforms.Build.0 = ReleaseOfficial|Any CPU + {88396C46-8089-4814-A7D1-E18777FF6083}.ReleaseOfficialNo7zip|x86.ActiveCfg = ReleaseOfficial|Any CPU + {88396C46-8089-4814-A7D1-E18777FF6083}.ReleaseOfficialNo7zip|x86.Build.0 = ReleaseOfficial|Any CPU + {88396C46-8089-4814-A7D1-E18777FF6083}.WIX|Any CPU.ActiveCfg = Debug|Any CPU + {88396C46-8089-4814-A7D1-E18777FF6083}.WIX|Any CPU.Build.0 = Debug|Any CPU + {88396C46-8089-4814-A7D1-E18777FF6083}.WIX|Mixed Platforms.ActiveCfg = Debug|Any CPU + {88396C46-8089-4814-A7D1-E18777FF6083}.WIX|Mixed Platforms.Build.0 = Debug|Any CPU + {88396C46-8089-4814-A7D1-E18777FF6083}.WIX|x86.ActiveCfg = Debug|Any CPU + {88396C46-8089-4814-A7D1-E18777FF6083}.WIX|x86.Build.0 = Debug|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/chocolatey.tests.integration/MockEventSubscriptionManager.cs b/src/chocolatey.tests.integration/MockEventSubscriptionManager.cs index b5bf610773..6a57914ed1 100644 --- a/src/chocolatey.tests.integration/MockEventSubscriptionManager.cs +++ b/src/chocolatey.tests.integration/MockEventSubscriptionManager.cs @@ -14,16 +14,16 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Reactive.Subjects; +using chocolatey.infrastructure.events; +using chocolatey.infrastructure.services; +using Moq; + namespace chocolatey.tests.integration { - using System; - using System.Collections.Concurrent; - using System.Collections.Generic; - using System.Reactive.Subjects; - using chocolatey.infrastructure.events; - using chocolatey.infrastructure.services; - using Moq; - public class MockEventSubscriptionManager : Mock, IEventSubscriptionManagerService { private readonly Lazy>> _messages = new Lazy>>(); @@ -45,7 +45,7 @@ public IDisposable Subscribe(Action handleEvent, Action return new Subject(); } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public void publish(Event eventMessage) where Event : class, IMessage => Publish(eventMessage); @@ -53,6 +53,6 @@ public void publish(Event eventMessage) where Event : class, IMessage [Obsolete("This overload is deprecated and will be removed in v3.")] public IDisposable subscribe(Action handleEvent, Action handleError, Func filter) where Event : class, IMessage => Subscribe(handleEvent, handleError, filter); -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 } } diff --git a/src/chocolatey.tests.integration/NUnitSetup.cs b/src/chocolatey.tests.integration/NUnitSetup.cs index 73f9b71144..81697951b2 100644 --- a/src/chocolatey.tests.integration/NUnitSetup.cs +++ b/src/chocolatey.tests.integration/NUnitSetup.cs @@ -14,27 +14,26 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Threading; +using chocolatey.infrastructure.app; +using chocolatey.infrastructure.app.builders; +using chocolatey.infrastructure.app.commands; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.filesystem; +using chocolatey.infrastructure.licensing; +using chocolatey.infrastructure.platforms; +using chocolatey.infrastructure.registration; +using NUnit.Framework; +using SimpleInjector; [assembly: chocolatey.tests.Categories.Integration] namespace chocolatey.tests.integration { - using System; - using System.Collections.Generic; - using System.IO; - using System.Linq; - using System.Reflection; - using System.Threading; - using chocolatey.infrastructure.app; - using chocolatey.infrastructure.app.builders; - using chocolatey.infrastructure.app.commands; - using chocolatey.infrastructure.app.configuration; - using chocolatey.infrastructure.filesystem; - using chocolatey.infrastructure.licensing; - using chocolatey.infrastructure.platforms; - using chocolatey.infrastructure.registration; - using NUnit.Framework; - using SimpleInjector; - // ReSharper disable InconsistentNaming [SetUpFixture] diff --git a/src/chocolatey.tests.integration/Scenario.cs b/src/chocolatey.tests.integration/Scenario.cs index f962ed1e7e..0cbd200f79 100644 --- a/src/chocolatey.tests.integration/Scenario.cs +++ b/src/chocolatey.tests.integration/Scenario.cs @@ -14,25 +14,25 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.IO; +using System.IO.Compression; +using System.Linq; +using System.Xml.Linq; +using chocolatey.infrastructure.app; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.domain; +using chocolatey.infrastructure.app.services; +using chocolatey.infrastructure.commands; +using chocolatey.infrastructure.filesystem; +using chocolatey.infrastructure.guards; +using chocolatey.infrastructure.platforms; +using NuGet.Configuration; +using NuGet.Packaging; + namespace chocolatey.tests.integration { - using System; - using System.Collections.Generic; - using System.IO; - using System.IO.Compression; - using System.Linq; - using System.Xml.Linq; - using chocolatey.infrastructure.app; - using chocolatey.infrastructure.app.configuration; - using chocolatey.infrastructure.app.domain; - using chocolatey.infrastructure.app.services; - using chocolatey.infrastructure.commands; - using chocolatey.infrastructure.filesystem; - using chocolatey.infrastructure.guards; - using chocolatey.infrastructure.platforms; - using NuGet.Configuration; - using NuGet.Packaging; - public class Scenario { private static IChocolateyPackageService _service; @@ -56,11 +56,11 @@ public static IEnumerable GetInstalledPackagePaths() public static void Reset(ChocolateyConfiguration config) { - string packagesInstallPath = GetPackageInstallPath(); - string badPackagesPath = GetPackageInstallPath() + "-bad"; - string backupPackagesPath = GetPackageInstallPath() + "-bkp"; - string shimsPath = ApplicationParameters.ShimsLocation; - string hooksPath = ApplicationParameters.HooksLocation; + var packagesInstallPath = GetPackageInstallPath(); + var badPackagesPath = GetPackageInstallPath() + "-bad"; + var backupPackagesPath = GetPackageInstallPath() + "-bkp"; + var shimsPath = ApplicationParameters.ShimsLocation; + var hooksPath = ApplicationParameters.HooksLocation; _fileSystem.DeleteDirectoryChecked(config.CacheLocation, recursive: true, overrideAttributes: true); _fileSystem.DeleteDirectoryChecked(config.Sources, recursive: true, overrideAttributes: true); diff --git a/src/chocolatey.tests.integration/infrastructure.app/builders/ConfigurationBuilderSpecs.cs b/src/chocolatey.tests.integration/infrastructure.app/builders/ConfigurationBuilderSpecs.cs index 5ae1872b49..cf4c45665a 100644 --- a/src/chocolatey.tests.integration/infrastructure.app/builders/ConfigurationBuilderSpecs.cs +++ b/src/chocolatey.tests.integration/infrastructure.app/builders/ConfigurationBuilderSpecs.cs @@ -14,27 +14,27 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Configuration; +using chocolatey.infrastructure.adapters; +using chocolatey.infrastructure.app; +using ConfigurationBuilder = chocolatey.infrastructure.app.builders.ConfigurationBuilder; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.domain; +using chocolatey.infrastructure.app.services; +using chocolatey.infrastructure.licensing; +using Moq; +using NUnit.Framework; +using Container = SimpleInjector.Container; +using License = System.ComponentModel.License; +using chocolatey.infrastructure.registration; +using Microsoft.Win32; +using chocolatey.tests.integration.scenarios; +using FluentAssertions; + namespace chocolatey.tests.integration.infrastructure.app.builders { - using System; - using System.Collections.Generic; - using System.Configuration; - using chocolatey.infrastructure.adapters; - using chocolatey.infrastructure.app; - using ConfigurationBuilder = chocolatey.infrastructure.app.builders.ConfigurationBuilder; - using chocolatey.infrastructure.app.configuration; - using chocolatey.infrastructure.app.domain; - using chocolatey.infrastructure.app.services; - using chocolatey.infrastructure.licensing; - using Moq; - using NUnit.Framework; - using Container = SimpleInjector.Container; - using License = System.ComponentModel.License; - using chocolatey.infrastructure.registration; - using Microsoft.Win32; - using scenarios; - using FluentAssertions; - public class ConfigurationBuilderSpecs { private const string IgnoreSystemProxyReason = "System Proxy not mockable"; @@ -104,7 +104,7 @@ public override void Because() [TestFixture(false, false, false, true, TestName = "Argument Set")] public class WhenProxyConfigurationTests : ProxyConfigurationBase { - public WhenProxyConfigurationTests(bool system, bool environment, bool config, bool argument) : base(system, environment, config, argument) {} + public WhenProxyConfigurationTests(bool system, bool environment, bool config, bool argument) : base(system, environment, config, argument) { } public override void Context() { base.Context(); diff --git a/src/chocolatey.tests.integration/infrastructure.app/services/FilesServiceSpecs.cs b/src/chocolatey.tests.integration/infrastructure.app/services/FilesServiceSpecs.cs index 65c37ccd95..a0301aa684 100644 --- a/src/chocolatey.tests.integration/infrastructure.app/services/FilesServiceSpecs.cs +++ b/src/chocolatey.tests.integration/infrastructure.app/services/FilesServiceSpecs.cs @@ -14,23 +14,23 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.IO; +using System.Linq; +using chocolatey.infrastructure.app; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.domain; +using chocolatey.infrastructure.app.services; +using chocolatey.infrastructure.cryptography; +using chocolatey.infrastructure.filesystem; +using chocolatey.infrastructure.results; +using chocolatey.infrastructure.services; +using Moq; +using NUnit.Framework; +using FluentAssertions; + namespace chocolatey.tests.integration.infrastructure.app.services { - using System; - using System.IO; - using System.Linq; - using chocolatey.infrastructure.app; - using chocolatey.infrastructure.app.configuration; - using chocolatey.infrastructure.app.domain; - using chocolatey.infrastructure.app.services; - using chocolatey.infrastructure.cryptography; - using chocolatey.infrastructure.filesystem; - using chocolatey.infrastructure.results; - using chocolatey.infrastructure.services; - using Moq; - using NUnit.Framework; - using FluentAssertions; - public class FilesServiceSpecs { public abstract class FilesServiceSpecsBase : TinySpec diff --git a/src/chocolatey.tests.integration/infrastructure/commands/CommandExecutorSpecs.cs b/src/chocolatey.tests.integration/infrastructure/commands/CommandExecutorSpecs.cs index 88f0559571..faf24515ac 100644 --- a/src/chocolatey.tests.integration/infrastructure/commands/CommandExecutorSpecs.cs +++ b/src/chocolatey.tests.integration/infrastructure/commands/CommandExecutorSpecs.cs @@ -14,15 +14,15 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using chocolatey.infrastructure.app; +using chocolatey.infrastructure.commands; +using chocolatey.infrastructure.filesystem; +using NUnit.Framework; +using FluentAssertions; + namespace chocolatey.tests.integration.infrastructure.commands { - using System; - using chocolatey.infrastructure.app; - using chocolatey.infrastructure.commands; - using chocolatey.infrastructure.filesystem; - using NUnit.Framework; - using FluentAssertions; - public class CommandExecutorSpecs { public abstract class CommandExecutorSpecsBase : TinySpec diff --git a/src/chocolatey.tests.integration/infrastructure/cryptography/CryptoHashProviderSpecs.cs b/src/chocolatey.tests.integration/infrastructure/cryptography/CryptoHashProviderSpecs.cs index 8f601520d5..d44690d1e2 100644 --- a/src/chocolatey.tests.integration/infrastructure/cryptography/CryptoHashProviderSpecs.cs +++ b/src/chocolatey.tests.integration/infrastructure/cryptography/CryptoHashProviderSpecs.cs @@ -14,15 +14,15 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.IO; +using System.Security.Cryptography; +using chocolatey.infrastructure.cryptography; +using chocolatey.infrastructure.filesystem; +using FluentAssertions; + namespace chocolatey.tests.integration.infrastructure.cryptography { - using System; - using System.IO; - using System.Security.Cryptography; - using chocolatey.infrastructure.cryptography; - using chocolatey.infrastructure.filesystem; - using FluentAssertions; - public class CryptoHashProviderSpecs { public abstract class CryptoHashProviderSpecsBase : TinySpec diff --git a/src/chocolatey.tests.integration/infrastructure/filesystem/DotNetFileSystemSpecs.cs b/src/chocolatey.tests.integration/infrastructure/filesystem/DotNetFileSystemSpecs.cs index af2d2f778a..84bf2398c8 100644 --- a/src/chocolatey.tests.integration/infrastructure/filesystem/DotNetFileSystemSpecs.cs +++ b/src/chocolatey.tests.integration/infrastructure/filesystem/DotNetFileSystemSpecs.cs @@ -14,17 +14,17 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.IO; +using System.Linq; +using chocolatey.infrastructure.filesystem; +using chocolatey.infrastructure.platforms; +using NUnit.Framework; +using FluentAssertions; +using FluentAssertions.Extensions; + namespace chocolatey.tests.integration.infrastructure.filesystem { - using System; - using System.IO; - using System.Linq; - using chocolatey.infrastructure.filesystem; - using chocolatey.infrastructure.platforms; - using NUnit.Framework; - using FluentAssertions; - using FluentAssertions.Extensions; - public class DotNetFileSystemSpecs { public abstract class DotNetFileSystemSpecsBase : TinySpec @@ -125,7 +125,7 @@ public void GetFiles_should_return_string_array_of_files() [Fact] public void GetFiles_should_return_files_that_meet_the_pattern() { - string filePath = FileSystem.CombinePaths(ContextPath, "chocolateyInstall.ps1"); + var filePath = FileSystem.CombinePaths(ContextPath, "chocolateyInstall.ps1"); FileSystem.WriteFile(filePath, "yo"); var actual = FileSystem.GetFiles(ContextPath, "chocolateyInstall.ps1", SearchOption.AllDirectories).ToList(); @@ -139,7 +139,7 @@ public void GetFiles_should_return_files_that_meet_the_pattern() [Platform(Exclude = "Mono")] public void GetFiles_should_return_files_that_meet_the_pattern_regardless_of_case() { - string filePath = FileSystem.CombinePaths(ContextPath, "chocolateyInstall.ps1"); + var filePath = FileSystem.CombinePaths(ContextPath, "chocolateyInstall.ps1"); FileSystem.WriteFile(filePath, "yo"); var actual = FileSystem.GetFiles(ContextPath, "chocolateyinstall.ps1", SearchOption.AllDirectories).ToList(); diff --git a/src/chocolatey.tests.integration/scenarios/InfoScenarios.cs b/src/chocolatey.tests.integration/scenarios/InfoScenarios.cs index d55561d026..249978a73b 100644 --- a/src/chocolatey.tests.integration/scenarios/InfoScenarios.cs +++ b/src/chocolatey.tests.integration/scenarios/InfoScenarios.cs @@ -1,25 +1,25 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Text; +using chocolatey.infrastructure.app.commands; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.services; +using chocolatey.infrastructure.commands; +using chocolatey.infrastructure.platforms; +using chocolatey.infrastructure.results; + +using NuGet; +using NuGet.Configuration; + +using NUnit.Framework; + +using FluentAssertions; + namespace chocolatey.tests.integration.scenarios { - using System; - using System.Collections.Generic; - using System.IO; - using System.Linq; - using System.Reflection; - using System.Text; - using chocolatey.infrastructure.app.commands; - using chocolatey.infrastructure.app.configuration; - using chocolatey.infrastructure.app.services; - using chocolatey.infrastructure.commands; - using chocolatey.infrastructure.platforms; - using chocolatey.infrastructure.results; - - using NuGet; - using NuGet.Configuration; - - using NUnit.Framework; - - using FluentAssertions; - public class InfoScenarios { [ConcernFor("info")] @@ -398,7 +398,7 @@ public void Should_set_source_to_expected_value() { Results[0].Source.Should().Be( ((Platform.GetPlatform() == PlatformType.Windows ? "file:///" : "file://") + Path.Combine(Environment.CurrentDirectory, "PackageOutput")) - .Replace("\\","/")); + .Replace("\\", "/")); } [Fact] @@ -422,7 +422,7 @@ public override void Context() [Fact] public void Should_show_only_one_result() { - Results.Should().ContainSingle( "Expected 1 package to be returned!"); + Results.Should().ContainSingle("Expected 1 package to be returned!"); } [Fact] @@ -478,7 +478,7 @@ public override void Context() [Fact] public void Should_show_only_one_result() { - Results.Should().ContainSingle( "Expected 1 package to be returned!"); + Results.Should().ContainSingle("Expected 1 package to be returned!"); } [Fact] diff --git a/src/chocolatey.tests.integration/scenarios/InstallScenarios.cs b/src/chocolatey.tests.integration/scenarios/InstallScenarios.cs index 53f21c6f44..12f962a417 100644 --- a/src/chocolatey.tests.integration/scenarios/InstallScenarios.cs +++ b/src/chocolatey.tests.integration/scenarios/InstallScenarios.cs @@ -14,28 +14,29 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Xml.XPath; +using chocolatey.infrastructure.app; +using chocolatey.infrastructure.app.commands; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.services; +using chocolatey.infrastructure.commands; +using chocolatey.infrastructure.results; +using NuGet.Configuration; +using NuGet.Packaging; +using NUnit.Framework; +using FluentAssertions; +using FluentAssertions.Execution; +using IFileSystem = chocolatey.infrastructure.filesystem.IFileSystem; + namespace chocolatey.tests.integration.scenarios { - using System; - using System.Collections; - using System.Collections.Concurrent; - using System.Collections.Generic; - using System.IO; - using System.Linq; - using System.Text; - using System.Xml.XPath; - using chocolatey.infrastructure.app.commands; - using chocolatey.infrastructure.app.configuration; - using chocolatey.infrastructure.app.services; - using chocolatey.infrastructure.commands; - using chocolatey.infrastructure.results; - using NuGet.Configuration; - using NuGet.Packaging; - using NUnit.Framework; - using FluentAssertions; - using FluentAssertions.Execution; - using IFileSystem = chocolatey.infrastructure.filesystem.IFileSystem; - public class InstallScenarios { [ConcernFor("install")] @@ -149,7 +150,13 @@ public class When_installing_a_package_happy_path : ScenariosBase { private PackageResult _packageResult; - protected virtual string TestSemVersion => "1.0.0"; + protected virtual string TestSemVersion + { + get + { + return "1.0.0"; + } + } public override void Context() { @@ -323,6 +330,28 @@ public void Should_have_a_version_of_one_dot_zero_dot_zero() _packageResult.Version.Should().Be(TestVersion()); } + [Fact] + public void Should_contain_message_with_source() + { + var message = "Downloading package from source '{0}'".FormatWith(Configuration.Sources); + + MockLogger.Messages.Should().ContainKey(LogLevel.Info.ToString()).WhoseValue.Should() + .Contain(message); + } + + [Fact] + [WindowsOnly] + [Platform(Exclude = "Mono")] + public void Should_contain_message_with_download_uri() + { + var packagePath = "file:///{0}/{1}.{2}{3}".FormatWith(Configuration.Sources.Replace("\\","/"), Configuration.PackageNames, + TestVersion(), NuGetConstants.PackageExtension); + var message = "Package download location '{0}'".FormatWith(packagePath); + + MockLogger.Messages.Should().ContainKey(LogLevel.Debug.ToString()).WhoseValue.Should() + .Contain(message); + } + [Fact] [WindowsOnly] [Platform(Exclude = "Mono")] @@ -351,13 +380,25 @@ protected string TestVersion() [Categories.SemVer20] public class When_installing_a_package_with_semver_2_0_meta_data : When_installing_a_package_happy_path { - protected override string TestSemVersion => "0.9.9+build.543"; + protected override string TestSemVersion + { + get + { + return "0.9.9+build.543"; + } + } } [Categories.SemVer20] public class When_installing_a_package_with_semver_2_0_pre_release_tag : When_installing_a_package_happy_path { - protected override string TestSemVersion => "1.0.0-alpha.34"; + protected override string TestSemVersion + { + get + { + return "1.0.0-alpha.34"; + } + } } public class When_installing_packages_with_packages_config : ScenariosBase @@ -383,7 +424,10 @@ public void Should_install_where_install_location_reports() { foreach (var packageResult in Results) { - if (packageResult.Value.Name.IsEqualTo("missingpackage")) continue; + if (packageResult.Value.Name.IsEqualTo("missingpackage")) + { + continue; + } DirectoryAssert.Exists(packageResult.Value.InstallLocation); } @@ -3010,7 +3054,7 @@ public void Should_create_a_hooks_folder_for_the_package() public void Should_install_hook_scripts_to_folder() { var hookScripts = new List { "pre-install-all.ps1", "post-install-all.ps1", "pre-upgrade-all.ps1", "post-upgrade-all.ps1", "pre-uninstall-all.ps1", "post-uninstall-all.ps1" }; - foreach (string scriptName in hookScripts) + foreach (var scriptName in hookScripts) { var hookScriptPath = Path.Combine(Scenario.GetTopLevel(), "hooks", Configuration.PackageNames.Replace(".hook", string.Empty), scriptName); File.ReadAllText(hookScriptPath).Should().Contain("Write-Output"); @@ -4166,8 +4210,21 @@ public class When_installing_a_package_with_non_normalized_version : ScenariosBa { private PackageResult _packageResult; - protected virtual string NonNormalizedVersion => "2.02.0.0"; - protected virtual string NormalizedVersion => "2.2.0"; + protected virtual string NonNormalizedVersion + { + get + { + return "2.02.0.0"; + } + } + + protected virtual string NormalizedVersion + { + get + { + return "2.2.0"; + } + } public override void Context() { @@ -4351,8 +4408,21 @@ public void Should_have_a_graphical_shim_that_is_set_for_gui_access() public class When_installing_a_package_specifying_normalized_version : When_installing_a_package_with_non_normalized_version { - protected override string NormalizedVersion => "2.2.0"; - protected override string NonNormalizedVersion => "2.02.0.0"; + protected override string NormalizedVersion + { + get + { + return "2.2.0"; + } + } + + protected override string NonNormalizedVersion + { + get + { + return "2.02.0.0"; + } + } public override void Context() { @@ -4363,8 +4433,21 @@ public override void Context() public class When_installing_a_package_specifying_non_normalized_version : When_installing_a_package_with_non_normalized_version { - protected override string NormalizedVersion => "2.2.0"; - protected override string NonNormalizedVersion => "2.02.0.0"; + protected override string NormalizedVersion + { + get + { + return "2.2.0"; + } + } + + protected override string NonNormalizedVersion + { + get + { + return "2.02.0.0"; + } + } public override void Context() { @@ -4375,14 +4458,40 @@ public override void Context() public class When_installing_a_package_with_multiple_leading_zeros : When_installing_a_package_with_non_normalized_version { - protected override string NormalizedVersion => "4.4.5.1"; - protected override string NonNormalizedVersion => "0004.0004.00005.01"; + protected override string NormalizedVersion + { + get + { + return "4.4.5.1"; + } + } + + protected override string NonNormalizedVersion + { + get + { + return "0004.0004.00005.01"; + } + } } public class When_installing_a_package_with_multiple_leading_zeros_specifying_normalized_version : When_installing_a_package_with_non_normalized_version { - protected override string NormalizedVersion => "4.4.5.1" ; - protected override string NonNormalizedVersion => "0004.0004.00005.01"; + protected override string NormalizedVersion + { + get + { + return "4.4.5.1"; + } + } + + protected override string NonNormalizedVersion + { + get + { + return "0004.0004.00005.01"; + } + } public override void Context() { @@ -4393,8 +4502,21 @@ public override void Context() public class When_installing_a_package_with_multiple_leading_zeros_specifying_non_normalized_version : When_installing_a_package_with_non_normalized_version { - protected override string NormalizedVersion => "4.4.5.1"; - protected override string NonNormalizedVersion => "0004.0004.00005.01"; + protected override string NormalizedVersion + { + get + { + return "4.4.5.1"; + } + } + + protected override string NonNormalizedVersion + { + get + { + return "0004.0004.00005.01"; + } + } public override void Context() { @@ -4496,5 +4618,52 @@ public void Should_not_have_warning_package_result() Results.Should().AllSatisfy(r => r.Value.Warning.Should().BeFalse()); } } + + public class When_installing_all_packages_from_ccr : ScenariosBase + { + public override void Context() + { + base.Context(); + Configuration.PackageNames = Configuration.Input = "all"; + Configuration.Sources = ApplicationParameters.ChocolateyCommunityFeedSource; + } + + public override void Because() + { + } + + [Fact] + public void Should_throw_an_error_that_it_is_not_allowed() + { + Action m = () => Service.Install(Configuration); ; + + m.Should().Throw(); + } + } + + public class When_installing_all_packages_from_local_source : ScenariosBase + { + public override void Context() + { + base.Context(); + Configuration.PackageNames = Configuration.Input = "all"; + + Scenario.AddPackagesToSourceLocation(Configuration, "hasdependency.1.0.0*" + NuGetConstants.PackageExtension); + Scenario.AddPackagesToSourceLocation(Configuration, "isdependency.1.0.0*" + NuGetConstants.PackageExtension); + Scenario.AddPackagesToSourceLocation(Configuration, "isexactversiondependency*" + NuGetConstants.PackageExtension); + Scenario.AddPackagesToSourceLocation(Configuration, "upgradepackage*" + NuGetConstants.PackageExtension); + } + + public override void Because() + { + Results = Service.Install(Configuration); + } + + [Fact] + public void Should_install_all_packages() + { + Results.Should().HaveCount(6); + } + } } } diff --git a/src/chocolatey.tests.integration/scenarios/ListScenarios.cs b/src/chocolatey.tests.integration/scenarios/ListScenarios.cs index ab016df449..d00930ddd8 100644 --- a/src/chocolatey.tests.integration/scenarios/ListScenarios.cs +++ b/src/chocolatey.tests.integration/scenarios/ListScenarios.cs @@ -13,17 +13,18 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System.Collections.Generic; +using System.Linq; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.services; +using chocolatey.infrastructure.results; +using NuGet.Configuration; +using FluentAssertions; +using FluentAssertions.Execution; +using NUnit.Framework; + namespace chocolatey.tests.integration.scenarios { - using System.Collections.Generic; - using System.Linq; - using chocolatey.infrastructure.app.configuration; - using chocolatey.infrastructure.app.services; - using chocolatey.infrastructure.results; - using NuGet.Configuration; - using FluentAssertions; - using FluentAssertions.Execution; - public class ListScenarios { [ConcernFor("list")] @@ -140,7 +141,10 @@ public void Should_contain_packages_and_versions_with_a_pipe_between_them() MockLogger.ContainsMessage("upgradepackage|1.0.0").Should().BeTrue(); } + // Windows only because decryption fallback on Mac/Linux logs a message [Fact] + [WindowsOnly] + [Platform(Exclude = "Mono")] public void Should_only_have_messages_related_to_package_information() { MockLogger.Messages.Should() diff --git a/src/chocolatey.tests.integration/scenarios/PackScenarios.cs b/src/chocolatey.tests.integration/scenarios/PackScenarios.cs index eccf2ceaae..63c12121de 100644 --- a/src/chocolatey.tests.integration/scenarios/PackScenarios.cs +++ b/src/chocolatey.tests.integration/scenarios/PackScenarios.cs @@ -14,23 +14,23 @@ // See the License for the specific language governing permissions and // limitations under the License. -namespace chocolatey.tests.integration.scenarios -{ - using System; - using System.IO; - using System.Xml; +using System; +using System.IO; +using System.Xml; - using chocolatey.infrastructure.app.commands; - using chocolatey.infrastructure.app.configuration; - using chocolatey.infrastructure.app.services; +using chocolatey.infrastructure.app.commands; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.services; - using NuGet.Packaging; +using NuGet.Packaging; - using NUnit.Framework; +using NUnit.Framework; - using FluentAssertions; - using FluentAssertions.Execution; +using FluentAssertions; +using FluentAssertions.Execution; +namespace chocolatey.tests.integration.scenarios +{ public class PackScenarios { [ConcernFor("pack")] @@ -122,7 +122,13 @@ protected virtual string PackagePath protected abstract string ExpectedNuspecVersion { get; } - protected virtual string ExpectedPathVersion => ExpectedNuspecVersion; + protected virtual string ExpectedPathVersion + { + get + { + return ExpectedNuspecVersion; + } + } protected virtual string ExpectedSubDirectory { get; } = string.Empty; @@ -198,7 +204,13 @@ protected virtual string GetNuspecContent() public class When_packing_without_specifying_an_output_directory : ScenariosBase { - protected override string ExpectedNuspecVersion => "0.1.0"; + protected override string ExpectedNuspecVersion + { + get + { + return "0.1.0"; + } + } public override void Because() { @@ -209,8 +221,21 @@ public override void Because() public class When_packing_with_an_output_directory : ScenariosBase { - protected override string ExpectedNuspecVersion => "0.1.0"; - protected override string ExpectedSubDirectory => "PackageOutput"; + protected override string ExpectedNuspecVersion + { + get + { + return "0.1.0"; + } + } + + protected override string ExpectedSubDirectory + { + get + { + return "PackageOutput"; + } + } public override void Because() { @@ -222,9 +247,29 @@ public override void Because() [Categories.LegacySemVer] public class When_packing_with_only_major_minor_version : ScenariosBase { - protected override string PackagePath => Path.Combine("PackageOutput", "test-package.0.3.0.nupkg"); - protected override string ExpectedNuspecVersion => "0.3.0"; - protected override string ExpectedSubDirectory => "PackageOutput"; + protected override string PackagePath + { + get + { + return Path.Combine("PackageOutput", "test-package.0.3.0.nupkg"); + } + } + + protected override string ExpectedNuspecVersion + { + get + { + return "0.3.0"; + } + } + + protected override string ExpectedSubDirectory + { + get + { + return "PackageOutput"; + } + } public override void Because() { @@ -241,8 +286,21 @@ protected override string GetNuspecContent() [Categories.LegacySemVer] public class When_packing_with_full_4_part_versioning_scheme : ScenariosBase { - protected override string ExpectedNuspecVersion => "0.5.0.5"; - protected override string ExpectedSubDirectory => "PackageOutput"; + protected override string ExpectedNuspecVersion + { + get + { + return "0.5.0.5"; + } + } + + protected override string ExpectedSubDirectory + { + get + { + return "PackageOutput"; + } + } public override void Because() { @@ -259,9 +317,29 @@ protected override string GetNuspecContent() [Categories.SemVer20] public class When_packaging_with_build_metadata : ScenariosBase { - protected override string ExpectedNuspecVersion => "0.1.0+build.543"; - protected override string ExpectedPathVersion => "0.1.0"; - protected override string ExpectedSubDirectory => "PackageOutput"; + protected override string ExpectedNuspecVersion + { + get + { + return "0.1.0+build.543"; + } + } + + protected override string ExpectedPathVersion + { + get + { + return "0.1.0"; + } + } + + protected override string ExpectedSubDirectory + { + get + { + return "PackageOutput"; + } + } public override void Because() { @@ -278,9 +356,29 @@ protected override string GetNuspecContent() [Categories.SemVer20] public class When_packaging_with_semver_20_pre_release_tag : ScenariosBase { - protected override string ExpectedNuspecVersion => "0.1.0-rc.5+build.999"; - protected override string ExpectedPathVersion => "0.1.0-rc.5"; - protected override string ExpectedSubDirectory => "PackageOutput"; + protected override string ExpectedNuspecVersion + { + get + { + return "0.1.0-rc.5+build.999"; + } + } + + protected override string ExpectedPathVersion + { + get + { + return "0.1.0-rc.5"; + } + } + + protected override string ExpectedSubDirectory + { + get + { + return "PackageOutput"; + } + } public override void Because() { @@ -297,8 +395,21 @@ protected override string GetNuspecContent() [Categories.LegacySemVer] public class When_packaging_with_legacy_pre_release_tag : ScenariosBase { - protected override string ExpectedNuspecVersion => "0.1.0-rc-5"; - protected override string ExpectedSubDirectory => "PackageOutput"; + protected override string ExpectedNuspecVersion + { + get + { + return "0.1.0-rc-5"; + } + } + + protected override string ExpectedSubDirectory + { + get + { + return "PackageOutput"; + } + } public override void Because() { @@ -316,8 +427,21 @@ protected override string GetNuspecContent() public class When_packaging_with_four_part_version_with_trailing_zero : ScenariosBase { private string _originalVersion = "0.1.0.0"; - protected override string ExpectedNuspecVersion => "0.1.0"; - protected override string ExpectedSubDirectory => "PackageOutput"; + protected override string ExpectedNuspecVersion + { + get + { + return "0.1.0"; + } + } + + protected override string ExpectedSubDirectory + { + get + { + return "PackageOutput"; + } + } public override void Because() { @@ -335,8 +459,21 @@ protected override string GetNuspecContent() public class When_packaging_with_leading_zeros_four_part : ScenariosBase { private string _originalVersion = "01.02.03.04"; - protected override string ExpectedNuspecVersion => "1.2.3.4"; - protected override string ExpectedSubDirectory => "PackageOutput"; + protected override string ExpectedNuspecVersion + { + get + { + return "1.2.3.4"; + } + } + + protected override string ExpectedSubDirectory + { + get + { + return "PackageOutput"; + } + } public override void Because() { @@ -354,8 +491,21 @@ protected override string GetNuspecContent() public class When_packaging_with_leading_zeros_three_part : ScenariosBase { private string _originalVersion = "01.02.04"; - protected override string ExpectedNuspecVersion => "1.2.4"; - protected override string ExpectedSubDirectory => "PackageOutput"; + protected override string ExpectedNuspecVersion + { + get + { + return "1.2.4"; + } + } + + protected override string ExpectedSubDirectory + { + get + { + return "PackageOutput"; + } + } public override void Because() { @@ -373,8 +523,21 @@ protected override string GetNuspecContent() public class When_packaging_with_leading_zeros_two_part : ScenariosBase { private string _originalVersion = "01.02"; - protected override string ExpectedNuspecVersion => "1.2.0"; - protected override string ExpectedSubDirectory => "PackageOutput"; + protected override string ExpectedNuspecVersion + { + get + { + return "1.2.0"; + } + } + + protected override string ExpectedSubDirectory + { + get + { + return "PackageOutput"; + } + } public override void Because() { @@ -392,8 +555,21 @@ protected override string GetNuspecContent() public class When_packaging_with_multiple_leading_zeros : ScenariosBase { private string _originalVersion = "0001.0002.0003"; - protected override string ExpectedNuspecVersion => "1.2.3"; - protected override string ExpectedSubDirectory => "PackageOutput"; + protected override string ExpectedNuspecVersion + { + get + { + return "1.2.3"; + } + } + + protected override string ExpectedSubDirectory + { + get + { + return "PackageOutput"; + } + } public override void Because() { @@ -409,7 +585,13 @@ protected override string GetNuspecContent() public class When_packing_with_properties : ScenariosBase { - protected override string ExpectedNuspecVersion => "0.1.0"; + protected override string ExpectedNuspecVersion + { + get + { + return "0.1.0"; + } + } public override void Context() { @@ -510,8 +692,21 @@ public void Should_throw_exception_on_icon_element() public class When_packing_with_min_client_version : ScenariosBase { - protected override string ExpectedNuspecVersion => "0.1.0"; - protected override string ExpectedSubDirectory => "PackageOutput"; + protected override string ExpectedNuspecVersion + { + get + { + return "0.1.0"; + } + } + + protected override string ExpectedSubDirectory + { + get + { + return "PackageOutput"; + } + } // This high version is to ensure that pack does not throw, even if the min client version is well // above both the Chocolatey and NuGet assembly versions. @@ -947,7 +1142,7 @@ protected override string GetNuspecContent() "; - private const string NuspecContentWithFormatableMinClientVersion = @" + private const string NuspecContentWithFormatableMinClientVersion = @" test-package diff --git a/src/chocolatey.tests.integration/scenarios/PinScenarios.cs b/src/chocolatey.tests.integration/scenarios/PinScenarios.cs index bcdb743c64..7f1abdbf99 100644 --- a/src/chocolatey.tests.integration/scenarios/PinScenarios.cs +++ b/src/chocolatey.tests.integration/scenarios/PinScenarios.cs @@ -14,25 +14,25 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Linq; +using chocolatey.infrastructure.app; +using chocolatey.infrastructure.app.attributes; +using chocolatey.infrastructure.app.commands; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.domain; +using chocolatey.infrastructure.commands; +using chocolatey.infrastructure.results; + +using NUnit.Framework; + +using NuGet.Configuration; +using FluentAssertions; +using Moq; + namespace chocolatey.tests.integration.scenarios { - using System; - using System.Collections.Generic; - using System.Linq; - using chocolatey.infrastructure.app; - using chocolatey.infrastructure.app.attributes; - using chocolatey.infrastructure.app.commands; - using chocolatey.infrastructure.app.configuration; - using chocolatey.infrastructure.app.domain; - using chocolatey.infrastructure.commands; - using chocolatey.infrastructure.results; - - using NUnit.Framework; - - using NuGet.Configuration; - using FluentAssertions; - using Moq; - public class PinScenarios { [ConcernFor("pin")] diff --git a/src/chocolatey.tests.integration/scenarios/SearchScenarios.cs b/src/chocolatey.tests.integration/scenarios/SearchScenarios.cs index 69ce958dc9..c47a83a270 100644 --- a/src/chocolatey.tests.integration/scenarios/SearchScenarios.cs +++ b/src/chocolatey.tests.integration/scenarios/SearchScenarios.cs @@ -14,18 +14,18 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System.Collections.Generic; +using System.Linq; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.services; +using chocolatey.infrastructure.results; +using NuGet.Configuration; +using NUnit.Framework; +using FluentAssertions; +using System.IO; + namespace chocolatey.tests.integration.scenarios { - using System.Collections.Generic; - using System.Linq; - using chocolatey.infrastructure.app.configuration; - using chocolatey.infrastructure.app.services; - using chocolatey.infrastructure.results; - using NuGet.Configuration; - using NUnit.Framework; - using FluentAssertions; - using System.IO; - public class SearchScenarios { [ConcernFor("search")] diff --git a/src/chocolatey.tests.integration/scenarios/UninstallScenarios.cs b/src/chocolatey.tests.integration/scenarios/UninstallScenarios.cs index 5af4abc25b..d874eb4c5c 100644 --- a/src/chocolatey.tests.integration/scenarios/UninstallScenarios.cs +++ b/src/chocolatey.tests.integration/scenarios/UninstallScenarios.cs @@ -14,23 +14,23 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Concurrent; +using System.IO; +using System.Linq; +using chocolatey.infrastructure.app.commands; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.services; +using chocolatey.infrastructure.commands; +using chocolatey.infrastructure.filesystem; +using chocolatey.infrastructure.results; +using NuGet.Configuration; +using NUnit.Framework; +using FluentAssertions; +using IFileSystem = chocolatey.infrastructure.filesystem.IFileSystem; + namespace chocolatey.tests.integration.scenarios { - using System; - using System.Collections.Concurrent; - using System.IO; - using System.Linq; - using chocolatey.infrastructure.app.commands; - using chocolatey.infrastructure.app.configuration; - using chocolatey.infrastructure.app.services; - using chocolatey.infrastructure.commands; - using chocolatey.infrastructure.filesystem; - using chocolatey.infrastructure.results; - using NuGet.Configuration; - using NUnit.Framework; - using FluentAssertions; - using IFileSystem = chocolatey.infrastructure.filesystem.IFileSystem; - public class UninstallScenarios { [ConcernFor("uninstall")] diff --git a/src/chocolatey.tests.integration/scenarios/UpgradeScenarios.cs b/src/chocolatey.tests.integration/scenarios/UpgradeScenarios.cs index 8b3f127f75..9fc45c629f 100644 --- a/src/chocolatey.tests.integration/scenarios/UpgradeScenarios.cs +++ b/src/chocolatey.tests.integration/scenarios/UpgradeScenarios.cs @@ -14,23 +14,23 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Xml.XPath; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.services; +using chocolatey.infrastructure.filesystem; +using chocolatey.infrastructure.results; +using NuGet.Configuration; +using NuGet.Packaging; +using NUnit.Framework; +using FluentAssertions; + namespace chocolatey.tests.integration.scenarios { - using System; - using System.Collections.Concurrent; - using System.Collections.Generic; - using System.IO; - using System.Linq; - using System.Xml.XPath; - using chocolatey.infrastructure.app.configuration; - using chocolatey.infrastructure.app.services; - using chocolatey.infrastructure.filesystem; - using chocolatey.infrastructure.results; - using NuGet.Configuration; - using NuGet.Packaging; - using NUnit.Framework; - using FluentAssertions; - public class UpgradeScenarios { [ConcernFor("upgrade")] @@ -265,6 +265,28 @@ public void Should_match_the_upgrade_version_of_one_dot_one_dot_zero() _packageResult.Version.Should().Be("1.1.0"); } + [Fact] + public void Should_contain_message_with_source() + { + var message = "Downloading package from source '{0}'".FormatWith(Configuration.Sources); + + MockLogger.Messages.Should().ContainKey(LogLevel.Info.ToString()).WhoseValue.Should() + .Contain(message); + } + + [Fact] + [WindowsOnly] + [Platform(Exclude = "Mono")] + public void Should_contain_message_with_download_uri() + { + var packagePath = "file:///{0}/{1}.{2}{3}".FormatWith(Configuration.Sources.Replace("\\", "/"), Configuration.PackageNames, + "1.1.0", NuGetConstants.PackageExtension); + var message = "Package download location '{0}'".FormatWith(packagePath); + + MockLogger.Messages.Should().ContainKey(LogLevel.Debug.ToString()).WhoseValue.Should() + .Contain(message); + } + [Fact] [WindowsOnly] [Platform(Exclude = "Mono")] @@ -3517,7 +3539,7 @@ public void Should_report_for_all_installed_packages() public void Should_upgrade_packages_with_upgrades() { var upgradePackageResult = Results.Where(x => x.Key == "upgradepackage").ToList(); - upgradePackageResult.Should().ContainSingle( "upgradepackage must be there once"); + upgradePackageResult.Should().ContainSingle("upgradepackage must be there once"); upgradePackageResult.First().Value.Version.Should().Be("1.1.0"); } @@ -3525,7 +3547,7 @@ public void Should_upgrade_packages_with_upgrades() public void Should_skip_packages_without_upgrades() { var installPackageResult = Results.Where(x => x.Key == "installpackage").ToList(); - installPackageResult.Should().ContainSingle( "installpackage must be there once"); + installPackageResult.Should().ContainSingle("installpackage must be there once"); installPackageResult.First().Value.Version.Should().Be("1.0.0"); } } @@ -3556,7 +3578,7 @@ public void Should_report_for_all_installed_packages() public void Should_upgrade_packages_with_upgrades() { var upgradePackageResult = Results.Where(x => x.Key == "upgradepackage").ToList(); - upgradePackageResult.Should().ContainSingle( "upgradepackage must be there once"); + upgradePackageResult.Should().ContainSingle("upgradepackage must be there once"); upgradePackageResult.First().Value.Version.Should().Be("1.1.1-beta2"); } @@ -3577,7 +3599,7 @@ public void Should_upgrade_upgradepackage() public void Should_skip_packages_without_upgrades() { var installPackageResult = Results.Where(x => x.Key == "installpackage").ToList(); - installPackageResult.Should().ContainSingle( "installpackage must be there once"); + installPackageResult.Should().ContainSingle("installpackage must be there once"); installPackageResult.First().Value.Version.Should().Be("1.0.0"); } } @@ -3610,7 +3632,7 @@ public void Should_report_for_all_installed_packages() public void Should_upgrade_packages_with_upgrades() { var upgradePackageResult = Results.Where(x => x.Key == "upgradepackage").ToList(); - upgradePackageResult.Should().ContainSingle( "upgradepackage must be there once"); + upgradePackageResult.Should().ContainSingle("upgradepackage must be there once"); // available version will show as last stable upgradePackageResult.First().Value.Version.Should().Be("1.1.0"); } @@ -3632,7 +3654,7 @@ public void Should_not_upgrade_upgradepackage() public void Should_skip_packages_without_upgrades() { var installPackageResult = Results.Where(x => x.Key == "installpackage").ToList(); - installPackageResult.Should().ContainSingle( "installpackage must be there once"); + installPackageResult.Should().ContainSingle("installpackage must be there once"); installPackageResult.First().Value.Version.Should().Be("1.0.0"); } } @@ -3659,7 +3681,7 @@ public override void Because() [Fact] public void Should_have_a_single_package_result() { - Results.Should().ContainSingle( "The returned package results do not have a single value!"); + Results.Should().ContainSingle("The returned package results do not have a single value!"); } [Fact] @@ -3974,7 +3996,7 @@ public void Should_have_a_hooks_folder_for_the_package() public void Should_install_hook_scripts_to_folder() { var hookScripts = new List { "pre-install-all.ps1", "post-install-all.ps1", "pre-upgrade-all.ps1", "post-upgrade-all.ps1", "pre-uninstall-all.ps1", "post-uninstall-all.ps1" }; - foreach (string scriptName in hookScripts) + foreach (var scriptName in hookScripts) { var hookScriptPath = Path.Combine(Scenario.GetTopLevel(), "hooks", Configuration.PackageNames.Replace(".hook", string.Empty), scriptName); File.ReadAllText(hookScriptPath).Should().Contain("Write-Output"); @@ -4492,8 +4514,21 @@ public class When_upgrading_an_existing_package_non_normalized_version : Scenari { private PackageResult _packageResult; - protected virtual string NonNormalizedVersion => "2.02.0.0"; - protected virtual string NormalizedVersion => "2.2.0"; + protected virtual string NonNormalizedVersion + { + get + { + return "2.02.0.0"; + } + } + + protected virtual string NormalizedVersion + { + get + { + return "2.2.0"; + } + } public override void Context() { @@ -4633,8 +4668,21 @@ public void Should_have_executed_chocolateyInstall_script_for_new_package() public class When_upgrading_an_existing_package_specifying_normalized_version : When_upgrading_an_existing_package_non_normalized_version { - protected override string NormalizedVersion => "2.2.0"; - protected override string NonNormalizedVersion => "2.02.0.0"; + protected override string NormalizedVersion + { + get + { + return "2.2.0"; + } + } + + protected override string NonNormalizedVersion + { + get + { + return "2.02.0.0"; + } + } public override void Context() { @@ -4645,8 +4693,21 @@ public override void Context() public class When_upgrading_an_existing_package_specifying_non_normalized_version : When_upgrading_an_existing_package_non_normalized_version { - protected override string NormalizedVersion => "2.2.0"; - protected override string NonNormalizedVersion => "2.02.0.0"; + protected override string NormalizedVersion + { + get + { + return "2.2.0"; + } + } + + protected override string NonNormalizedVersion + { + get + { + return "2.02.0.0"; + } + } public override void Context() { @@ -4657,14 +4718,40 @@ public override void Context() public class When_upgrading_an_existing_package_with_multiple_leading_zeros : When_upgrading_an_existing_package_non_normalized_version { - protected override string NormalizedVersion => "4.4.5.1"; - protected override string NonNormalizedVersion => "0004.0004.00005.01"; + protected override string NormalizedVersion + { + get + { + return "4.4.5.1"; + } + } + + protected override string NonNormalizedVersion + { + get + { + return "0004.0004.00005.01"; + } + } } public class When_upgrading_an_existing_package_with_multiple_leading_zeros_specifying_normalized_version : When_upgrading_an_existing_package_non_normalized_version { - protected override string NormalizedVersion => "4.4.5.1"; - protected override string NonNormalizedVersion => "0004.0004.00005.01"; + protected override string NormalizedVersion + { + get + { + return "4.4.5.1"; + } + } + + protected override string NonNormalizedVersion + { + get + { + return "0004.0004.00005.01"; + } + } public override void Context() { @@ -4675,8 +4762,21 @@ public override void Context() public class When_upgrading_an_existing_package_with_multiple_leading_zeros_specifying_non_normalized_version : When_upgrading_an_existing_package_non_normalized_version { - protected override string NormalizedVersion => "4.4.5.1"; - protected override string NonNormalizedVersion => "0004.0004.00005.01"; + protected override string NormalizedVersion + { + get + { + return "4.4.5.1"; + } + } + + protected override string NonNormalizedVersion + { + get + { + return "0004.0004.00005.01"; + } + } public override void Context() { diff --git a/src/chocolatey.tests/MockLogger.cs b/src/chocolatey.tests/MockLogger.cs index 21b9bbcc04..4ef454d9bc 100644 --- a/src/chocolatey.tests/MockLogger.cs +++ b/src/chocolatey.tests/MockLogger.cs @@ -14,14 +14,14 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using chocolatey.infrastructure.logging; +using Moq; + namespace chocolatey.tests { - using System; - using System.Collections.Concurrent; - using System.Collections.Generic; - using chocolatey.infrastructure.logging; - using Moq; - public enum LogLevel { Debug, @@ -58,12 +58,15 @@ public bool ContainsMessage(string expectedMessage, LogLevel level) public int ContainsMessageCount(string expectedMessage) { - int messageCount = 0; + var messageCount = 0; foreach (var messageLevel in Messages) { foreach (var message in messageLevel.Value.OrEmpty()) { - if (message.Contains(expectedMessage)) messageCount++; + if (message.Contains(expectedMessage)) + { + messageCount++; + } } } @@ -72,10 +75,13 @@ public int ContainsMessageCount(string expectedMessage) public int ContainsMessageCount(string expectedMessage, LogLevel level) { - int messageCount = 0; + var messageCount = 0; foreach (var message in MessagesFor(level).OrEmpty()) { - if (message.Contains(expectedMessage)) messageCount++; + if (message.Contains(expectedMessage)) + { + messageCount++; + } } return messageCount; diff --git a/src/chocolatey.tests/TinySpec.cs b/src/chocolatey.tests/TinySpec.cs index f072a37cf2..02a8f16797 100644 --- a/src/chocolatey.tests/TinySpec.cs +++ b/src/chocolatey.tests/TinySpec.cs @@ -16,15 +16,15 @@ // specific language governing permissions and limitations under the License. // ============================================================================== +using System; +using NUnit.Framework; +using chocolatey.infrastructure.app; +using chocolatey.infrastructure.logging; +using System.IO; +using chocolatey.infrastructure.app.nuget; + namespace chocolatey.tests { - using System; - using NUnit.Framework; - using chocolatey.infrastructure.app; - using chocolatey.infrastructure.logging; - using System.IO; - using chocolatey.infrastructure.app.nuget; - // ReSharper disable InconsistentNaming [SetUpFixture] @@ -63,7 +63,18 @@ public MockLogger MockLogger [OneTimeSetUp] public void Setup() { - if (MockLogger != null) MockLogger.Reset(); + if (MockLogger != null) + { + MockLogger.Reset(); + } + + // Chocolatey CLI by default will exit with Code 0, when everything work as expected, even if it doesn't + // set this explicitly. + // However, in some tests, we are testing for the setting of an explicit exit code, and when we do this, + // it can have an impact on other tests, since it may not have been reset. Let's explicitly set it to + // 0 before running each test, so that everything starts off at the right place. + Environment.ExitCode = default; + //Log.InitializeWith(MockLogger); NugetCommon.ClearRepositoriesCache(); Context(); diff --git a/src/chocolatey.tests/UNCHelper.cs b/src/chocolatey.tests/UNCHelper.cs index 2c5d03f03c..5a5ef93cf4 100644 --- a/src/chocolatey.tests/UNCHelper.cs +++ b/src/chocolatey.tests/UNCHelper.cs @@ -1,9 +1,9 @@ -namespace chocolatey.tests -{ - using System; - using System.IO; - using System.Net; +using System; +using System.IO; +using System.Net; +namespace chocolatey.tests +{ public static class UNCHelper { public static string ConvertLocalFolderPathToIpBasedUncPath(string localFolderName) diff --git a/src/chocolatey.tests/chocolatey.tests.csproj b/src/chocolatey.tests/chocolatey.tests.csproj index 75ec5e4ee0..06f30d8af3 100644 --- a/src/chocolatey.tests/chocolatey.tests.csproj +++ b/src/chocolatey.tests/chocolatey.tests.csproj @@ -168,6 +168,7 @@ + diff --git a/src/chocolatey.tests/infrastructure.app/attributes/CommandForAttributeSpecs.cs b/src/chocolatey.tests/infrastructure.app/attributes/CommandForAttributeSpecs.cs index 5537cd387b..80ea07e23b 100644 --- a/src/chocolatey.tests/infrastructure.app/attributes/CommandForAttributeSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/attributes/CommandForAttributeSpecs.cs @@ -14,11 +14,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +using chocolatey.infrastructure.app.attributes; +using FluentAssertions; + namespace chocolatey.tests.infrastructure.app.attributes { - using chocolatey.infrastructure.app.attributes; - using FluentAssertions; - public class CommandForAttributeSpecs { public abstract class CommandForAttributeSpecsBase : TinySpec diff --git a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyApiKeyCommandSpecs.cs b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyApiKeyCommandSpecs.cs index 1373e94def..cb05acb204 100644 --- a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyApiKeyCommandSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyApiKeyCommandSpecs.cs @@ -14,20 +14,20 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Linq; +using chocolatey.infrastructure.app.attributes; +using chocolatey.infrastructure.app.commands; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.domain; +using chocolatey.infrastructure.app.services; +using chocolatey.infrastructure.commandline; +using Moq; +using FluentAssertions; + namespace chocolatey.tests.infrastructure.app.commands { - using System; - using System.Collections.Generic; - using System.Linq; - using chocolatey.infrastructure.app.attributes; - using chocolatey.infrastructure.app.commands; - using chocolatey.infrastructure.app.configuration; - using chocolatey.infrastructure.app.domain; - using chocolatey.infrastructure.app.services; - using chocolatey.infrastructure.commandline; - using Moq; - using FluentAssertions; - public class ChocolateyApiKeyCommandSpecs { [ConcernFor("apikey")] diff --git a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyCacheCommandSpecs.cs b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyCacheCommandSpecs.cs index 93f683e1c8..bc424a9dfd 100644 --- a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyCacheCommandSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyCacheCommandSpecs.cs @@ -1,18 +1,18 @@ -namespace chocolatey.tests.infrastructure.app.commands +using chocolatey.infrastructure.app.attributes; +using System.Collections.Generic; +using chocolatey.infrastructure.app.commands; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.filesystem; +using Moq; +using System.Reflection; +using System.Linq; +using FluentAssertions; +using chocolatey.infrastructure.commandline; +using chocolatey.infrastructure.app.domain; +using FluentAssertions.Execution; + +namespace chocolatey.tests.infrastructure.app.commands { - using chocolatey.infrastructure.app.attributes; - using System.Collections.Generic; - using chocolatey.infrastructure.app.commands; - using chocolatey.infrastructure.app.configuration; - using chocolatey.infrastructure.filesystem; - using Moq; - using System.Reflection; - using System.Linq; - using FluentAssertions; - using chocolatey.infrastructure.commandline; - using chocolatey.infrastructure.app.domain; - using FluentAssertions.Execution; - public class ChocolateyCacheCommandSpecs { [ConcernFor("cache")] @@ -84,7 +84,7 @@ public class WhenParsingAdditionalParameters : ChocolateyCacheCommandSpecsBase { public override void Because() { - + } public override void BeforeEachSpec() diff --git a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyConfigCommandSpecs.cs b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyConfigCommandSpecs.cs index b91fcf2f0d..cf6122fc64 100644 --- a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyConfigCommandSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyConfigCommandSpecs.cs @@ -14,20 +14,20 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Linq; +using chocolatey.infrastructure.app.attributes; +using chocolatey.infrastructure.app.commands; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.domain; +using chocolatey.infrastructure.app.services; +using chocolatey.infrastructure.commandline; +using Moq; +using FluentAssertions; + namespace chocolatey.tests.infrastructure.app.commands { - using System; - using System.Collections.Generic; - using System.Linq; - using chocolatey.infrastructure.app.attributes; - using chocolatey.infrastructure.app.commands; - using chocolatey.infrastructure.app.configuration; - using chocolatey.infrastructure.app.domain; - using chocolatey.infrastructure.app.services; - using chocolatey.infrastructure.commandline; - using Moq; - using FluentAssertions; - public class ChocolateyConfigCommandSpecs { [ConcernFor("config")] diff --git a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyExportCommandSpecs.cs b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyExportCommandSpecs.cs index 42a11d3821..b5b1b7254a 100644 --- a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyExportCommandSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyExportCommandSpecs.cs @@ -14,20 +14,20 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Linq; +using chocolatey.infrastructure.app.attributes; +using chocolatey.infrastructure.app.commands; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.services; +using chocolatey.infrastructure.commandline; +using chocolatey.infrastructure.filesystem; +using Moq; +using FluentAssertions; + namespace chocolatey.tests.infrastructure.app.commands { - using System; - using System.Collections.Generic; - using System.Linq; - using chocolatey.infrastructure.app.attributes; - using chocolatey.infrastructure.app.commands; - using chocolatey.infrastructure.app.configuration; - using chocolatey.infrastructure.app.services; - using chocolatey.infrastructure.commandline; - using chocolatey.infrastructure.filesystem; - using Moq; - using FluentAssertions; - public class ChocolateyExportCommandSpecs { [ConcernFor("export")] diff --git a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyFeatureCommandSpecs.cs b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyFeatureCommandSpecs.cs index 0cd14f6eb9..de9d2d9731 100644 --- a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyFeatureCommandSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyFeatureCommandSpecs.cs @@ -14,20 +14,20 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Linq; +using chocolatey.infrastructure.app.attributes; +using chocolatey.infrastructure.app.commands; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.domain; +using chocolatey.infrastructure.app.services; +using chocolatey.infrastructure.commandline; +using Moq; +using FluentAssertions; + namespace chocolatey.tests.infrastructure.app.commands { - using System; - using System.Collections.Generic; - using System.Linq; - using chocolatey.infrastructure.app.attributes; - using chocolatey.infrastructure.app.commands; - using chocolatey.infrastructure.app.configuration; - using chocolatey.infrastructure.app.domain; - using chocolatey.infrastructure.app.services; - using chocolatey.infrastructure.commandline; - using Moq; - using FluentAssertions; - public class ChocolateyFeatureCommandSpecs { [ConcernFor("feature")] @@ -143,7 +143,7 @@ public void Should_throw_when_more_than_one_unparsed_arg_is_passed() errored.Should().BeTrue(); error.Should().NotBeNull(); error.Should().BeOfType(); - error.Message.Should().Contain("A single features command must be listed"); + error.Message.Should().Contain("A single feature command must be listed."); } [Fact] diff --git a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyHelpCommandSpecs.cs b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyHelpCommandSpecs.cs index f9e7c1e70d..018cbb65bf 100644 --- a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyHelpCommandSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyHelpCommandSpecs.cs @@ -14,15 +14,15 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System.Collections.Generic; +using System.Linq; +using chocolatey.infrastructure.app.attributes; +using chocolatey.infrastructure.app.commands; +using chocolatey.infrastructure.app.configuration; +using FluentAssertions; + namespace chocolatey.tests.infrastructure.app.commands { - using System.Collections.Generic; - using System.Linq; - using chocolatey.infrastructure.app.attributes; - using chocolatey.infrastructure.app.commands; - using chocolatey.infrastructure.app.configuration; - using FluentAssertions; - public class ChocolateyHelpCommandSpecs { [ConcernFor("help")] diff --git a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyInfoCommandSpecs.cs b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyInfoCommandSpecs.cs index 58082f04de..b6d89955a3 100644 --- a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyInfoCommandSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyInfoCommandSpecs.cs @@ -14,19 +14,19 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Linq; +using chocolatey.infrastructure.app.attributes; +using chocolatey.infrastructure.app.commands; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.services; +using chocolatey.infrastructure.commandline; +using Moq; +using FluentAssertions; + namespace chocolatey.tests.infrastructure.app.commands { - using System; - using System.Collections.Generic; - using System.Linq; - using chocolatey.infrastructure.app.attributes; - using chocolatey.infrastructure.app.commands; - using chocolatey.infrastructure.app.configuration; - using chocolatey.infrastructure.app.services; - using chocolatey.infrastructure.commandline; - using Moq; - using FluentAssertions; - public class ChocolateyInfoCommandSpecs { [ConcernFor("info")] @@ -133,6 +133,12 @@ public void Should_add_short_version_of_password_to_the_option_set() { _optionSet.Contains("p").Should().BeTrue(); } + + [Fact] + public void Should_add_include_configured_sources_to_the_option_set() + { + _optionSet.Contains("include-configured-sources").Should().BeTrue(); + } } public class When_handling_validation : ChocolateyInfoCommandSpecsBase diff --git a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyInstallCommandSpecs.cs b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyInstallCommandSpecs.cs index eec8ee1a19..917d3092a1 100644 --- a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyInstallCommandSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyInstallCommandSpecs.cs @@ -14,20 +14,20 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Linq; +using chocolatey.infrastructure.app.attributes; +using chocolatey.infrastructure.app.commands; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.domain; +using chocolatey.infrastructure.app.services; +using chocolatey.infrastructure.commandline; +using Moq; +using FluentAssertions; + namespace chocolatey.tests.infrastructure.app.commands { - using System; - using System.Collections.Generic; - using System.Linq; - using chocolatey.infrastructure.app.attributes; - using chocolatey.infrastructure.app.commands; - using chocolatey.infrastructure.app.configuration; - using chocolatey.infrastructure.app.domain; - using chocolatey.infrastructure.app.services; - using chocolatey.infrastructure.commandline; - using Moq; - using FluentAssertions; - public class ChocolateyInstallCommandSpecs { [ConcernFor("install")] @@ -254,6 +254,12 @@ public void Should_add_short_version_of_skip_hooks_to_the_option_set() { _optionSet.Contains("skiphooks").Should().BeTrue(); } + + [Fact] + public void Should_add_include_configured_sources_to_the_option_set() + { + _optionSet.Contains("include-configured-sources").Should().BeTrue(); + } } public class When_handling_additional_argument_parsing : ChocolateyInstallCommandSpecsBase diff --git a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyListCommandSpecs.cs b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyListCommandSpecs.cs index 4c4a509e63..2845ad60b5 100644 --- a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyListCommandSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyListCommandSpecs.cs @@ -13,19 +13,19 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Linq; +using chocolatey.infrastructure.app.attributes; +using chocolatey.infrastructure.app.commands; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.services; +using chocolatey.infrastructure.commandline; +using Moq; +using FluentAssertions; + namespace chocolatey.tests.infrastructure.app.commands { - using System; - using System.Collections.Generic; - using System.Linq; - using chocolatey.infrastructure.app.attributes; - using chocolatey.infrastructure.app.commands; - using chocolatey.infrastructure.app.configuration; - using chocolatey.infrastructure.app.services; - using chocolatey.infrastructure.commandline; - using Moq; - using FluentAssertions; - public static class ChocolateyListCommandSpecs { [ConcernFor("list")] @@ -139,7 +139,9 @@ public override void Because() [NUnit.Framework.TestCase("--localonly")] [NUnit.Framework.TestCase("-li")] [NUnit.Framework.TestCase("-lai")] +#pragma warning disable IDE0060 // Unused argument public void Should_throw_on_unsupported_argument(string argument) +#pragma warning restore IDE0060 // Unused argument { Configuration.RegularOutput = true; var errored = false; diff --git a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyNewCommandSpecs.cs b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyNewCommandSpecs.cs index 7dcfd35d4a..5f8aee20d9 100644 --- a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyNewCommandSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyNewCommandSpecs.cs @@ -14,20 +14,20 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Linq; +using chocolatey.infrastructure.app.attributes; +using chocolatey.infrastructure.app.commands; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.services; +using chocolatey.infrastructure.app.templates; +using chocolatey.infrastructure.commandline; +using Moq; +using FluentAssertions; + namespace chocolatey.tests.infrastructure.app.commands { - using System; - using System.Collections.Generic; - using System.Linq; - using chocolatey.infrastructure.app.attributes; - using chocolatey.infrastructure.app.commands; - using chocolatey.infrastructure.app.configuration; - using chocolatey.infrastructure.app.services; - using chocolatey.infrastructure.app.templates; - using chocolatey.infrastructure.commandline; - using Moq; - using FluentAssertions; - public class ChocolateyNewCommandSpecs { [ConcernFor("new")] diff --git a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyOutdatedCommandSpecs.cs b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyOutdatedCommandSpecs.cs index 492576b7b9..ab933e961e 100644 --- a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyOutdatedCommandSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyOutdatedCommandSpecs.cs @@ -14,18 +14,18 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System.Collections.Generic; +using System.Linq; +using chocolatey.infrastructure.app.attributes; +using chocolatey.infrastructure.app.commands; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.services; +using chocolatey.infrastructure.commandline; +using Moq; +using FluentAssertions; + namespace chocolatey.tests.infrastructure.app.commands { - using System.Collections.Generic; - using System.Linq; - using chocolatey.infrastructure.app.attributes; - using chocolatey.infrastructure.app.commands; - using chocolatey.infrastructure.app.configuration; - using chocolatey.infrastructure.app.services; - using chocolatey.infrastructure.commandline; - using Moq; - using FluentAssertions; - public class ChocolateyOutdatedCommandSpecs { [ConcernFor("outdated")] @@ -114,6 +114,12 @@ public void Should_add_ignore_pinned_to_the_option_set() { _optionSet.Contains("ignore-pinned").Should().BeTrue(); } + + [Fact] + public void Should_add_include_configured_sources_to_the_option_set() + { + _optionSet.Contains("include-configured-sources").Should().BeTrue(); + } } public class When_noop_is_called : ChocolateyOutdatedCommandSpecsBase diff --git a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyPackCommandSpecs.cs b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyPackCommandSpecs.cs index d3d3183120..e5da9ec485 100644 --- a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyPackCommandSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyPackCommandSpecs.cs @@ -14,19 +14,19 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System.Collections.Generic; +using System.Linq; +using chocolatey.infrastructure.app.attributes; +using chocolatey.infrastructure.app.commands; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.services; +using chocolatey.infrastructure.commandline; +using Moq; +using FluentAssertions; +using System; + namespace chocolatey.tests.infrastructure.app.commands { - using System.Collections.Generic; - using System.Linq; - using chocolatey.infrastructure.app.attributes; - using chocolatey.infrastructure.app.commands; - using chocolatey.infrastructure.app.configuration; - using chocolatey.infrastructure.app.services; - using chocolatey.infrastructure.commandline; - using Moq; - using FluentAssertions; - using System; - public class ChocolateyPackCommandSpecs { [ConcernFor("pack")] diff --git a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyPinCommandSpecs.cs b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyPinCommandSpecs.cs index b85edd62da..37208c8c80 100644 --- a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyPinCommandSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyPinCommandSpecs.cs @@ -14,28 +14,29 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Linq; +using chocolatey.infrastructure.app; +using chocolatey.infrastructure.app.attributes; +using chocolatey.infrastructure.app.commands; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.domain; +using chocolatey.infrastructure.app.services; +using chocolatey.infrastructure.commandline; +using chocolatey.infrastructure.results; +using Moq; +using NuGet.Common; +using NuGet.Packaging; +using NuGet.Versioning; + +using NUnit.Framework; + +using FluentAssertions; +using FluentAssertions.Execution; + namespace chocolatey.tests.infrastructure.app.commands { - using System; - using System.Collections.Generic; - using System.Linq; - using chocolatey.infrastructure.app; - using chocolatey.infrastructure.app.attributes; - using chocolatey.infrastructure.app.commands; - using chocolatey.infrastructure.app.configuration; - using chocolatey.infrastructure.app.domain; - using chocolatey.infrastructure.app.services; - using chocolatey.infrastructure.commandline; - using chocolatey.infrastructure.results; - using Moq; - using NuGet.Common; - using NuGet.Packaging; - using NuGet.Versioning; - - using NUnit.Framework; - - using FluentAssertions; - public class ChocolateyPinCommandSpecs { [ConcernFor("pin")] @@ -537,5 +538,139 @@ public void Should_remove_pin_from_correct_package() n.Package.Id.Equals("mingw"))), Times.Once); } } + + public class When_adding_a_pin_on_an_already_pinned_package : ChocolateyPinCommandSpecsBase + { + public override void Context() + { + base.Context(); + Configuration.Sources = ApplicationParameters.PackagesLocation; + Configuration.ListCommand.LocalOnly = true; + Configuration.AllVersions = true; + + var packageResults = new[] + { + new PackageResult(PinnedPackage.Object, null) + }; + NugetService.Setup(n => n.List(It.IsAny())).Returns(packageResults); + } + + public new void Reset() + { + Context(); + base.Reset(); + } + + public override void AfterEachSpec() + { + base.AfterEachSpec(); + MockLogger.Messages.Clear(); + } + + public override void Because() + { + } + + [Fact] + public void Should_Return_0_ExitCode_When_Pinning_An_Already_Pinned_Package() + { + Reset(); + Configuration.Features.UseEnhancedExitCodes = false; + Configuration.PinCommand.Name = "pinned"; + Configuration.PinCommand.Command = PinCommandType.Add; + + Command.SetPin(Configuration); + + using (new AssertionScope()) + { + MockLogger.Messages.Should().ContainKey("Warn").WhoseValue.Should().ContainSingle().And.Contain("Nothing to change. Pin already set or removed."); + Environment.ExitCode.Should().Be(0); + } + } + + [Fact] + public void Should_Return_2_ExitCode_When_Pinning_An_Already_Pinned_Package_With_UseEnhancedExitCodes_Enabled() + { + Reset(); + Configuration.Features.UseEnhancedExitCodes = true; + Configuration.PinCommand.Name = "pinned"; + Configuration.PinCommand.Command = PinCommandType.Add; + + Command.SetPin(Configuration); + + using (new AssertionScope()) + { + MockLogger.Messages.Should().ContainKey("Warn").WhoseValue.Should().ContainSingle().And.Contain("Nothing to change. Pin already set or removed."); + Environment.ExitCode.Should().Be(2); + } + } + } + + public class When_removing_a_pin_on_a_package_with_no_pin : ChocolateyPinCommandSpecsBase + { + public override void Context() + { + base.Context(); + Configuration.Sources = ApplicationParameters.PackagesLocation; + Configuration.ListCommand.LocalOnly = true; + Configuration.AllVersions = true; + + var packageResults = new[] + { + new PackageResult(Package.Object, null) + }; + NugetService.Setup(n => n.List(It.IsAny())).Returns(packageResults); + } + + public new void Reset() + { + Context(); + base.Reset(); + } + + public override void AfterEachSpec() + { + base.AfterEachSpec(); + MockLogger.Messages.Clear(); + } + + public override void Because() + { + } + + [Fact] + public void Should_Return_0_ExitCode_When_Pinning_An_Already_Pinned_Package() + { + Reset(); + Configuration.Features.UseEnhancedExitCodes = false; + Configuration.PinCommand.Name = "regular"; + Configuration.PinCommand.Command = PinCommandType.Remove; + + Command.SetPin(Configuration); + + using (new AssertionScope()) + { + MockLogger.Messages.Should().ContainKey("Warn").WhoseValue.Should().ContainSingle().And.Contain("Nothing to change. Pin already set or removed."); + Environment.ExitCode.Should().Be(0); + } + } + + [Fact] + public void Should_Return_2_ExitCode_When_Pinning_An_Already_Pinned_Package_With_UseEnhancedExitCodes_Enabled() + { + Reset(); + Configuration.Features.UseEnhancedExitCodes = true; + Configuration.PinCommand.Name = "regular"; + Configuration.PinCommand.Command = PinCommandType.Remove; + + Command.SetPin(Configuration); + + using (new AssertionScope()) + { + MockLogger.Messages.Should().ContainKey("Warn").WhoseValue.Should().ContainSingle().And.Contain("Nothing to change. Pin already set or removed."); + Environment.ExitCode.Should().Be(2); + } + } + } } } diff --git a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyPushCommandSpecs.cs b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyPushCommandSpecs.cs index e3f87a6c8b..892b9b0284 100644 --- a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyPushCommandSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyPushCommandSpecs.cs @@ -14,21 +14,21 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Linq; +using chocolatey.infrastructure.app; +using chocolatey.infrastructure.app.attributes; +using chocolatey.infrastructure.app.commands; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.services; +using chocolatey.infrastructure.commandline; +using Moq; +using NUnit.Framework; +using FluentAssertions; + namespace chocolatey.tests.infrastructure.app.commands { - using System; - using System.Collections.Generic; - using System.Linq; - using chocolatey.infrastructure.app; - using chocolatey.infrastructure.app.attributes; - using chocolatey.infrastructure.app.commands; - using chocolatey.infrastructure.app.configuration; - using chocolatey.infrastructure.app.services; - using chocolatey.infrastructure.commandline; - using Moq; - using NUnit.Framework; - using FluentAssertions; - public class ChocolateyPushCommandSpecs { [ConcernFor("push")] @@ -135,7 +135,7 @@ public void Reset() public void Should_allow_a_path_to_the_nupkg_to_be_passed_in() { Reset(); - string nupkgPath = "./some/path/to.nupkg"; + var nupkgPath = "./some/path/to.nupkg"; _unparsedArgs.Add(nupkgPath); _because(); Configuration.Input.Should().Be(nupkgPath); diff --git a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyRuleCommandSpecs.cs b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyRuleCommandSpecs.cs new file mode 100644 index 0000000000..0ebbd52813 --- /dev/null +++ b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyRuleCommandSpecs.cs @@ -0,0 +1,672 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using chocolatey.infrastructure.app.attributes; +using chocolatey.infrastructure.app.commands; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.commandline; +using chocolatey.infrastructure.rules; +using chocolatey.infrastructure.services; +using FluentAssertions; +using FluentAssertions.Execution; +using Moq; + +namespace chocolatey.tests.infrastructure.app.commands +{ + public class ChocolateyRuleCommandSpecs + { + [ConcernFor("rule")] + public abstract class ChocolateyRuleCommandSpecsBase : TinySpec + { + protected ChocolateyRuleCommand Command; + protected Mock RuleService = new Mock(); + protected ChocolateyConfiguration Configuration = new ChocolateyConfiguration(); + + public override void Context() + { + Command = new ChocolateyRuleCommand(RuleService.Object); + } + } + + public class When_Implementing_Command_For : ChocolateyRuleCommandSpecsBase + { + private List _results; + + public override void Because() + { + _results = Command.GetType().GetCustomAttributes().ToList(); + } + + [Fact] + public void Should_Have_Expected_Number_Of_Commands() + { + _results.Should().HaveCount(1); + } + + [InlineData("rule")] + public void Should_Implement_Expected_Command(string name) + { + _results.Should().ContainSingle(r => r.CommandName == name); + } + + [Fact] + public void Should_Specify_Expected_Version_For_All_Commands() + { + _results.Should().AllSatisfy(r => r.Version.Should().Be("2.3.0")); + } + } + + public class When_Configuring_The_Argument_Parser : ChocolateyRuleCommandSpecsBase + { + private OptionSet _optionSet; + + public override void Context() + { + base.Context(); + _optionSet = new OptionSet(); + } + + public override void Because() + { + Command.ConfigureArgumentParser(_optionSet, Configuration); + } + + [InlineData("n")] + [InlineData("name")] + public void Should_Set_Expected_Arguments_On_Option_Set(string name) + { + _optionSet.Contains(name).Should().BeTrue(); + } + } + + public class When_Handling_Additional_Argument_Parsing : ChocolateyRuleCommandSpecsBase + { + private readonly IList _unparsedArgs = new List(); + private Action _because; + + public override void Because() + { + _because = () => Command.ParseAdditionalArguments(_unparsedArgs, Configuration); + } + + public void Reset() + { + _unparsedArgs.Clear(); + Configuration = new ChocolateyConfiguration(); + } + + [Fact] + public void Should_Set_Default_Sub_Command_On_Empty_Arguments() + { + Reset(); + _because(); + + Configuration.RuleCommand.Command.Should().BeLowerCased().And.Be("list"); + } + + [Fact] + public void Should_Set_Command_to_List_when_Specified() + { + Reset(); + _unparsedArgs.Add("LIST"); + _because(); + + Configuration.RuleCommand.Command.Should().BeLowerCased().And.Be("list"); + } + + [Fact] + public void Should_Set_Command_To_Get_When_Specified() + { + Reset(); + _unparsedArgs.Add("Get"); + _because(); + + Configuration.RuleCommand.Command.Should().BeLowerCased().And.Be("get"); + } + + [Fact] + public void Should_Set_Name_When_Command_When_Not_Already_Set() + { + Reset(); + _unparsedArgs.Add("Get"); + _unparsedArgs.Add("test-name"); + _because(); + + Configuration.RuleCommand.Name.Should().Be("test-name"); + } + + [Fact] + public void Should_Not_Set_Name_When_Already_Set() + { + Reset(); + _unparsedArgs.Add("Get"); + _unparsedArgs.Add("test-name"); + Configuration.RuleCommand.Name = "old-name"; + _because(); + + Configuration.RuleCommand.Name.Should().Be("old-name"); + } + + [Fact] + public void Should_Not_Set_Name_When_Only_Sub_Command_Specified() + { + Reset(); + _unparsedArgs.Add("something"); + _because(); + + Configuration.RuleCommand.Name.Should().BeNullOrEmpty(); + } + } + + public class When_Validating : ChocolateyRuleCommandSpecsBase + { + private Action _because; + + public override void Because() + { + _because = () => Command.Validate(Configuration); + } + + [Fact] + public void Should_Run_Successfully_When_Only_List_Command_Specified() + { + Configuration = new ChocolateyConfiguration(); + Configuration.RuleCommand.Command = "list"; + + _because.Should().NotThrow(); + } + + [Fact] + public void Throws_Expected_Exception_When_Name_Specified_For_List_Command() + { + Configuration = new ChocolateyConfiguration(); + Configuration.RuleCommand.Command = "list"; + Configuration.RuleCommand.Name = "some-name"; + + _because.Should().Throw().WithMessage("A Rule Name (-n|--name) should not be specified when listing all validation rules."); + } + + [Fact] + public void Throws_Expected_Exception_When_Name_Is_Not_Specified_For_Get_Command() + { + Configuration = new ChocolateyConfiguration(); + Configuration.RuleCommand.Command = "get"; + + _because.Should().Throw().WithMessage("A Rule Name (-n|--name) is required when getting information for a specific rule."); + } + + [Fact] + public void Should_Run_Successfully_When_Get_Command_With_Name_Is_Specified() + { + Configuration = new ChocolateyConfiguration(); + Configuration.RuleCommand.Command = "get"; + Configuration.RuleCommand.Name = "some-name"; + + _because.Should().NotThrow(); + } + + [Fact] + public void Should_Log_Warning_When_Unknown_Sub_Command_Is_Used() + { + Configuration = new ChocolateyConfiguration(); + Configuration.RuleCommand.Command = "something"; + + using (new AssertionScope()) + { + _because.Should().NotThrow(); + MockLogger.Messages.Should().ContainKey(LogLevel.Warn.ToString()) + .WhoseValue.Should().Contain("Unknown command 'something'. Setting to list."); + Configuration.RuleCommand.Command.Should().Be("list"); + } + } + + [Fact] + public void Throws_Expected_Exception_When_Name_Supplied_For_Unknown_Command() + { + Configuration = new ChocolateyConfiguration(); + Configuration.RuleCommand.Command = "something"; + Configuration.RuleCommand.Name = "MyName"; + + using (new AssertionScope()) + { + _because.Should().Throw().WithMessage("A Rule Name (-n|--name) should not be specified when listing all validation rules."); + Configuration.RuleCommand.Command.Should().Be("list"); + MockLogger.Messages.Should().ContainKey(LogLevel.Warn.ToString()) + .WhoseValue.Should().Contain("Unknown command 'something'. Setting to list."); + } + } + } + + public class When_Run_Is_Called_Using_List_Command_And_Has_Rules : ChocolateyRuleCommandSpecsBase + { + public override void Context() + { + base.Context(); + + RuleService.Setup(r => r.GetAllAvailableRules()) + .Returns(new[] + { + new ImmutableRule(RuleType.Error, "Error ID", "Some Error Summary", "Help URL"), + new ImmutableRule(RuleType.Warning, "Warning ID", "Some Warning Summary", "Help URL"), + new ImmutableRule(RuleType.Information, "Information ID", "Some Information Summary", "Help URL"), + new ImmutableRule(RuleType.Note, "Note ID", "Some Note Summary", "Help URL"), + new ImmutableRule(RuleType.None, "Disabled ID", "Some Disabled Summary", "Help URL"), + }); + } + + public override void Because() + { + Command.Run(Configuration); + } + + [Fact] + public void Should_Output_Headers_In_Correct_Order() + { + MockLogger.Messages.Should() + .ContainKey(LogLevel.Info.ToString()) + .WhoseValue.Should().ContainInOrder( + "Implemented Package Rules", + "Error/Required Rules", + "Warning/Guideline Rules", + "Information/Suggestion Rules", + "Note Rules", + "Disabled Rules"); + } + + [Fact] + public void Should_Output_Error_Rules_With_Expected_Header() + { + MockLogger.Messages.Should() + .ContainKey(LogLevel.Info.ToString()) + .WhoseValue.Should().ContainInConsecutiveOrder( + "Error/Required Rules", + string.Empty, + "Error ID: Some Error Summary"); + } + + [Fact] + public void Should_Output_Warning_Rules_With_Expected_Header() + { + MockLogger.Messages.Should() + .ContainKey(LogLevel.Info.ToString()) + .WhoseValue.Should().ContainInConsecutiveOrder( + "Warning/Guideline Rules", + string.Empty, + "Warning ID: Some Warning Summary"); + } + + [Fact] + public void Should_Output_Information_Rules_With_Expected_Header() + { + MockLogger.Messages.Should() + .ContainKey(LogLevel.Info.ToString()) + .WhoseValue.Should().ContainInConsecutiveOrder( + "Information/Suggestion Rules", + string.Empty, + "Information ID: Some Information Summary"); + } + + [Fact] + public void Should_Output_Note_Rules_With_Expected_Header() + { + MockLogger.Messages.Should() + .ContainKey(LogLevel.Info.ToString()) + .WhoseValue.Should().ContainInConsecutiveOrder( + "Note Rules", + string.Empty, + "Note ID: Some Note Summary"); + } + + [Fact] + public void Should_Output_Disabled_Rules_With_Expected_Header() + { + MockLogger.Messages.Should() + .ContainKey(LogLevel.Info.ToString()) + .WhoseValue.Should().ContainInConsecutiveOrder( + "Disabled Rules", + string.Empty, + "Disabled ID: Some Disabled Summary"); + } + } + + public class When_Run_Is_Called_Using_List_Command_And_Has_Rules_With_Limited_Output : ChocolateyRuleCommandSpecsBase + { + public override void Context() + { + base.Context(); + Configuration.RegularOutput = false; + + RuleService.Setup(r => r.GetAllAvailableRules()) + .Returns(new[] + { + new ImmutableRule(RuleType.Error, "Error ID", "Some Error Summary", "Help URL"), + new ImmutableRule(RuleType.Warning, "Warning ID", "Some Warning Summary", "Help URL"), + new ImmutableRule(RuleType.Information, "Information ID", "Some Information Summary", "Help URL"), + new ImmutableRule(RuleType.Note, "Note ID", "Some Note Summary", "Help URL"), + new ImmutableRule(RuleType.None, "Disabled ID", "Some Disabled Summary", "Help URL"), + }); + } + + public override void Because() + { + Command.Run(Configuration); + } + + [Fact] + public void Should_Output_Rules_With_In_Order_With_Limited_Output() + { + MockLogger.Messages.Should() + .ContainKey(LogLevel.Info.ToString()) + .WhoseValue.Should().ContainInConsecutiveOrder( + "Error|Error ID|Some Error Summary|Help URL", + "Warning|Warning ID|Some Warning Summary|Help URL", + "Information|Information ID|Some Information Summary|Help URL", + "Note|Note ID|Some Note Summary|Help URL", + "None|Disabled ID|Some Disabled Summary|Help URL"); + } + } + + public class When_Run_Is_Called_Using_List_Command_Without_Any_Rules_Available : ChocolateyRuleCommandSpecsBase + { + public override void Context() + { + base.Context(); + + RuleService.Setup(r => r.GetAllAvailableRules()) + .Returns(Array.Empty()); + } + + public override void Because() + { + Command.Run(Configuration); + } + + [Fact] + public void Should_Output_Rules_With_In_Order_With_Limited_Output() + { + MockLogger.Messages.Should() + .ContainKey(LogLevel.Info.ToString()) + .WhoseValue.Should().ContainInOrder( + "Implemented Package Rules", + "Error/Required Rules", + "No implemented Error/Required rules available.", + "Warning/Guideline Rules", + "No implemented Warning/Guideline rules available.", + "Information/Suggestion Rules", + "No implemented Information/Suggestion rules available.", + "Note Rules", + "No implemented Note rules available.", + "Disabled Rules", + "No implemented Disabled rules available."); + } + } + + public class When_Run_Is_Called_Using_List_Command_Without_Any_Rules_Available_With_Limited_Output : ChocolateyRuleCommandSpecsBase + { + public override void Context() + { + base.Context(); + Configuration.RegularOutput = false; + + RuleService.Setup(r => r.GetAllAvailableRules()) + .Returns(Array.Empty()); + } + + public override void Because() + { + Command.Run(Configuration); + } + + [Fact] + public void Should_Not_Output_Any_Rules() + { + MockLogger.Messages.Should().NotContainKey(LogLevel.Info.ToString()); + } + } + + public class When_Run_Is_Called_With_Rule_Name_And_Error_Severity : ChocolateyRuleCommandSpecsBase + { + public override void Context() + { + base.Context(); + Configuration.RuleCommand.Name = "ErrorID"; + + RuleService.Setup(r => r.GetAllAvailableRules()) + .Returns(new[] + { + new ImmutableRule(RuleType.Error, "ErrorID", "My Rule Summary", "https://rules.info/rule/ErrorID"), + new ImmutableRule(RuleType.Error, "OtherID", "Some Other Rule Summary") + }); + } + + public override void Because() + { + Command.Run(Configuration); + } + + [Fact] + public void Should_Output_Information_On_Found_Rule() + { + MockLogger.Messages.Should() + .ContainKey(LogLevel.Info.ToString()) + .WhoseValue.Should().ContainInConsecutiveOrder( + "Name: ErrorID | Severity: Error", + "Summary: My Rule Summary", + "Help URL: https://rules.info/rule/ErrorID"); + } + } + + public class When_Run_Is_Called_With_Rule_Name_And_Warning_Severity : ChocolateyRuleCommandSpecsBase + { + public override void Context() + { + base.Context(); + Configuration.RuleCommand.Name = "WarningID"; + + RuleService.Setup(r => r.GetAllAvailableRules()) + .Returns(new[] + { + new ImmutableRule(RuleType.Warning, "WarningID", "My Rule Summary", "https://rules.info/rule/WarningID"), + new ImmutableRule(RuleType.Error, "OtherID", "Some Other Rule Summary") + }); + } + + public override void Because() + { + Command.Run(Configuration); + } + + [Fact] + public void Should_Output_Information_On_Found_Rule() + { + MockLogger.Messages.Should() + .ContainKey(LogLevel.Info.ToString()) + .WhoseValue.Should().ContainInConsecutiveOrder( + "Name: WarningID | Severity: Warning", + "Summary: My Rule Summary", + "Help URL: https://rules.info/rule/WarningID"); + } + } + + public class When_Run_Is_Called_With_Rule_Name_And_Information_Severity : ChocolateyRuleCommandSpecsBase + { + public override void Context() + { + base.Context(); + Configuration.RuleCommand.Name = "InformationID"; + + RuleService.Setup(r => r.GetAllAvailableRules()) + .Returns(new[] + { + new ImmutableRule(RuleType.Information, "InformationID", "My Rule Summary", "https://rules.info/rule/InformationID"), + new ImmutableRule(RuleType.Error, "OtherID", "Some Other Rule Summary") + }); + } + + public override void Because() + { + Command.Run(Configuration); + } + + [Fact] + public void Should_Output_Information_On_Found_Rule() + { + MockLogger.Messages.Should() + .ContainKey(LogLevel.Info.ToString()) + .WhoseValue.Should().ContainInConsecutiveOrder( + "Name: InformationID | Severity: Information", + "Summary: My Rule Summary", + "Help URL: https://rules.info/rule/InformationID"); + } + } + + public class When_Run_Is_Called_With_Rule_Name_And_Note_Severity : ChocolateyRuleCommandSpecsBase + { + public override void Context() + { + base.Context(); + Configuration.RuleCommand.Name = "NoteID"; + + RuleService.Setup(r => r.GetAllAvailableRules()) + .Returns(new[] + { + new ImmutableRule(RuleType.Note, "NoteID", "My Rule Summary", "https://rules.info/rule/NoteID"), + new ImmutableRule(RuleType.Error, "OtherID", "Some Other Rule Summary") + }); + } + + public override void Because() + { + Command.Run(Configuration); + } + + [Fact] + public void Should_Output_Information_On_Found_Rule() + { + MockLogger.Messages.Should() + .ContainKey(LogLevel.Info.ToString()) + .WhoseValue.Should().ContainInConsecutiveOrder( + "Name: NoteID | Severity: Note", + "Summary: My Rule Summary", + "Help URL: https://rules.info/rule/NoteID"); + } + } + + public class When_Run_Is_Called_With_Rule_Name_And_Disabled_Severity : ChocolateyRuleCommandSpecsBase + { + public override void Context() + { + base.Context(); + Configuration.RuleCommand.Name = "DisabledID"; + + RuleService.Setup(r => r.GetAllAvailableRules()) + .Returns(new[] + { + new ImmutableRule(RuleType.None, "DisabledID", "My Rule Summary", "https://rules.info/rule/DisabledID"), + new ImmutableRule(RuleType.Error, "OtherID", "Some Other Rule Summary") + }); + } + + public override void Because() + { + Command.Run(Configuration); + } + + [Fact] + public void Should_Output_Information_On_Found_Rule() + { + MockLogger.Messages.Should() + .ContainKey(LogLevel.Info.ToString()) + .WhoseValue.Should().ContainInConsecutiveOrder( + "Name: DisabledID | Severity: None", + "Summary: My Rule Summary", + "Help URL: https://rules.info/rule/DisabledID"); + } + } + + public class When_Run_Is_Called_With_Rule_Name_And_Does_Not_Exist : ChocolateyRuleCommandSpecsBase + { + public override void Context() + { + base.Context(); + Configuration.RuleCommand.Name = "NoneExistingID"; + + RuleService.Setup(r => r.GetAllAvailableRules()) + .Returns(new[] + { + new ImmutableRule(RuleType.Error, "OtherID", "I should not be found") + }); + } + + public override void Because() + { + } + + [Fact] + public void Throws_Expected_Argument_Exception() + { + Action action = () => Command.Run(Configuration); + action.Should().Throw() + .WithMessage("No rule with the name NoneExistingID could be found."); + } + } + + public class When_Run_Is_Called_With_Rule_Name_And_Limited_Output : ChocolateyRuleCommandSpecsBase + { + public override void Context() + { + base.Context(); + Configuration.RuleCommand.Name = "LimitedRule"; + Configuration.RegularOutput = false; + + RuleService.Setup(r => r.GetAllAvailableRules()) + .Returns(new[] + { + new ImmutableRule(RuleType.Warning, "LimitedRule", "I am the summary of a warning.", "https://limited.info/rules/CCCC"), + new ImmutableRule(RuleType.Warning, "OtherID", "I Should Not be Outputted") + }); + } + + public override void Because() + { + Command.Run(Configuration); + } + + [Fact] + public void Should_Only_Output_Single_Rule_In_Parsable_Output() + { + MockLogger.Messages.Should() + .ContainKey(LogLevel.Info.ToString()) + .WhoseValue.Should().OnlyContain(v => v == "Warning|LimitedRule|I am the summary of a warning.|https://limited.info/rules/CCCC"); + } + } + + public class When_Run_Is_Called_With_Not_Found_Rule_Name_And_Limited_Output : ChocolateyRuleCommandSpecsBase + { + public override void Context() + { + base.Context(); + Configuration.RuleCommand.Name = "LimitedRule"; + Configuration.RegularOutput = false; + + RuleService.Setup(r => r.GetAllAvailableRules()) + .Returns(new[] + { + new ImmutableRule(RuleType.Warning, "OtherID", "I Should Not be Outputted") + }); + } + + public override void Because() + { + Command.Run(Configuration); + } + + [Fact] + public void Should_Not_Output_Any_Rules() + { + MockLogger.Messages.Should().NotContainKey(LogLevel.Info.ToString()); + } + } + } +} diff --git a/src/chocolatey.tests/infrastructure.app/commands/ChocolateySearchCommandSpecs.cs b/src/chocolatey.tests/infrastructure.app/commands/ChocolateySearchCommandSpecs.cs index ef8315c0e0..685974fd49 100644 --- a/src/chocolatey.tests/infrastructure.app/commands/ChocolateySearchCommandSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/commands/ChocolateySearchCommandSpecs.cs @@ -14,19 +14,19 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Linq; +using chocolatey.infrastructure.app.attributes; +using chocolatey.infrastructure.app.commands; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.services; +using chocolatey.infrastructure.commandline; +using Moq; +using FluentAssertions; + namespace chocolatey.tests.infrastructure.app.commands { - using System; - using System.Collections.Generic; - using System.Linq; - using chocolatey.infrastructure.app.attributes; - using chocolatey.infrastructure.app.commands; - using chocolatey.infrastructure.app.configuration; - using chocolatey.infrastructure.app.services; - using chocolatey.infrastructure.commandline; - using Moq; - using FluentAssertions; - public class ChocolateySearchCommandSpecs { [ConcernFor("search")] @@ -158,6 +158,12 @@ public void Should_add_short_version_of_password_to_the_option_set() { _optionSet.Contains("p").Should().BeTrue(); } + + [Fact] + public void Should_add_include_configured_sources_to_the_option_set() + { + _optionSet.Contains("include-configured-sources").Should().BeTrue(); + } } [NUnit.Framework.TestFixture("search")] diff --git a/src/chocolatey.tests/infrastructure.app/commands/ChocolateySourceCommandSpecs.cs b/src/chocolatey.tests/infrastructure.app/commands/ChocolateySourceCommandSpecs.cs index 12a61594e4..be85240a27 100644 --- a/src/chocolatey.tests/infrastructure.app/commands/ChocolateySourceCommandSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/commands/ChocolateySourceCommandSpecs.cs @@ -14,20 +14,20 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Linq; +using chocolatey.infrastructure.app.attributes; +using chocolatey.infrastructure.app.commands; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.domain; +using chocolatey.infrastructure.app.services; +using chocolatey.infrastructure.commandline; +using Moq; +using FluentAssertions; + namespace chocolatey.tests.infrastructure.app.commands { - using System; - using System.Collections.Generic; - using System.Linq; - using chocolatey.infrastructure.app.attributes; - using chocolatey.infrastructure.app.commands; - using chocolatey.infrastructure.app.configuration; - using chocolatey.infrastructure.app.domain; - using chocolatey.infrastructure.app.services; - using chocolatey.infrastructure.commandline; - using Moq; - using FluentAssertions; - public class ChocolateySourceCommandSpecs { [ConcernFor("source")] diff --git a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyTemplateCommandSpecs.cs b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyTemplateCommandSpecs.cs index 9ac08eaef6..bab44c3a3f 100644 --- a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyTemplateCommandSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyTemplateCommandSpecs.cs @@ -1,35 +1,35 @@ -// Copyright © 2017 - 2021 Chocolatey Software, Inc -// Copyright © 2011 - 2017 RealDimensions Software, LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -namespace chocolatey.tests.infrastructure.app.commands -{ - using System; - using System.Collections.Generic; - using System.Linq; - using chocolatey.infrastructure.app.attributes; - using chocolatey.infrastructure.app.commands; - using chocolatey.infrastructure.app.configuration; - using chocolatey.infrastructure.app.domain; - using chocolatey.infrastructure.app.services; - using chocolatey.infrastructure.commandline; - using chocolatey.infrastructure.filesystem; - using Moq; - using FluentAssertions; - - public class ChocolateyTemplateCommandSpecs +// Copyright © 2017 - 2021 Chocolatey Software, Inc +// Copyright © 2011 - 2017 RealDimensions Software, LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +using System; +using System.Collections.Generic; +using System.Linq; +using chocolatey.infrastructure.app.attributes; +using chocolatey.infrastructure.app.commands; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.domain; +using chocolatey.infrastructure.app.services; +using chocolatey.infrastructure.commandline; +using chocolatey.infrastructure.filesystem; +using Moq; +using FluentAssertions; + +namespace chocolatey.tests.infrastructure.app.commands +{ + public class ChocolateyTemplateCommandSpecs { [ConcernFor("template")] public abstract class ChocolateyTemplateCommandSpecsBase : TinySpec diff --git a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyUninstallCommandSpecs.cs b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyUninstallCommandSpecs.cs index bd845698fb..3442cacdd8 100644 --- a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyUninstallCommandSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyUninstallCommandSpecs.cs @@ -14,20 +14,20 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Linq; +using chocolatey.infrastructure.app.attributes; +using chocolatey.infrastructure.app.commands; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.domain; +using chocolatey.infrastructure.app.services; +using chocolatey.infrastructure.commandline; +using Moq; +using FluentAssertions; + namespace chocolatey.tests.infrastructure.app.commands { - using System; - using System.Collections.Generic; - using System.Linq; - using chocolatey.infrastructure.app.attributes; - using chocolatey.infrastructure.app.commands; - using chocolatey.infrastructure.app.configuration; - using chocolatey.infrastructure.app.domain; - using chocolatey.infrastructure.app.services; - using chocolatey.infrastructure.commandline; - using Moq; - using FluentAssertions; - public class ChocolateyUninstallCommandSpecs { [ConcernFor("uninstall")] diff --git a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyUnpackSelfCommandSpecs.cs b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyUnpackSelfCommandSpecs.cs index 98a44eb6b3..3bab755c38 100644 --- a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyUnpackSelfCommandSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyUnpackSelfCommandSpecs.cs @@ -14,19 +14,19 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Linq; +using chocolatey.infrastructure.adapters; +using chocolatey.infrastructure.app.attributes; +using chocolatey.infrastructure.app.commands; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.filesystem; +using Moq; +using FluentAssertions; + namespace chocolatey.tests.infrastructure.app.commands { - using System; - using System.Collections.Generic; - using System.Linq; - using chocolatey.infrastructure.adapters; - using chocolatey.infrastructure.app.attributes; - using chocolatey.infrastructure.app.commands; - using chocolatey.infrastructure.app.configuration; - using chocolatey.infrastructure.filesystem; - using Moq; - using FluentAssertions; - public class ChocolateyUnpackSelfCommandSpecs { [ConcernFor("unpackself")] diff --git a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyUpgradeCommandSpecs.cs b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyUpgradeCommandSpecs.cs index 3cacb24ffa..b9a68cc630 100644 --- a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyUpgradeCommandSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyUpgradeCommandSpecs.cs @@ -14,20 +14,20 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Linq; +using chocolatey.infrastructure.app.attributes; +using chocolatey.infrastructure.app.commands; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.domain; +using chocolatey.infrastructure.app.services; +using chocolatey.infrastructure.commandline; +using Moq; +using FluentAssertions; + namespace chocolatey.tests.infrastructure.app.commands { - using System; - using System.Collections.Generic; - using System.Linq; - using chocolatey.infrastructure.app.attributes; - using chocolatey.infrastructure.app.commands; - using chocolatey.infrastructure.app.configuration; - using chocolatey.infrastructure.app.domain; - using chocolatey.infrastructure.app.services; - using chocolatey.infrastructure.commandline; - using Moq; - using FluentAssertions; - public class ChocolateyUpgradeCommandSpecs { [ConcernFor("upgrade")] @@ -236,6 +236,18 @@ public void Should_add_short_version_of_skip_hooks_to_the_option_set() { _optionSet.Contains("skiphooks").Should().BeTrue(); } + + [Fact] + public void Should_add_ignore_pinned_to_the_option_set() + { + _optionSet.Contains("ignore-pinned").Should().BeTrue(); + } + + [Fact] + public void Should_add_include_configured_sources_to_the_option_set() + { + _optionSet.Contains("include-configured-sources").Should().BeTrue(); + } } public class When_handling_additional_argument_parsing : ChocolateyUpgradeCommandSpecsBase diff --git a/src/chocolatey.tests/infrastructure.app/configuration/ConfigurationOptionsSpec.cs b/src/chocolatey.tests/infrastructure.app/configuration/ConfigurationOptionsSpec.cs index ca131092de..eba1c4e50a 100644 --- a/src/chocolatey.tests/infrastructure.app/configuration/ConfigurationOptionsSpec.cs +++ b/src/chocolatey.tests/infrastructure.app/configuration/ConfigurationOptionsSpec.cs @@ -14,19 +14,19 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using chocolatey.infrastructure.adapters; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.commandline; +using Moq; +using FluentAssertions; + namespace chocolatey.tests.infrastructure.app.configuration { - using System; - using System.Collections.Generic; - using System.IO; - using System.Linq; - using System.Text; - using chocolatey.infrastructure.adapters; - using chocolatey.infrastructure.app.configuration; - using chocolatey.infrastructure.commandline; - using Moq; - using FluentAssertions; - public class ConfigurationOptionsSpec { public abstract class ConfigurationOptionsSpecBase : TinySpec diff --git a/src/chocolatey.tests/infrastructure.app/nuget/ChocolateyNuGetProjectContextSpecs.cs b/src/chocolatey.tests/infrastructure.app/nuget/ChocolateyNuGetProjectContextSpecs.cs index 371bcf5c16..ebbd015ef0 100644 --- a/src/chocolatey.tests/infrastructure.app/nuget/ChocolateyNuGetProjectContextSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/nuget/ChocolateyNuGetProjectContextSpecs.cs @@ -13,16 +13,16 @@ // See the License for the specific language governing permissions and // limitations under the License. +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.nuget; +using Moq; +using NuGet.Common; +using NuGet.ProjectManagement; +using NUnit.Framework; +using FluentAssertions; + namespace chocolatey.tests.infrastructure.app.nuget { - using chocolatey.infrastructure.app.configuration; - using chocolatey.infrastructure.app.nuget; - using Moq; - using NuGet.Common; - using NuGet.ProjectManagement; - using NUnit.Framework; - using FluentAssertions; - public class ChocolateyNuGetProjectContextSpecs { public abstract class ChocolateyNuGetProjectContextSpecsBase : TinySpec @@ -84,8 +84,8 @@ public void Should_log_info_information_in_child_logger() //Logger.VerifyNoOtherCalls(); } - [TestCase(LogLevel.Debug)] - public void Should_log_to_child_logger_and_pass_along_original_message(LogLevel logLevel) + [TestCase(NuGet.Common.LogLevel.Debug)] + public void Should_log_to_child_logger_and_pass_along_original_message(NuGet.Common.LogLevel logLevel) { var logMessage = new LogMessage(logLevel, "My awesome message"); @@ -122,7 +122,7 @@ public void Should_report_errors_to_child_logger() [Fact] public void Should_report_errors_with_message_to_child_logger() { - var logMessage = new LogMessage(LogLevel.Debug, "Some message"); + var logMessage = new LogMessage(NuGet.Common.LogLevel.Debug, "Some message"); Service.ReportError(logMessage); diff --git a/src/chocolatey.tests/infrastructure.app/nuget/ChocolateyNugetLoggerSpecs.cs b/src/chocolatey.tests/infrastructure.app/nuget/ChocolateyNugetLoggerSpecs.cs index 643c7c3b22..cf235d75c3 100644 --- a/src/chocolatey.tests/infrastructure.app/nuget/ChocolateyNugetLoggerSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/nuget/ChocolateyNugetLoggerSpecs.cs @@ -13,18 +13,18 @@ // See the License for the specific language governing permissions and // limitations under the License. -namespace chocolatey.tests.infrastructure.app.nuget -{ - using System; - using System.Threading.Tasks; - using chocolatey.infrastructure.app.nuget; - using NuGet.Common; - using NUnit.Framework; - using FluentAssertions; +using System; +using System.Threading.Tasks; +using chocolatey.infrastructure.app.nuget; +using NuGet.Common; +using NUnit.Framework; +using FluentAssertions; - using LogLevel = chocolatey.tests.LogLevel; - using NuGetLogLevel = NuGet.Common.LogLevel; +using LogLevel = chocolatey.tests.LogLevel; +using NuGetLogLevel = NuGet.Common.LogLevel; +namespace chocolatey.tests.infrastructure.app.nuget +{ public class ChocolateyNugetLoggerSpecs { [Categories.Logging] diff --git a/src/chocolatey.tests/infrastructure.app/nuget/NugetCommonSpecs.cs b/src/chocolatey.tests/infrastructure.app/nuget/NugetCommonSpecs.cs index 3958a9a21a..2310a1a30a 100644 --- a/src/chocolatey.tests/infrastructure.app/nuget/NugetCommonSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/nuget/NugetCommonSpecs.cs @@ -14,22 +14,22 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Linq; +using chocolatey.infrastructure.app; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.nuget; +using chocolatey.infrastructure.filesystem; +using Moq; +using NuGet.Common; +using NuGet.Packaging; +using NuGet.Protocol; +using NuGet.Protocol.Core.Types; +using FluentAssertions; + namespace chocolatey.tests.infrastructure.app.nuget { - using System; - using System.Collections.Generic; - using System.Linq; - using chocolatey.infrastructure.app; - using chocolatey.infrastructure.app.configuration; - using chocolatey.infrastructure.app.nuget; - using chocolatey.infrastructure.filesystem; - using Moq; - using NuGet.Common; - using NuGet.Packaging; - using NuGet.Protocol; - using NuGet.Protocol.Core.Types; - using FluentAssertions; - public class NugetCommonSpecs { private class When_gets_remote_repository : TinySpec @@ -174,8 +174,8 @@ public void Should_set_user_agent_string() _because(); // Change this when the NuGet version is updated. - string nugetClientVersion = "6.4.1"; - string expectedUserAgentString = "{0}/{1} via NuGet Client/{2}".FormatWith(ApplicationParameters.UserAgent, _configuration.Information.ChocolateyProductVersion, nugetClientVersion); + var nugetClientVersion = "6.4.1"; + var expectedUserAgentString = "{0}/{1} via NuGet Client/{2}".FormatWith(ApplicationParameters.UserAgent, _configuration.Information.ChocolateyProductVersion, nugetClientVersion); UserAgent.UserAgentString.Should().StartWith(expectedUserAgentString); } } diff --git a/src/chocolatey.tests/infrastructure.app/services/AutomaticUninstallerServiceSpecs.cs b/src/chocolatey.tests/infrastructure.app/services/AutomaticUninstallerServiceSpecs.cs index 8be49c1cf9..ccdb877ab0 100644 --- a/src/chocolatey.tests/infrastructure.app/services/AutomaticUninstallerServiceSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/services/AutomaticUninstallerServiceSpecs.cs @@ -14,27 +14,27 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using chocolatey.infrastructure.adapters; +using chocolatey.infrastructure.app; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.domain; +using chocolatey.infrastructure.app.domain.installers; +using chocolatey.infrastructure.app.services; +using chocolatey.infrastructure.commands; +using chocolatey.infrastructure.results; +using Moq; +using NuGet.Packaging; +using NuGet.Versioning; +using IFileSystem = chocolatey.infrastructure.filesystem.IFileSystem; + namespace chocolatey.tests.infrastructure.app.services { - using System; - using System.Collections.Concurrent; - using System.Collections.Generic; - using System.Diagnostics; - using System.IO; - using System.Linq; - using chocolatey.infrastructure.adapters; - using chocolatey.infrastructure.app; - using chocolatey.infrastructure.app.configuration; - using chocolatey.infrastructure.app.domain; - using chocolatey.infrastructure.app.domain.installers; - using chocolatey.infrastructure.app.services; - using chocolatey.infrastructure.commands; - using chocolatey.infrastructure.results; - using Moq; - using NuGet.Packaging; - using NuGet.Versioning; - using IFileSystem = chocolatey.infrastructure.filesystem.IFileSystem; - public class AutomaticUninstallerServiceSpecs { public abstract class AutomaticUninstallerServiceSpecsBase : TinySpec @@ -61,8 +61,10 @@ public override void Context() { chocolatey.infrastructure.commands.CommandExecutor.InitializeWith(new Lazy(() => FileSystem.Object), () => Process.Object); - Service = new AutomaticUninstallerService(PackageInfoService.Object, FileSystem.Object, RegistryService.Object, CommandExecutor.Object); - Service.WaitForCleanup = false; + Service = new AutomaticUninstallerService(PackageInfoService.Object, FileSystem.Object, RegistryService.Object, CommandExecutor.Object) + { + WaitForCleanup = false + }; Config.Features.AutoUninstaller = true; Config.PromptForConfirmation = false; Config.PackageNames = "regular"; @@ -123,7 +125,7 @@ public void Should_not_get_package_information() public void Should_not_call_command_executor() { CommandExecutor.Verify( - c => c.Execute(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny>(), It.IsAny>(), It.IsAny()), + c => c.Execute(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny>(), It.IsAny>(), It.IsAny()), Times.Never); } } @@ -131,7 +133,7 @@ public void Should_not_call_command_executor() public class When_an_autoUninstaller_skip_file_exists : AutomaticUninstallerServiceSpecsBase { private string _skipFileName = ".skipAutoUninstall"; - IEnumerable _fileList = new List() { "c:\\.skipAutoUninstall" }; + private IEnumerable _fileList = new List() { "c:\\.skipAutoUninstall" }; public override void Context() { base.Context(); @@ -153,7 +155,7 @@ public void Should_log_why_it_skips_auto_uninstaller() public void Should_not_call_command_executor() { CommandExecutor.Verify( - c => c.Execute(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny>(), It.IsAny>(), It.IsAny()), + c => c.Execute(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny>(), It.IsAny>(), It.IsAny()), Times.Never); } } @@ -181,7 +183,7 @@ public void Should_log_why_it_skips_auto_uninstaller() public void Should_not_call_command_executor() { CommandExecutor.Verify( - c => c.Execute(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny>(), It.IsAny>(), It.IsAny()), + c => c.Execute(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny>(), It.IsAny>(), It.IsAny()), Times.Never); } } @@ -209,7 +211,7 @@ public void Should_log_why_it_skips_auto_uninstaller() public void Should_not_call_command_executor() { CommandExecutor.Verify( - c => c.Execute(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny>(), It.IsAny>(), It.IsAny()), + c => c.Execute(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny>(), It.IsAny>(), It.IsAny()), Times.Never); } } @@ -237,7 +239,7 @@ public void Should_log_why_it_skips_auto_uninstaller() public void Should_not_call_command_executor() { CommandExecutor.Verify( - c => c.Execute(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny>(), It.IsAny>(), It.IsAny()), + c => c.Execute(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny>(), It.IsAny>(), It.IsAny()), Times.Never); } } @@ -267,7 +269,7 @@ public void Should_log_why_it_skips_auto_uninstaller() public void Should_not_call_command_executor() { CommandExecutor.Verify( - c => c.Execute(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny>(), It.IsAny>(), It.IsAny()), + c => c.Execute(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny>(), It.IsAny>(), It.IsAny()), Times.Never); } } @@ -348,7 +350,7 @@ public void Should_log_why_it_skips_auto_uninstaller() public void Should_not_call_command_executor() { CommandExecutor.Verify( - c => c.Execute(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny>(), It.IsAny>(), It.IsAny()), + c => c.Execute(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny>(), It.IsAny>(), It.IsAny()), Times.Never); } } @@ -377,7 +379,7 @@ public void Should_log_why_it_skips_auto_uninstaller() public void Should_not_call_command_executor() { CommandExecutor.Verify( - c => c.Execute(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny>(), It.IsAny>(), It.IsAny()), + c => c.Execute(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny>(), It.IsAny>(), It.IsAny()), Times.Never); } } @@ -409,7 +411,7 @@ public void Should_log_why_it_skips_auto_uninstaller() public void Should_not_call_command_executor() { CommandExecutor.Verify( - c => c.Execute(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny>(), It.IsAny>(), It.IsAny()), + c => c.Execute(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny>(), It.IsAny>(), It.IsAny()), Times.Never); } } @@ -440,7 +442,7 @@ public void Should_log_why_it_skips_auto_uninstaller() public void Should_not_call_command_executor() { CommandExecutor.Verify( - c => c.Execute(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny>(), It.IsAny>(), It.IsAny()), + c => c.Execute(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny>(), It.IsAny>(), It.IsAny()), Times.Never); } } @@ -658,14 +660,14 @@ public void Should_log_why_it_skips_auto_uninstaller() public void Should_not_call_command_executor() { CommandExecutor.Verify( - c => c.Execute(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny>(), It.IsAny>(), It.IsAny()), + c => c.Execute(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny>(), It.IsAny>(), It.IsAny()), Times.Never); } } public class When_AutomaticUninstallerService_is_passed_uninstall_arguments_from_command_line : AutomaticUninstallerServiceSpecsBase { - IInstaller _installerType = new InnoSetupInstaller(); + private IInstaller _installerType = new InnoSetupInstaller(); public override void Context() { @@ -719,7 +721,7 @@ public void Should_call_command_executor_appending_passed_arguments() public class When_AutomaticUninstallerService_is_passed_overriding_uninstall_arguments_from_command_line : AutomaticUninstallerServiceSpecsBase { - IInstaller _installerType = new InnoSetupInstaller(); + private IInstaller _installerType = new InnoSetupInstaller(); public override void Context() { diff --git a/src/chocolatey.tests/infrastructure.app/services/ChocolateyConfigSettingsServiceSpecs.cs b/src/chocolatey.tests/infrastructure.app/services/ChocolateyConfigSettingsServiceSpecs.cs index 72e69d6c79..6ac4f3e0ea 100644 --- a/src/chocolatey.tests/infrastructure.app/services/ChocolateyConfigSettingsServiceSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/services/ChocolateyConfigSettingsServiceSpecs.cs @@ -1,15 +1,17 @@ -namespace chocolatey.tests.integration.infrastructure.app.services +using System; +using System.Collections.Generic; +using System.Linq; +using chocolatey.infrastructure.app; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.nuget; +using chocolatey.infrastructure.app.services; +using chocolatey.infrastructure.services; +using FluentAssertions; +using FluentAssertions.Execution; +using Moq; + +namespace chocolatey.tests.integration.infrastructure.app.services { - using System; - using System.Collections.Generic; - using System.Linq; - using chocolatey.infrastructure.app; - using chocolatey.infrastructure.app.configuration; - using chocolatey.infrastructure.app.services; - using chocolatey.infrastructure.services; - using Moq; - using FluentAssertions; - public class ChocolateyConfigSettingsServiceSpecs { public abstract class ChocolateyConfigSettingsServiceSpecsBase : TinySpec @@ -167,8 +169,8 @@ public void Should_throw_exception_on_unsupported_feature() Service.DisableFeature(config); }; - action.Should().Throw() - .WithMessage("Feature '{0}' is not supported.".FormatWith(FeatureName)); + action.Should().Throw() + .WithMessage("Feature '{0}' is not supported.".FormatWith(FeatureName)); } } @@ -572,5 +574,905 @@ public void Should_return_feature_status() infoMessages[0].Should().Contain("Enabled"); } } + + public class When_ChocolateyConfigSettingsService_AddSource_When_Source_Already_Exists : ChocolateyConfigSettingsServiceSpecsBase + { + public override void Because() + { + var config = new ChocolateyConfiguration() + { + RegularOutput = true, + Sources = "https://test.org/api/v2", + SourceCommand = new SourcesCommandConfiguration() + { + Name = "testSource", + Command = chocolatey.infrastructure.app.domain.SourceCommandType.Add + }, + Features = new FeaturesConfiguration() + { + UseEnhancedExitCodes = false + } + }; + + Service.AddSource(config); + } + + public override void Context() + { + base.Context(); + + XmlService.Setup(x => x.Deserialize(ApplicationParameters.GlobalConfigFileLocation)) + .Returns(new ConfigFileSettings + { + Sources = new HashSet + { + new ConfigFileSourceSetting() + { + Id = "testSource", + Value = "https://test.org/api/v2" + } + } + }); + + Service = new ChocolateyConfigSettingsService(XmlService.Object); + } + + [Fact] + public void Should_return_exit_code_0() + { + using (new AssertionScope()) + { + MockLogger.Messages.Should().ContainKey("Warn").WhoseValue.Should().ContainSingle().And.Contain("Nothing to change. Config already set."); + Environment.ExitCode.Should().Be(0); + } + } + } + + public class When_ChocolateyConfigSettingsService_AddSource_When_Source_Already_Exists_With_Enhanced_Exit_Codes : ChocolateyConfigSettingsServiceSpecsBase + { + public override void Because() + { + var config = new ChocolateyConfiguration() + { + RegularOutput = true, + Sources = "https://test.org/api/v2", + SourceCommand = new SourcesCommandConfiguration() + { + Name = "testSource", + Command = chocolatey.infrastructure.app.domain.SourceCommandType.Add + }, + Features = new FeaturesConfiguration() + { + UseEnhancedExitCodes = true + } + }; + + Service.AddSource(config); + } + + public override void Context() + { + base.Context(); + + XmlService.Setup(x => x.Deserialize(ApplicationParameters.GlobalConfigFileLocation)) + .Returns(new ConfigFileSettings + { + Sources = new HashSet + { + new ConfigFileSourceSetting() + { + Id = "testSource", + Value = "https://test.org/api/v2" + } + } + }); + + Service = new ChocolateyConfigSettingsService(XmlService.Object); + } + + [Fact] + public void Should_return_exit_code_2() + { + using (new AssertionScope()) + { + MockLogger.Messages.Should().ContainKey("Warn").WhoseValue.Should().ContainSingle().And.Contain("Nothing to change. Config already set."); + Environment.ExitCode.Should().Be(2); + } + } + } + + public class When_ChocolateyConfigSettingsService_RemoveSource_When_Source_Doesnt_Exist : ChocolateyConfigSettingsServiceSpecsBase + { + public override void Because() + { + var config = new ChocolateyConfiguration() + { + RegularOutput = true, + Sources = "https://test.org/api/v2", + SourceCommand = new SourcesCommandConfiguration() + { + Name = "testSource", + Command = chocolatey.infrastructure.app.domain.SourceCommandType.Remove + }, + Features = new FeaturesConfiguration() + { + UseEnhancedExitCodes = false + } + }; + + Service.RemoveSource(config); + } + + public override void Context() + { + base.Context(); + + XmlService.Setup(x => x.Deserialize(ApplicationParameters.GlobalConfigFileLocation)) + .Returns(new ConfigFileSettings + { + Sources = new HashSet() + }); + + Service = new ChocolateyConfigSettingsService(XmlService.Object); + } + + [Fact] + public void Should_return_exit_code_0() + { + using (new AssertionScope()) + { + MockLogger.Messages.Should().ContainKey("Warn").WhoseValue.Should().ContainSingle().And.Contain("Nothing to change. Config already set."); + Environment.ExitCode.Should().Be(0); + } + } + } + + public class When_ChocolateyConfigSettingsService_RemoveSource_When_Source_Doesnt_Exist_With_Enhanced_Exit_Codes : ChocolateyConfigSettingsServiceSpecsBase + { + public override void Because() + { + var config = new ChocolateyConfiguration() + { + RegularOutput = true, + Sources = "https://test.org/api/v2", + SourceCommand = new SourcesCommandConfiguration() + { + Name = "testSource", + Command = chocolatey.infrastructure.app.domain.SourceCommandType.Remove + }, + Features = new FeaturesConfiguration() + { + UseEnhancedExitCodes = true + } + }; + + Service.RemoveSource(config); + } + + public override void Context() + { + base.Context(); + + XmlService.Setup(x => x.Deserialize(ApplicationParameters.GlobalConfigFileLocation)) + .Returns(new ConfigFileSettings + { + Sources = new HashSet() + }); + + Service = new ChocolateyConfigSettingsService(XmlService.Object); + } + + [Fact] + public void Should_return_exit_code_2() + { + using (new AssertionScope()) + { + MockLogger.Messages.Should().ContainKey("Warn").WhoseValue.Should().ContainSingle().And.Contain("Nothing to change. Config already set."); + Environment.ExitCode.Should().Be(2); + } + } + } + + public class When_ChocolateyConfigSettingsService_DisableSource_When_Source_Doesnt_Exist : ChocolateyConfigSettingsServiceSpecsBase + { + public override void Because() + { + var config = new ChocolateyConfiguration() + { + RegularOutput = true, + Sources = "https://test.org/api/v2", + SourceCommand = new SourcesCommandConfiguration() + { + Name = "testSource", + Command = chocolatey.infrastructure.app.domain.SourceCommandType.Disable + }, + Features = new FeaturesConfiguration() + { + UseEnhancedExitCodes = false + } + }; + + Service.DisableSource(config); + } + + public override void Context() + { + base.Context(); + + XmlService.Setup(x => x.Deserialize(ApplicationParameters.GlobalConfigFileLocation)) + .Returns(new ConfigFileSettings + { + Sources = new HashSet() + }); + + Service = new ChocolateyConfigSettingsService(XmlService.Object); + } + + [Fact] + public void Should_return_exit_code_0() + { + using (new AssertionScope()) + { + MockLogger.Messages.Should().ContainKey("Warn").WhoseValue.Should().ContainSingle().And.Contain("Nothing to change. Config already set."); + Environment.ExitCode.Should().Be(0); + } + } + } + + public class When_ChocolateyConfigSettingsService_DisableSource_When_Source_Doesnt_Exist_With_Enhanced_Exit_Codes : ChocolateyConfigSettingsServiceSpecsBase + { + public override void Because() + { + var config = new ChocolateyConfiguration() + { + RegularOutput = true, + Sources = "https://test.org/api/v2", + SourceCommand = new SourcesCommandConfiguration() + { + Name = "testSource", + Command = chocolatey.infrastructure.app.domain.SourceCommandType.Disable + }, + Features = new FeaturesConfiguration() + { + UseEnhancedExitCodes = true + } + }; + + Service.DisableSource(config); + } + + public override void Context() + { + base.Context(); + + XmlService.Setup(x => x.Deserialize(ApplicationParameters.GlobalConfigFileLocation)) + .Returns(new ConfigFileSettings + { + Sources = new HashSet() + }); + + Service = new ChocolateyConfigSettingsService(XmlService.Object); + } + + [Fact] + public void Should_return_exit_code_2() + { + using (new AssertionScope()) + { + MockLogger.Messages.Should().ContainKey("Warn").WhoseValue.Should().ContainSingle().And.Contain("Nothing to change. Config already set."); + Environment.ExitCode.Should().Be(2); + } + } + } + + public class When_ChocolateyConfigSettingsService_EnableSource_When_Source_Doesnt_Exist : ChocolateyConfigSettingsServiceSpecsBase + { + public override void Because() + { + var config = new ChocolateyConfiguration() + { + RegularOutput = true, + Sources = "https://test.org/api/v2", + SourceCommand = new SourcesCommandConfiguration() + { + Name = "testSource", + Command = chocolatey.infrastructure.app.domain.SourceCommandType.Enable + }, + Features = new FeaturesConfiguration() + { + UseEnhancedExitCodes = false + } + }; + + Service.EnableSource(config); + } + + public override void Context() + { + base.Context(); + + XmlService.Setup(x => x.Deserialize(ApplicationParameters.GlobalConfigFileLocation)) + .Returns(new ConfigFileSettings + { + Sources = new HashSet() + }); + + Service = new ChocolateyConfigSettingsService(XmlService.Object); + } + + [Fact] + public void Should_return_exit_code_0() + { + using (new AssertionScope()) + { + MockLogger.Messages.Should().ContainKey("Warn").WhoseValue.Should().ContainSingle().And.Contain("Nothing to change. Config already set."); + Environment.ExitCode.Should().Be(0); + } + } + } + + public class When_ChocolateyConfigSettingsService_EnableSource_When_Source_Doesnt_Exist_With_Enhanced_Exit_Codes : ChocolateyConfigSettingsServiceSpecsBase + { + public override void Because() + { + var config = new ChocolateyConfiguration() + { + RegularOutput = true, + Sources = "https://test.org/api/v2", + SourceCommand = new SourcesCommandConfiguration() + { + Name = "testSource", + Command = chocolatey.infrastructure.app.domain.SourceCommandType.Enable + }, + Features = new FeaturesConfiguration() + { + UseEnhancedExitCodes = true + } + }; + + Service.EnableSource(config); + } + + public override void Context() + { + base.Context(); + + XmlService.Setup(x => x.Deserialize(ApplicationParameters.GlobalConfigFileLocation)) + .Returns(new ConfigFileSettings + { + Sources = new HashSet() + }); + + Service = new ChocolateyConfigSettingsService(XmlService.Object); + } + + [Fact] + public void Should_return_exit_code_2() + { + using (new AssertionScope()) + { + MockLogger.Messages.Should().ContainKey("Warn").WhoseValue.Should().ContainSingle().And.Contain("Nothing to change. Config already set."); + Environment.ExitCode.Should().Be(2); + } + } + } + + public class When_ChocolateyConfigSettingsService_DisableFeature_When_Feature_Already_Disabled : ChocolateyConfigSettingsServiceSpecsBase + { + public override void Because() + { + var config = new ChocolateyConfiguration() + { + RegularOutput = true, + FeatureCommand = new FeatureCommandConfiguration() + { + Name = ApplicationParameters.Features.ChecksumFiles, + Command = chocolatey.infrastructure.app.domain.FeatureCommandType.Disable + }, + Features = new FeaturesConfiguration() + { + UseEnhancedExitCodes = false + } + }; + + Service.DisableFeature(config); + } + + public override void Context() + { + base.Context(); + + XmlService.Setup(x => x.Deserialize(ApplicationParameters.GlobalConfigFileLocation)) + .Returns(new ConfigFileSettings + { + Features = new HashSet + { + new ConfigFileFeatureSetting + { + Name = ApplicationParameters.Features.ChecksumFiles, + Enabled = false, + SetExplicitly = true + } + } + }); + + Service = new ChocolateyConfigSettingsService(XmlService.Object); + } + + [Fact] + public void Should_return_exit_code_0() + { + using (new AssertionScope()) + { + MockLogger.Messages.Should().ContainKey("Warn").WhoseValue.Should().ContainSingle().And.Contain("Nothing to change. Config already set."); + Environment.ExitCode.Should().Be(0); + } + } + } + + public class When_ChocolateyConfigSettingsService_DisableFeature_When_Feature_Already_Disabled_With_Enhanced_Exit_Codes : ChocolateyConfigSettingsServiceSpecsBase + { + public override void Because() + { + var config = new ChocolateyConfiguration() + { + RegularOutput = true, + FeatureCommand = new FeatureCommandConfiguration() + { + Name = ApplicationParameters.Features.ChecksumFiles, + Command = chocolatey.infrastructure.app.domain.FeatureCommandType.Disable + }, + Features = new FeaturesConfiguration() + { + UseEnhancedExitCodes = true + } + }; + + Service.DisableFeature(config); + } + + public override void Context() + { + base.Context(); + + XmlService.Setup(x => x.Deserialize(ApplicationParameters.GlobalConfigFileLocation)) + .Returns(new ConfigFileSettings + { + Features = new HashSet + { + new ConfigFileFeatureSetting + { + Name = ApplicationParameters.Features.ChecksumFiles, + Enabled = false, + SetExplicitly = true + } + } + }); + + Service = new ChocolateyConfigSettingsService(XmlService.Object); + } + + [Fact] + public void Should_return_exit_code_2() + { + using (new AssertionScope()) + { + MockLogger.Messages.Should().ContainKey("Warn").WhoseValue.Should().ContainSingle().And.Contain("Nothing to change. Config already set."); + Environment.ExitCode.Should().Be(2); + } + } + } + + public class When_ChocolateyConfigSettingsService_EnableFeature_When_Feature_Already_Enabled: ChocolateyConfigSettingsServiceSpecsBase + { + public override void Because() + { + var config = new ChocolateyConfiguration() + { + RegularOutput = true, + FeatureCommand = new FeatureCommandConfiguration() + { + Name = ApplicationParameters.Features.ChecksumFiles, + Command = chocolatey.infrastructure.app.domain.FeatureCommandType.Enable + }, + Features = new FeaturesConfiguration() + { + UseEnhancedExitCodes = false + } + }; + + Service.EnableFeature(config); + } + + public override void Context() + { + base.Context(); + + XmlService.Setup(x => x.Deserialize(ApplicationParameters.GlobalConfigFileLocation)) + .Returns(new ConfigFileSettings + { + Features = new HashSet + { + new ConfigFileFeatureSetting + { + Name = ApplicationParameters.Features.ChecksumFiles, + Enabled = true, + SetExplicitly = true + } + } + }); + + Service = new ChocolateyConfigSettingsService(XmlService.Object); + } + + [Fact] + public void Should_return_exit_code_0() + { + using (new AssertionScope()) + { + MockLogger.Messages.Should().ContainKey("Warn").WhoseValue.Should().ContainSingle().And.Contain("Nothing to change. Config already set."); + Environment.ExitCode.Should().Be(0); + } + } + } + + public class When_ChocolateyConfigSettingsService_EnableFeature_When_Feature_Already_Enabled_With_Enhanced_Exit_Codes : ChocolateyConfigSettingsServiceSpecsBase + { + public override void Because() + { + var config = new ChocolateyConfiguration() + { + RegularOutput = true, + FeatureCommand = new FeatureCommandConfiguration() + { + Name = ApplicationParameters.Features.ChecksumFiles, + Command = chocolatey.infrastructure.app.domain.FeatureCommandType.Enable + }, + Features = new FeaturesConfiguration() + { + UseEnhancedExitCodes = true + } + }; + + Service.EnableFeature(config); + } + + public override void Context() + { + base.Context(); + + XmlService.Setup(x => x.Deserialize(ApplicationParameters.GlobalConfigFileLocation)) + .Returns(new ConfigFileSettings + { + Features = new HashSet + { + new ConfigFileFeatureSetting + { + Name = ApplicationParameters.Features.ChecksumFiles, + Enabled = true, + SetExplicitly = true + } + } + }); + + Service = new ChocolateyConfigSettingsService(XmlService.Object); + } + + [Fact] + public void Should_return_exit_code_2() + { + using (new AssertionScope()) + { + MockLogger.Messages.Should().ContainKey("Warn").WhoseValue.Should().ContainSingle().And.Contain("Nothing to change. Config already set."); + Environment.ExitCode.Should().Be(2); + } + } + } + + [WindowsOnly] + public class When_ChocolateyConfigSettingsService_SetApiKey_When_ApiKey_Already_Exists : ChocolateyConfigSettingsServiceSpecsBase + { + public override void Because() + { + var config = new ChocolateyConfiguration() + { + RegularOutput = true, + Sources = "https://test.org/api/v2", + ApiKeyCommand = new ApiKeyCommandConfiguration() + { + Key = "bob", + Command = chocolatey.infrastructure.app.domain.ApiKeyCommandType.Add + }, + Features = new FeaturesConfiguration() + { + UseEnhancedExitCodes = false + } + }; + + Service.SetApiKey(config); + } + + public override void Context() + { + base.Context(); + + XmlService.Setup(x => x.Deserialize(ApplicationParameters.GlobalConfigFileLocation)) + .Returns(new ConfigFileSettings + { + ApiKeys = new HashSet + { + new ConfigFileApiKeySetting + { + Key = NugetEncryptionUtility.EncryptString("bob"), + Source = "https://test.org/api/v2" + } + } + }); + + Service = new ChocolateyConfigSettingsService(XmlService.Object); + } + + [Fact] + public void Should_return_exit_code_0() + { + using (new AssertionScope()) + { + MockLogger.Messages.Should().ContainKey("Warn").WhoseValue.Should().ContainSingle().And.Contain("Nothing to change. Config already set."); + Environment.ExitCode.Should().Be(0); + } + } + } + + [WindowsOnly] + public class When_ChocolateyConfigSettingsService_SetApiKey_When_ApiKey_Already_Exists_With_Enhanced_Exit_Codes : ChocolateyConfigSettingsServiceSpecsBase + { + public override void Because() + { + var config = new ChocolateyConfiguration() + { + RegularOutput = true, + Sources = "https://test.org/api/v2", + ApiKeyCommand = new ApiKeyCommandConfiguration() + { + Key = "bob", + Command = chocolatey.infrastructure.app.domain.ApiKeyCommandType.Add + }, + Features = new FeaturesConfiguration() + { + UseEnhancedExitCodes = true + } + }; + + Service.SetApiKey(config); + } + + public override void Context() + { + base.Context(); + + XmlService.Setup(x => x.Deserialize(ApplicationParameters.GlobalConfigFileLocation)) + .Returns(new ConfigFileSettings + { + ApiKeys = new HashSet + { + new ConfigFileApiKeySetting + { + Key = NugetEncryptionUtility.EncryptString("bob"), + Source = "https://test.org/api/v2" + } + } + }); + + Service = new ChocolateyConfigSettingsService(XmlService.Object); + } + + [Fact] + public void Should_return_exit_code_2() + { + using (new AssertionScope()) + { + MockLogger.Messages.Should().ContainKey("Warn").WhoseValue.Should().ContainSingle().And.Contain("Nothing to change. Config already set."); + Environment.ExitCode.Should().Be(2); + } + } + } + + public class When_ChocolateyConfigSettingsService_SetConfig_When_Config_Already_Set : ChocolateyConfigSettingsServiceSpecsBase + { + public override void Because() + { + var config = new ChocolateyConfiguration() + { + RegularOutput = true, + ConfigCommand = new ConfigCommandConfiguration() + { + Name = ApplicationParameters.ConfigSettings.CacheLocation, + Command = chocolatey.infrastructure.app.domain.ConfigCommandType.Set, + ConfigValue = @"C:\temp" + }, + Features = new FeaturesConfiguration() + { + UseEnhancedExitCodes = false + } + }; + + Service.SetConfig(config); + } + + public override void Context() + { + base.Context(); + + XmlService.Setup(x => x.Deserialize(ApplicationParameters.GlobalConfigFileLocation)) + .Returns(new ConfigFileSettings + { + ConfigSettings = new HashSet() + { + new ConfigFileConfigSetting() + { + Key = ApplicationParameters.ConfigSettings.CacheLocation, + Value = @"C:\temp" + } + } + }); + + Service = new ChocolateyConfigSettingsService(XmlService.Object); + } + + [Fact] + public void Should_return_exit_code_0() + { + using (new AssertionScope()) + { + MockLogger.Messages.Should().ContainKey("Warn").WhoseValue.Should().ContainSingle().And.Contain("Nothing to change. Config already set."); + Environment.ExitCode.Should().Be(0); + } + } + } + + public class When_ChocolateyConfigSettingsService_SetConfig_When_Config_Already_Set_Enhanced_Exit_Codes : ChocolateyConfigSettingsServiceSpecsBase + { + public override void Because() + { + var config = new ChocolateyConfiguration() + { + RegularOutput = true, + ConfigCommand = new ConfigCommandConfiguration() + { + Name = ApplicationParameters.ConfigSettings.CacheLocation, + Command = chocolatey.infrastructure.app.domain.ConfigCommandType.Set, + ConfigValue = @"C:\temp" + + }, + Features = new FeaturesConfiguration() + { + UseEnhancedExitCodes = true + } + }; + + Service.SetConfig(config); + } + + public override void Context() + { + base.Context(); + + XmlService.Setup(x => x.Deserialize(ApplicationParameters.GlobalConfigFileLocation)) + .Returns(new ConfigFileSettings + { + ConfigSettings = new HashSet() + { + new ConfigFileConfigSetting() + { + Key = ApplicationParameters.ConfigSettings.CacheLocation, + Value = @"C:\temp" + } + } + }); + + Service = new ChocolateyConfigSettingsService(XmlService.Object); + } + + [Fact] + public void Should_return_exit_code_2() + { + using (new AssertionScope()) + { + MockLogger.Messages.Should().ContainKey("Warn").WhoseValue.Should().ContainSingle().And.Contain("Nothing to change. Config already set."); + Environment.ExitCode.Should().Be(2); + } + } + } + + public class When_ChocolateyConfigSettingsService_UnSetConfig_When_Config_Already_UnSet : ChocolateyConfigSettingsServiceSpecsBase + { + public override void Because() + { + var config = new ChocolateyConfiguration() + { + RegularOutput = true, + ConfigCommand = new ConfigCommandConfiguration() + { + Name = ApplicationParameters.ConfigSettings.CacheLocation, + Command = chocolatey.infrastructure.app.domain.ConfigCommandType.Unset + }, + Features = new FeaturesConfiguration() + { + UseEnhancedExitCodes = false + } + }; + + Service.UnsetConfig(config); + } + + public override void Context() + { + base.Context(); + + XmlService.Setup(x => x.Deserialize(ApplicationParameters.GlobalConfigFileLocation)) + .Returns(new ConfigFileSettings + { + ConfigSettings = new HashSet() + }); + + Service = new ChocolateyConfigSettingsService(XmlService.Object); + } + + [Fact] + public void Should_return_exit_code_0() + { + using (new AssertionScope()) + { + MockLogger.Messages.Should().ContainKey("Warn").WhoseValue.Should().ContainSingle().And.Contain("Nothing to change. Config already set."); + Environment.ExitCode.Should().Be(0); + } + } + } + + public class When_ChocolateyConfigSettingsService_UnSetConfig_When_Config_Already_UnSet_Enhanced_Exit_Codes : ChocolateyConfigSettingsServiceSpecsBase + { + public override void Because() + { + var config = new ChocolateyConfiguration() + { + RegularOutput = true, + ConfigCommand = new ConfigCommandConfiguration() + { + Name = ApplicationParameters.ConfigSettings.CacheLocation, + Command = chocolatey.infrastructure.app.domain.ConfigCommandType.Unset + + }, + Features = new FeaturesConfiguration() + { + UseEnhancedExitCodes = true + } + }; + + Service.UnsetConfig(config); + } + + public override void Context() + { + base.Context(); + + XmlService.Setup(x => x.Deserialize(ApplicationParameters.GlobalConfigFileLocation)) + .Returns(new ConfigFileSettings + { + ConfigSettings = new HashSet() + }); + + Service = new ChocolateyConfigSettingsService(XmlService.Object); + } + + [Fact] + public void Should_return_exit_code_2() + { + using (new AssertionScope()) + { + MockLogger.Messages.Should().ContainKey("Warn").WhoseValue.Should().ContainSingle().And.Contain("Nothing to change. Config already set."); + Environment.ExitCode.Should().Be(2); + } + } + } } } diff --git a/src/chocolatey.tests/infrastructure.app/services/ChocolateyPackageServiceSpecs.cs b/src/chocolatey.tests/infrastructure.app/services/ChocolateyPackageServiceSpecs.cs index 8a708029a3..d4f8c5f03c 100644 --- a/src/chocolatey.tests/infrastructure.app/services/ChocolateyPackageServiceSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/services/ChocolateyPackageServiceSpecs.cs @@ -17,10 +17,12 @@ using System; using System.Collections.Concurrent; using System.Collections.Generic; +using System.IO; using System.Linq; using System.Text; using chocolatey.infrastructure.app.configuration; using chocolatey.infrastructure.app.domain; +using chocolatey.infrastructure.app.registration; using chocolatey.infrastructure.app.services; using chocolatey.infrastructure.filesystem; using chocolatey.infrastructure.results; @@ -28,14 +30,12 @@ using Moq; using NUnit.Framework; using FluentAssertions; +using FluentAssertions.Execution; using IFileSystem = chocolatey.infrastructure.filesystem.IFileSystem; +using NuGet.Packaging; namespace chocolatey.tests.infrastructure.app.services { - using System.IO; - using chocolatey.infrastructure.app.registration; - using NuGet.Packaging; - public class ChocolateyPackageServiceSpecs { public abstract class ChocolateyPackageServiceSpecsBase : TinySpec @@ -396,7 +396,7 @@ public override void Context() Action = () => Service.Upgrade(Configuration); Configuration.CommandName = "upgrade"; } - } + } public class When_ChocolateyPackageService_tries_to_upgrade_noop_nupkg_file : When_ChocolateyPackageService_tries_to_install_nupkg_file { @@ -407,5 +407,81 @@ public override void Context() Configuration.CommandName = "upgrade"; } } + + public class When_ChocolateyPackageService_tries_to_upgrade_a_package_that_doesnt_need_upgraded : ChocolateyPackageServiceSpecsBase + { + private ConcurrentDictionary _result; + + public override void Context() + { + base.Context(); + Configuration.PackageNames = "alreadyupgraded"; + Configuration.Sources = @"c:\packages"; + Configuration.Features.UseEnhancedExitCodes = false; + + var package = new Mock(); + var expectedResult = new ConcurrentDictionary(); + var packageResult = new PackageResult(package.Object, @"c:\programdata\chocolatey\lib\alreadyupgraded", null); + var logMessage = "alreadyupgraded v1.2.3 is the latest version available based on your source(s)."; + packageResult.Messages.Add(new ResultMessage(ResultType.Inconclusive, logMessage)); + expectedResult.TryAdd("alreadyupgraded", packageResult); + + NugetService.Setup(n => n.Upgrade(It.IsAny(), It.IsAny>(), It.IsAny>())) + .Returns(expectedResult); + } + + public override void Because() + { + _result = Service.Upgrade(Configuration); + } + + [Fact] + public void Should_Return_0_Exit_Code() + { + using(new AssertionScope()) + { + MockLogger.Messages.Should().ContainKey("Warn").WhoseValue.Should().Contain(m => m.Contains("Chocolatey upgraded 0/1 packages.")); + Environment.ExitCode.Should().Be(0); + } + } + } + + public class When_ChocolateyPackageService_tries_to_upgrade_a_package_that_doesnt_need_upgraded_using_enhanced_exitcodes : ChocolateyPackageServiceSpecsBase + { + private ConcurrentDictionary _result; + + public override void Context() + { + base.Context(); + Configuration.PackageNames = "alreadyupgraded"; + Configuration.Sources = @"c:\packages"; + Configuration.Features.UseEnhancedExitCodes = true; + + var package = new Mock(); + var expectedResult = new ConcurrentDictionary(); + var packageResult = new PackageResult(package.Object, @"c:\programdata\chocolatey\lib\alreadyupgraded", null); + var logMessage = "alreadyupgraded v1.2.3 is the latest version available based on your source(s)."; + packageResult.Messages.Add(new ResultMessage(ResultType.Inconclusive, logMessage)); + expectedResult.TryAdd("alreadyupgraded", packageResult); + + NugetService.Setup(n => n.Upgrade(It.IsAny(), It.IsAny>(), It.IsAny>())) + .Returns(expectedResult); + } + + public override void Because() + { + _result = Service.Upgrade(Configuration); + } + + [Fact] + public void Should_Return_0_Exit_Code() + { + using (new AssertionScope()) + { + MockLogger.Messages.Should().ContainKey("Warn").WhoseValue.Should().Contain(m => m.Contains("Chocolatey upgraded 0/1 packages.")); + Environment.ExitCode.Should().Be(2); + } + } + } } } diff --git a/src/chocolatey.tests/infrastructure.app/services/FilesServiceSpecs.cs b/src/chocolatey.tests/infrastructure.app/services/FilesServiceSpecs.cs index 86b872b66d..34df43e29f 100644 --- a/src/chocolatey.tests/infrastructure.app/services/FilesServiceSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/services/FilesServiceSpecs.cs @@ -14,22 +14,22 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.IO; +using chocolatey.infrastructure.app; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.domain; +using chocolatey.infrastructure.app.services; +using chocolatey.infrastructure.cryptography; +using chocolatey.infrastructure.filesystem; +using chocolatey.infrastructure.results; +using chocolatey.infrastructure.services; +using Moq; +using FluentAssertions; + namespace chocolatey.tests.infrastructure.app.services { - using System; - using System.Collections.Generic; - using System.IO; - using chocolatey.infrastructure.app; - using chocolatey.infrastructure.app.configuration; - using chocolatey.infrastructure.app.domain; - using chocolatey.infrastructure.app.services; - using chocolatey.infrastructure.cryptography; - using chocolatey.infrastructure.filesystem; - using chocolatey.infrastructure.results; - using chocolatey.infrastructure.services; - using Moq; - using FluentAssertions; - public class FilesServiceSpecs { public abstract class FilesServiceSpecsBase : TinySpec diff --git a/src/chocolatey.tests/infrastructure.app/services/NugetServiceSpecs.cs b/src/chocolatey.tests/infrastructure.app/services/NugetServiceSpecs.cs index f9ce4ac18d..929957f63d 100644 --- a/src/chocolatey.tests/infrastructure.app/services/NugetServiceSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/services/NugetServiceSpecs.cs @@ -14,22 +14,22 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.domain; +using chocolatey.infrastructure.app.services; +using chocolatey.infrastructure.services; +using Moq; +using NuGet.Common; +using NuGet.Packaging; +using FluentAssertions; +using IFileSystem = chocolatey.infrastructure.filesystem.IFileSystem; + namespace chocolatey.tests.infrastructure.app.services { - using System; - using System.Collections.Generic; - using System.IO; - using System.Linq; - using chocolatey.infrastructure.app.configuration; - using chocolatey.infrastructure.app.domain; - using chocolatey.infrastructure.app.services; - using chocolatey.infrastructure.services; - using Moq; - using NuGet.Common; - using NuGet.Packaging; - using FluentAssertions; - using IFileSystem = chocolatey.infrastructure.filesystem.IFileSystem; - public class NugetServiceSpecs { public abstract class NugetServiceSpecsBase : TinySpec @@ -67,8 +67,10 @@ public override void Context() { base.Context(); Package.Setup(x => x.Id).Returns("bob"); - _packageInfo = new ChocolateyPackageInformation(Package.Object); - _packageInfo.FilesSnapshot = new PackageFiles(); + _packageInfo = new ChocolateyPackageInformation(Package.Object) + { + FilesSnapshot = new PackageFiles() + }; _packageFiles = new PackageFiles(); FileSystem.Setup(x => x.DirectoryExists(It.IsAny())).Returns(true); } @@ -127,10 +129,12 @@ public void Should_backup_a_changed_file() FilePath }; FileSystem.Setup(x => x.GetFiles(It.IsAny(), It.IsAny(), SearchOption.AllDirectories)).Returns(fileSystemFiles); - var updatedPackageFiles = new PackageFiles(); - updatedPackageFiles.Files = new List + var updatedPackageFiles = new PackageFiles + { + Files = new List { packageFileWithUpdatedChecksum + } }; FilesService.Setup(x => x.CaptureSnapshot(It.IsAny(), _config)).Returns(updatedPackageFiles); @@ -151,8 +155,10 @@ public override void Context() { base.Context(); Package.Setup(x => x.Id).Returns("bob"); - _packageInfo = new ChocolateyPackageInformation(Package.Object); - _packageInfo.FilesSnapshot = new PackageFiles(); + _packageInfo = new ChocolateyPackageInformation(Package.Object) + { + FilesSnapshot = new PackageFiles() + }; _packageFiles = new List(); FileSystem.Setup(x => x.DirectoryExists(It.IsAny())).Returns(true); } @@ -311,7 +317,7 @@ public void Generated_package_should_be_in_current_directory() var infos = MockLogger.MessagesFor(tests.LogLevel.Info); infos.Should().ContainSingle(); - infos.Should().HaveElementAt(0,"Chocolatey would have searched for a nuspec file in \"c:\\projects\\chocolatey\" and attempted to compile it."); + infos.Should().HaveElementAt(0, "Chocolatey would have searched for a nuspec file in \"c:\\projects\\chocolatey\" and attempted to compile it."); } [Fact] @@ -325,7 +331,7 @@ public void Generated_package_should_be_in_specified_directory() var infos = MockLogger.MessagesFor(tests.LogLevel.Info); infos.Should().ContainSingle(); - infos.Should().HaveElementAt(0,"Chocolatey would have searched for a nuspec file in \"c:\\packages\" and attempted to compile it."); + infos.Should().HaveElementAt(0, "Chocolatey would have searched for a nuspec file in \"c:\\packages\" and attempted to compile it."); } } } diff --git a/src/chocolatey.tests/infrastructure.app/services/RegistryServiceSpecs.cs b/src/chocolatey.tests/infrastructure.app/services/RegistryServiceSpecs.cs index 16a0657018..dce0671520 100644 --- a/src/chocolatey.tests/infrastructure.app/services/RegistryServiceSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/services/RegistryServiceSpecs.cs @@ -14,17 +14,17 @@ // See the License for the specific language governing permissions and // limitations under the License. +using chocolatey.infrastructure.app.services; +using chocolatey.infrastructure.filesystem; +using chocolatey.infrastructure.services; +using Microsoft.Win32; +using Moq; +using NUnit.Framework; +using FluentAssertions; +using Registry = chocolatey.infrastructure.app.domain.Registry; + namespace chocolatey.tests.infrastructure.app.services { - using chocolatey.infrastructure.app.services; - using chocolatey.infrastructure.filesystem; - using chocolatey.infrastructure.services; - using Microsoft.Win32; - using Moq; - using NUnit.Framework; - using FluentAssertions; - using Registry = chocolatey.infrastructure.app.domain.Registry; - public class RegistryServiceSpecs { public abstract class RegistryServiceSpecsBase : TinySpec diff --git a/src/chocolatey.tests/infrastructure.app/services/RulesServiceSpecs.cs b/src/chocolatey.tests/infrastructure.app/services/RulesServiceSpecs.cs index a5a63dcd01..b92f8a4eb1 100644 --- a/src/chocolatey.tests/infrastructure.app/services/RulesServiceSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/services/RulesServiceSpecs.cs @@ -14,18 +14,18 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Linq; +using chocolatey.infrastructure.app.rules; +using chocolatey.infrastructure.app.services; +using chocolatey.infrastructure.rules; +using chocolatey.infrastructure.services; +using FluentAssertions; +using NuGet.Packaging; + namespace chocolatey.tests.infrastructure.app.services { - using System; - using System.Collections.Generic; - using System.Linq; - using chocolatey.infrastructure.app.rules; - using chocolatey.infrastructure.app.services; - using chocolatey.infrastructure.rules; - using chocolatey.infrastructure.services; - using FluentAssertions; - using NuGet.Packaging; - public class RulesServiceSpecs { [Categories.RuleEngine] diff --git a/src/chocolatey.tests/infrastructure.app/services/TemplateServiceSpecs.cs b/src/chocolatey.tests/infrastructure.app/services/TemplateServiceSpecs.cs index 1fd4a09811..de766bf13e 100644 --- a/src/chocolatey.tests/infrastructure.app/services/TemplateServiceSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/services/TemplateServiceSpecs.cs @@ -14,25 +14,25 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using chocolatey.infrastructure.app; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.services; +using chocolatey.infrastructure.app.templates; +using chocolatey.infrastructure.filesystem; +using chocolatey.infrastructure.services; +using Moq; +using NuGet.Common; +using NUnit.Framework; +using FluentAssertions; +using LogLevel = chocolatey.tests.LogLevel; + namespace chocolatey.tests.infrastructure.app.services { - using System; - using System.Collections.Generic; - using System.IO; - using System.Linq; - using System.Text; - using chocolatey.infrastructure.app; - using chocolatey.infrastructure.app.configuration; - using chocolatey.infrastructure.app.services; - using chocolatey.infrastructure.app.templates; - using chocolatey.infrastructure.filesystem; - using chocolatey.infrastructure.services; - using Moq; - using NuGet.Common; - using NUnit.Framework; - using FluentAssertions; - using LogLevel = tests.LogLevel; - public class TemplateServiceSpecs { public abstract class TemplateServiceSpecsBase : TinySpec @@ -81,7 +81,7 @@ public void Should_log_current_directory_if_no_outputdirectory() var infos = MockLogger.MessagesFor(LogLevel.Info); infos.Should().ContainSingle(); - infos.Should().HaveElementAt(0,"Would have generated a new package specification at c:\\chocolatey\\Bob"); + infos.Should().HaveElementAt(0, "Would have generated a new package specification at c:\\chocolatey\\Bob"); } [Fact] @@ -93,7 +93,7 @@ public void Should_log_output_directory_if_outputdirectory_is_specified() var infos = MockLogger.MessagesFor(LogLevel.Info); infos.Should().ContainSingle(); - infos.Should().HaveElementAt(0,"Would have generated a new package specification at c:\\packages\\Bob"); + infos.Should().HaveElementAt(0, "Would have generated a new package specification at c:\\packages\\Bob"); } } @@ -133,7 +133,7 @@ public void Should_write_file_withe_replaced_tokens() var debugs = MockLogger.MessagesFor(LogLevel.Debug); debugs.Should().ContainSingle(); - debugs.Should().HaveElementAt(0,"Bob"); + debugs.Should().HaveElementAt(0, "Bob"); } [Fact] @@ -145,11 +145,11 @@ public void Should_log_info_if_regular_output() var debugs = MockLogger.MessagesFor(LogLevel.Debug); debugs.Should().ContainSingle(); - debugs.Should().HaveElementAt(0,"Bob"); + debugs.Should().HaveElementAt(0, "Bob"); var infos = MockLogger.MessagesFor(LogLevel.Info); infos.Should().ContainSingle(); - infos.Should().HaveElementAt(0,string.Format(@"Generating template to a file{0} at 'c:\packages\bob.nuspec'", Environment.NewLine)); + infos.Should().HaveElementAt(0, string.Format(@"Generating template to a file{0} at 'c:\packages\bob.nuspec'", Environment.NewLine)); } } @@ -189,8 +189,8 @@ public override void BeforeEachSpec() [Fact] public void Should_throw_exception() { - bool errored = false; - string errorMessage = string.Empty; + var errored = false; + var errorMessage = string.Empty; try { @@ -212,8 +212,8 @@ public void Should_throw_exception_even_with_outputdirectory() { _config.OutputDirectory = "c:\\packages"; - bool errored = false; - string errorMessage = string.Empty; + var errored = false; + var errorMessage = string.Empty; try { @@ -295,8 +295,8 @@ public void Should_generate_all_files_and_directories() var directories = _directoryCreated.ToList(); directories.Should().HaveCount(2, "There should be 2 directories, but there was: " + string.Join(", ", directories)); - directories.Should().HaveElementAt(0,"c:\\chocolatey\\Bob"); - directories.Should().HaveElementAt(1,"c:\\chocolatey\\Bob\\tools"); + directories.Should().HaveElementAt(0, "c:\\chocolatey\\Bob"); + directories.Should().HaveElementAt(1, "c:\\chocolatey\\Bob\\tools"); _files.Should().HaveCount(2, "There should be 2 files, but there was: " + string.Join(", ", _files)); _files.Should().HaveElementAt(0, "c:\\chocolatey\\Bob\\__name_replace__.nuspec"); @@ -314,8 +314,8 @@ public void Should_generate_all_files_and_directories_even_with_outputdirectory( var directories = _directoryCreated.ToList(); directories.Should().HaveCount(2, "There should be 2 directories, but there was: " + string.Join(", ", directories)); - directories.Should().HaveElementAt(0,"c:\\packages\\Bob"); - directories.Should().HaveElementAt(1,"c:\\packages\\Bob\\tools"); + directories.Should().HaveElementAt(0, "c:\\packages\\Bob"); + directories.Should().HaveElementAt(1, "c:\\packages\\Bob\\tools"); _files.Should().HaveCount(2, "There should be 2 files, but there was: " + string.Join(", ", _files)); _files.Should().HaveElementAt(0, "c:\\packages\\Bob\\__name_replace__.nuspec"); @@ -393,9 +393,9 @@ public void Should_generate_all_files_and_directories() var directories = _directoryCreated.ToList(); directories.Should().HaveCount(3, "There should be 3 directories, but there was: " + string.Join(", ", directories)); - directories.Should().HaveElementAt(0,"c:\\chocolatey\\Bob"); - directories.Should().HaveElementAt(1,"c:\\chocolatey\\Bob\\tools"); - directories.Should().HaveElementAt(2,"c:\\chocolatey\\Bob\\tools\\lower"); + directories.Should().HaveElementAt(0, "c:\\chocolatey\\Bob"); + directories.Should().HaveElementAt(1, "c:\\chocolatey\\Bob\\tools"); + directories.Should().HaveElementAt(2, "c:\\chocolatey\\Bob\\tools\\lower"); _files.Should().HaveCount(4, "There should be 4 files, but there was: " + string.Join(", ", _files)); _files.Should().HaveElementAt(0, "c:\\chocolatey\\Bob\\__name_replace__.nuspec"); @@ -415,9 +415,9 @@ public void Should_generate_all_files_and_directories_even_with_outputdirectory( var directories = _directoryCreated.ToList(); directories.Should().HaveCount(3, "There should be 3 directories, but there was: " + string.Join(", ", directories)); - directories.Should().HaveElementAt(0,"c:\\packages\\Bob"); - directories.Should().HaveElementAt(1,"c:\\packages\\Bob\\tools"); - directories.Should().HaveElementAt(2,"c:\\packages\\Bob\\tools\\lower"); + directories.Should().HaveElementAt(0, "c:\\packages\\Bob"); + directories.Should().HaveElementAt(1, "c:\\packages\\Bob\\tools"); + directories.Should().HaveElementAt(2, "c:\\packages\\Bob\\tools\\lower"); _files.Should().HaveCount(4, "There should be 4 files, but there was: " + string.Join(", ", _files)); _files.Should().HaveElementAt(0, "c:\\packages\\Bob\\__name_replace__.nuspec"); @@ -497,11 +497,11 @@ public void Should_generate_all_files_and_directories() var directories = _directoryCreated.ToList(); directories.Should().HaveCount(5, "There should be 5 directories, but there was: " + string.Join(", ", directories)); - directories.Should().HaveElementAt(0,"c:\\chocolatey\\Bob"); - directories.Should().HaveElementAt(1,"c:\\chocolatey\\Bob\\tools"); - directories.Should().HaveElementAt(2,"c:\\chocolatey\\Bob\\tools\\lower"); - directories.Should().HaveElementAt(3,"c:\\chocolatey\\Bob\\empty"); - directories.Should().HaveElementAt(4,"c:\\chocolatey\\Bob\\empty\\nested"); + directories.Should().HaveElementAt(0, "c:\\chocolatey\\Bob"); + directories.Should().HaveElementAt(1, "c:\\chocolatey\\Bob\\tools"); + directories.Should().HaveElementAt(2, "c:\\chocolatey\\Bob\\tools\\lower"); + directories.Should().HaveElementAt(3, "c:\\chocolatey\\Bob\\empty"); + directories.Should().HaveElementAt(4, "c:\\chocolatey\\Bob\\empty\\nested"); _files.Should().HaveCount(4, "There should be 4 files, but there was: " + string.Join(", ", _files)); _files.Should().HaveElementAt(0, "c:\\chocolatey\\Bob\\__name_replace__.nuspec"); @@ -521,11 +521,11 @@ public void Should_generate_all_files_and_directories_even_with_outputdirectory( var directories = _directoryCreated.ToList(); directories.Should().HaveCount(5, "There should be 5 directories, but there was: " + string.Join(", ", directories)); - directories.Should().HaveElementAt(0,"c:\\packages\\Bob"); - directories.Should().HaveElementAt(1,"c:\\packages\\Bob\\tools"); - directories.Should().HaveElementAt(2,"c:\\packages\\Bob\\tools\\lower"); - directories.Should().HaveElementAt(3,"c:\\packages\\Bob\\empty"); - directories.Should().HaveElementAt(4,"c:\\packages\\Bob\\empty\\nested"); + directories.Should().HaveElementAt(0, "c:\\packages\\Bob"); + directories.Should().HaveElementAt(1, "c:\\packages\\Bob\\tools"); + directories.Should().HaveElementAt(2, "c:\\packages\\Bob\\tools\\lower"); + directories.Should().HaveElementAt(3, "c:\\packages\\Bob\\empty"); + directories.Should().HaveElementAt(4, "c:\\packages\\Bob\\empty\\nested"); _files.Should().HaveCount(4, "There should be 4 files, but there was: " + string.Join(", ", _files)); _files.Should().HaveElementAt(0, "c:\\packages\\Bob\\__name_replace__.nuspec"); @@ -850,7 +850,7 @@ public void Should_log_template_location_if_no_template_name() var infos = MockLogger.MessagesFor(LogLevel.Info); infos.Should().ContainSingle(); - infos.Should().HaveElementAt(0,"Would have listed templates in {0}".FormatWith(ApplicationParameters.TemplatesLocation)); + infos.Should().HaveElementAt(0, "Would have listed templates in {0}".FormatWith(ApplicationParameters.TemplatesLocation)); } [Fact] diff --git a/src/chocolatey.tests/infrastructure.app/utility/ArgumentsUtilitySpecs.cs b/src/chocolatey.tests/infrastructure.app/utility/ArgumentsUtilitySpecs.cs index a21daa2b91..1ee35004ca 100644 --- a/src/chocolatey.tests/infrastructure.app/utility/ArgumentsUtilitySpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/utility/ArgumentsUtilitySpecs.cs @@ -1,9 +1,9 @@ -namespace chocolatey.tests.infrastructure.app.utility -{ - using chocolatey.infrastructure.app.utility; - using NUnit.Framework; - using FluentAssertions; +using chocolatey.infrastructure.app.utility; +using NUnit.Framework; +using FluentAssertions; +namespace chocolatey.tests.infrastructure.app.utility +{ public class ArgumentsUtilitySpecs { public abstract class ArgumentsUtilitySpecsBase : TinySpec diff --git a/src/chocolatey.tests/infrastructure.app/utility/PackageUtilitySpecs.cs b/src/chocolatey.tests/infrastructure.app/utility/PackageUtilitySpecs.cs index ea81e2d309..eab6b234b3 100644 --- a/src/chocolatey.tests/infrastructure.app/utility/PackageUtilitySpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/utility/PackageUtilitySpecs.cs @@ -1,74 +1,77 @@ -// Copyright © 2021 - 2021 Chocolatey Software, Inc -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -namespace chocolatey.tests.infrastructure.app.utility -{ - using chocolatey.infrastructure.app.utility; - using chocolatey.infrastructure.app.configuration; - using chocolatey.infrastructure.platforms; - using NUnit.Framework; - using FluentAssertions; - - public class PackageUtilitySpecs - { - public abstract class PackageUtilitySpecsBase : TinySpec - { - public override void Context() - { - } - } - - - [TestFixture("bob", "", true)] - [TestFixture("", "bob", true)] - [TestFixture("bob", "bob", false)] - [TestFixture("bob", "bob;separatedPackage", false)] - [TestFixture("bob", "C:\\chocolatey-packages\\bob\\bob.1.0.0.nupkg", false)] - [TestFixture("dependency", "C:\\chocolatey-packages\\bob\\bob.1.0.0.nupkg", true)] - [TestFixture("bob", "C:\\chocolatey-packages\\bob\\bob.nuspec", false)] - [TestFixture("dependency", "C:\\chocolatey-packages\\bob\\bob.nuspec", true)] - [TestFixture("bob", "\\bob", false)] - [TestFixture("dependency", "\\bob", true)] - [TestFixture("dependency", "bob", true)] - [TestFixture("dependency", "bob;separatedPackage", true)] - public class When_PackageUtility_is_checking_if_package_is_dependency : PackageUtilitySpecsBase - { - private readonly ChocolateyConfiguration _config = new ChocolateyConfiguration(); - private bool _result; - private bool _expectedResult; - private string _packageName; - - public When_PackageUtility_is_checking_if_package_is_dependency(string packageName, string configNames, bool expectedResult) - { - if (Platform.GetPlatform() != PlatformType.Windows) configNames = configNames.Replace("\\", "/"); - - _packageName = packageName; - _config.PackageNames = configNames; - _expectedResult = expectedResult; - } - - public override void Because() - { - _result = PackageUtility.PackageIdHasDependencySuffix(_config, _packageName); - } - - [Fact] - public void Should_return_expected_result() - { - _result.Should().Be(_expectedResult); - } - } - } -} +// Copyright © 2021 - 2021 Chocolatey Software, Inc +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +using chocolatey.infrastructure.app.utility; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.platforms; +using NUnit.Framework; +using FluentAssertions; + +namespace chocolatey.tests.infrastructure.app.utility +{ + public class PackageUtilitySpecs + { + public abstract class PackageUtilitySpecsBase : TinySpec + { + public override void Context() + { + } + } + + + [TestFixture("bob", "", true)] + [TestFixture("", "bob", true)] + [TestFixture("bob", "bob", false)] + [TestFixture("bob", "bob;separatedPackage", false)] + [TestFixture("bob", "C:\\chocolatey-packages\\bob\\bob.1.0.0.nupkg", false)] + [TestFixture("dependency", "C:\\chocolatey-packages\\bob\\bob.1.0.0.nupkg", true)] + [TestFixture("bob", "C:\\chocolatey-packages\\bob\\bob.nuspec", false)] + [TestFixture("dependency", "C:\\chocolatey-packages\\bob\\bob.nuspec", true)] + [TestFixture("bob", "\\bob", false)] + [TestFixture("dependency", "\\bob", true)] + [TestFixture("dependency", "bob", true)] + [TestFixture("dependency", "bob;separatedPackage", true)] + public class When_PackageUtility_is_checking_if_package_is_dependency : PackageUtilitySpecsBase + { + private readonly ChocolateyConfiguration _config = new ChocolateyConfiguration(); + private bool _result; + private bool _expectedResult; + private string _packageName; + + public When_PackageUtility_is_checking_if_package_is_dependency(string packageName, string configNames, bool expectedResult) + { + if (Platform.GetPlatform() != PlatformType.Windows) + { + configNames = configNames.Replace("\\", "/"); + } + + _packageName = packageName; + _config.PackageNames = configNames; + _expectedResult = expectedResult; + } + + public override void Because() + { + _result = PackageUtility.PackageIdHasDependencySuffix(_config, _packageName); + } + + [Fact] + public void Should_return_expected_result() + { + _result.Should().Be(_expectedResult); + } + } + } +} diff --git a/src/chocolatey.tests/infrastructure/commandline/InteractivePromptSpecs.cs b/src/chocolatey.tests/infrastructure/commandline/InteractivePromptSpecs.cs index b6d2f7bda4..4a476d0fa3 100644 --- a/src/chocolatey.tests/infrastructure/commandline/InteractivePromptSpecs.cs +++ b/src/chocolatey.tests/infrastructure/commandline/InteractivePromptSpecs.cs @@ -14,15 +14,15 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using chocolatey.infrastructure.adapters; +using chocolatey.infrastructure.commandline; +using Moq; +using FluentAssertions; + namespace chocolatey.tests.infrastructure.commandline { - using System; - using System.Collections.Generic; - using chocolatey.infrastructure.adapters; - using chocolatey.infrastructure.commandline; - using Moq; - using FluentAssertions; - public class InteractivePromptSpecs { public abstract class InteractivePromptSpecsBase : TinySpec @@ -62,7 +62,7 @@ public override void Because() public void Should_error_when_the_choicelist_is_null() { Choices = null; - bool errored = false; + var errored = false; Console.Setup(c => c.ReadLine()).Returns(""); //Enter pressed try { @@ -81,8 +81,8 @@ public void Should_error_when_the_choicelist_is_null() public void Should_error_when_the_choicelist_is_empty() { Choices = new List(); - bool errored = false; - string errorMessage = string.Empty; + var errored = false; + var errorMessage = string.Empty; Console.Setup(c => c.ReadLine()).Returns(""); //Enter pressed try { @@ -107,7 +107,7 @@ public void Should_error_when_the_prompt_input_is_null() "bob" }; PromptValue = null; - bool errored = false; + var errored = false; Console.Setup(c => c.ReadLine()).Returns(""); //Enter pressed try { @@ -130,8 +130,8 @@ public void Should_error_when_the_default_choice_is_not_in_list() "bob" }; _defaultChoice = "maybe"; - bool errored = false; - string errorMessage = string.Empty; + var errored = false; + var errorMessage = string.Empty; Console.Setup(c => c.ReadLine()).Returns(""); //Enter pressed string result = null; try @@ -257,7 +257,7 @@ public override void AfterObservations() [Fact] public void Should_error_when_no_answer_given() { - bool errored = false; + var errored = false; Console.Setup(c => c.ReadLine()).Returns(""); //Enter pressed try @@ -291,7 +291,7 @@ public void Should_return_second_choice_when_2_is_given() [Fact] public void Should_error_when_any_choice_not_available_is_given() { - bool errored = false; + var errored = false; Console.Setup(c => c.ReadLine()).Returns("3"); //Enter pressed try @@ -429,7 +429,7 @@ public void Should_return_second_choice_when_2_is_given() [Fact] public void Should_error_when_any_choice_not_available_is_given() { - bool errored = false; + var errored = false; Console.Setup(c => c.ReadLine()).Returns("3"); //Enter pressed try @@ -459,7 +459,7 @@ public override void Because() public void Should_error_when_the_choicelist_is_null() { Choices = null; - bool errored = false; + var errored = false; Console.Setup(c => c.ReadLine()).Returns(""); //Enter pressed try { @@ -478,8 +478,8 @@ public void Should_error_when_the_choicelist_is_null() public void Should_error_when_the_choicelist_is_empty() { Choices = new List(); - bool errored = false; - string errorMessage = string.Empty; + var errored = false; + var errorMessage = string.Empty; Console.Setup(c => c.ReadLine()).Returns(""); //Enter pressed try { @@ -504,8 +504,8 @@ public void Should_error_when_the_prompt_input_is_null() "bob" }; PromptValue = null; - bool errored = false; - string errorMessage = string.Empty; + var errored = false; + var errorMessage = string.Empty; Console.Setup(c => c.ReadLine()).Returns(""); //Enter pressed try { @@ -530,8 +530,8 @@ public void Should_error_when_the_choicelist_contains_empty_values() "bob", "" }; - bool errored = false; - string errorMessage = string.Empty; + var errored = false; + var errorMessage = string.Empty; Console.Setup(c => c.ReadLine()).Returns(""); //Enter pressed try { @@ -556,8 +556,8 @@ public void Should_error_when_the_choicelist_has_multiple_items_with_same_first_ "sally", "suzy" }; - bool errored = false; - string errorMessage = string.Empty; + var errored = false; + var errorMessage = string.Empty; Console.Setup(c => c.ReadLine()).Returns(""); //Enter pressed try { @@ -593,7 +593,7 @@ public override void AfterObservations() [Fact] public void Should_error_when_no_answer_given() { - bool errored = false; + var errored = false; Console.Setup(c => c.ReadLine()).Returns(""); //Enter pressed try @@ -643,7 +643,7 @@ public void Should_return_no_choice_when_n_is_given() [Fact] public void Should_error_when_any_choice_not_available_is_given() { - bool errored = false; + var errored = false; Console.Setup(c => c.ReadLine()).Returns("yup"); //Enter pressed try diff --git a/src/chocolatey.tests/infrastructure/commands/CommandExecutorSpecs.cs b/src/chocolatey.tests/infrastructure/commands/CommandExecutorSpecs.cs index 7aadb87cf5..6c160b2218 100644 --- a/src/chocolatey.tests/infrastructure/commands/CommandExecutorSpecs.cs +++ b/src/chocolatey.tests/infrastructure/commands/CommandExecutorSpecs.cs @@ -14,16 +14,16 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using chocolatey.infrastructure.adapters; +using chocolatey.infrastructure.app; +using chocolatey.infrastructure.commands; +using chocolatey.infrastructure.filesystem; +using Moq; +using FluentAssertions; + namespace chocolatey.tests.infrastructure.commands { - using System; - using chocolatey.infrastructure.adapters; - using chocolatey.infrastructure.app; - using chocolatey.infrastructure.commands; - using chocolatey.infrastructure.filesystem; - using Moq; - using FluentAssertions; - public class CommandExecutorSpecs { public abstract class CommandExecutorSpecsBase : TinySpec diff --git a/src/chocolatey.tests/infrastructure/commands/ExternalCommandArgsBuilderSpecs.cs b/src/chocolatey.tests/infrastructure/commands/ExternalCommandArgsBuilderSpecs.cs index 969834789d..ea8bc38129 100644 --- a/src/chocolatey.tests/infrastructure/commands/ExternalCommandArgsBuilderSpecs.cs +++ b/src/chocolatey.tests/infrastructure/commands/ExternalCommandArgsBuilderSpecs.cs @@ -14,14 +14,14 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.commands; +using FluentAssertions; + namespace chocolatey.tests.infrastructure.commands { - using System; - using System.Collections.Generic; - using chocolatey.infrastructure.app.configuration; - using chocolatey.infrastructure.commands; - using FluentAssertions; - public class ExternalCommandArgsBuilderSpecs { public class When_using_ExternalCommandArgsBuilder : TinySpec @@ -85,13 +85,16 @@ public void Should_skip_a_parameter_that_does_not_match_the_case_of_the_property [Fact] public void Should_add_a_parameter_that_does_not_match_the_case_of_the_property_name_when_dictionary_ignores_case() { - IDictionary ignoreCaseDictionary = new Dictionary(StringComparer.InvariantCultureIgnoreCase); - ignoreCaseDictionary.Add( - "sources", - new ExternalCommandArgument + IDictionary ignoreCaseDictionary = new Dictionary(StringComparer.InvariantCultureIgnoreCase) + { { - ArgumentOption = "-source " - }); + "sources", + new ExternalCommandArgument + { + ArgumentOption = "-source " + } + } + }; ExternalCommandArgsBuilder.BuildArguments(Configuration, ignoreCaseDictionary).Should().Be("-source yo"); } diff --git a/src/chocolatey.tests/infrastructure/commands/PowershellExecutorSpecs.cs b/src/chocolatey.tests/infrastructure/commands/PowershellExecutorSpecs.cs index 49f8c254d8..a60d688f9b 100644 --- a/src/chocolatey.tests/infrastructure/commands/PowershellExecutorSpecs.cs +++ b/src/chocolatey.tests/infrastructure/commands/PowershellExecutorSpecs.cs @@ -14,16 +14,16 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.IO; +using chocolatey.infrastructure.commands; +using chocolatey.infrastructure.filesystem; +using Moq; +using NUnit.Framework; +using FluentAssertions; + namespace chocolatey.tests.infrastructure.commands { - using System; - using System.IO; - using chocolatey.infrastructure.commands; - using chocolatey.infrastructure.filesystem; - using Moq; - using NUnit.Framework; - using FluentAssertions; - public class PowershellExecutorSpecs { public abstract class PowerShellExecutorSpecsBase : TinySpec diff --git a/src/chocolatey.tests/infrastructure/configuration/ConfigSpecs.cs b/src/chocolatey.tests/infrastructure/configuration/ConfigSpecs.cs index 038ac90513..a9c78c2b7a 100644 --- a/src/chocolatey.tests/infrastructure/configuration/ConfigSpecs.cs +++ b/src/chocolatey.tests/infrastructure/configuration/ConfigSpecs.cs @@ -14,12 +14,12 @@ // See the License for the specific language governing permissions and // limitations under the License. +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.configuration; +using FluentAssertions; + namespace chocolatey.tests.infrastructure.configuration { - using chocolatey.infrastructure.app.configuration; - using chocolatey.infrastructure.configuration; - using FluentAssertions; - public class ConfigSpecs { public abstract class ConfigSpecsBase : TinySpec diff --git a/src/chocolatey.tests/infrastructure/cryptography/CryptoHashProviderSpecs.cs b/src/chocolatey.tests/infrastructure/cryptography/CryptoHashProviderSpecs.cs index 76f48ba3a3..ece526e454 100644 --- a/src/chocolatey.tests/infrastructure/cryptography/CryptoHashProviderSpecs.cs +++ b/src/chocolatey.tests/infrastructure/cryptography/CryptoHashProviderSpecs.cs @@ -14,18 +14,18 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.IO; +using System.Security.Cryptography; +using chocolatey.infrastructure.adapters; +using chocolatey.infrastructure.app; +using chocolatey.infrastructure.cryptography; +using chocolatey.infrastructure.filesystem; +using Moq; +using FluentAssertions; + namespace chocolatey.tests.infrastructure.cryptography { - using System; - using System.IO; - using System.Security.Cryptography; - using chocolatey.infrastructure.adapters; - using chocolatey.infrastructure.app; - using chocolatey.infrastructure.cryptography; - using chocolatey.infrastructure.filesystem; - using Moq; - using FluentAssertions; - public class CryptoHashProviderSpecs { public abstract class CryptoHashProviderSpecsBase : TinySpec diff --git a/src/chocolatey.tests/infrastructure/events/EventSubscriptionManagerSpecs.cs b/src/chocolatey.tests/infrastructure/events/EventSubscriptionManagerSpecs.cs index 67a0512052..15b3c88456 100644 --- a/src/chocolatey.tests/infrastructure/events/EventSubscriptionManagerSpecs.cs +++ b/src/chocolatey.tests/infrastructure/events/EventSubscriptionManagerSpecs.cs @@ -14,16 +14,16 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Threading; +using chocolatey.infrastructure.services; +using chocolatey.tests.infrastructure.events.context; +using NUnit.Framework; +using FluentAssertions; + namespace chocolatey.tests.infrastructure.events { - using System; - using System.Collections.Generic; - using System.Threading; - using chocolatey.infrastructure.services; - using context; - using NUnit.Framework; - using FluentAssertions; - public class EventSubscriptionManagerSpecs { public abstract class EventSubscriptionManagerSpecsBase : TinySpec diff --git a/src/chocolatey.tests/infrastructure/events/context/FakeEvent.cs b/src/chocolatey.tests/infrastructure/events/context/FakeEvent.cs index 560752ddaa..5968b591b9 100644 --- a/src/chocolatey.tests/infrastructure/events/context/FakeEvent.cs +++ b/src/chocolatey.tests/infrastructure/events/context/FakeEvent.cs @@ -14,10 +14,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +using chocolatey.infrastructure.events; + namespace chocolatey.tests.infrastructure.events.context { - using chocolatey.infrastructure.events; - public class FakeEvent : IMessage { public FakeEvent(string name, double digits) diff --git a/src/chocolatey.tests/infrastructure/events/context/FakeSubscriber.cs b/src/chocolatey.tests/infrastructure/events/context/FakeSubscriber.cs index eae6170814..b8f2a9a629 100644 --- a/src/chocolatey.tests/infrastructure/events/context/FakeSubscriber.cs +++ b/src/chocolatey.tests/infrastructure/events/context/FakeSubscriber.cs @@ -14,11 +14,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using chocolatey.infrastructure.services; + namespace chocolatey.tests.infrastructure.events.context { - using System; - using chocolatey.infrastructure.services; - public class FakeSubscriber { public FakeSubscriber(IEventSubscriptionManagerService subscriptionManager) diff --git a/src/chocolatey.tests/infrastructure/filesystem/DotNetFileSystemSpecs.cs b/src/chocolatey.tests/infrastructure/filesystem/DotNetFileSystemSpecs.cs index 1a17273cce..d3a8be0b69 100644 --- a/src/chocolatey.tests/infrastructure/filesystem/DotNetFileSystemSpecs.cs +++ b/src/chocolatey.tests/infrastructure/filesystem/DotNetFileSystemSpecs.cs @@ -14,18 +14,18 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.IO; +using chocolatey.infrastructure.adapters; +using chocolatey.infrastructure.app; +using chocolatey.infrastructure.filesystem; +using chocolatey.infrastructure.platforms; +using Moq; +using NUnit.Framework; +using FluentAssertions; + namespace chocolatey.tests.infrastructure.filesystem { - using System; - using System.IO; - using chocolatey.infrastructure.adapters; - using chocolatey.infrastructure.app; - using chocolatey.infrastructure.filesystem; - using chocolatey.infrastructure.platforms; - using Moq; - using NUnit.Framework; - using FluentAssertions; - public class DotNetFileSystemSpecs { public abstract class DotNetFileSystemSpecsBase : TinySpec diff --git a/src/chocolatey.tests/infrastructure/guards/EnsureSpecs.cs b/src/chocolatey.tests/infrastructure/guards/EnsureSpecs.cs index 5a0d5d2055..b2cbece82e 100644 --- a/src/chocolatey.tests/infrastructure/guards/EnsureSpecs.cs +++ b/src/chocolatey.tests/infrastructure/guards/EnsureSpecs.cs @@ -14,14 +14,14 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.guards; +using Moq; +using FluentAssertions; + namespace chocolatey.tests.infrastructure.guards { - using System; - using chocolatey.infrastructure.app.configuration; - using chocolatey.infrastructure.guards; - using Moq; - using FluentAssertions; - public class EnsureSpecs { public abstract class EnsureSpecsBase : TinySpec @@ -149,7 +149,7 @@ public override void Because() [Fact] public void When_testing_a_string_against_is_not_null_should_pass() { - string test = "value"; + var test = "value"; Ensure.That(() => test).NotNull(); } @@ -230,7 +230,7 @@ public void When_testing_an_uninstantiated_class_against_is_not_null_should_thro [Fact] public void When_testing_meets_with_null_ensureFunction_against_string_value_should_throw_ArgumentNullException_on_ensureFunction() { - string test = "bob"; + var test = "bob"; object exceptionType = null; var exceptionMessage = string.Empty; try @@ -252,7 +252,7 @@ public void When_testing_meets_with_null_ensureFunction_against_string_value_sho [Fact] public void When_testing_meets_with_null_exceptionAction_against_string_value_that_passes_should_throw_ArgumentNullException_on_exceptionAction() { - string test = "bob"; + var test = "bob"; object exceptionType = null; var exceptionMessage = string.Empty; try @@ -275,7 +275,7 @@ public void When_testing_meets_with_null_exceptionAction_against_string_value_th [Fact] public void When_testing_meets_with_null_exceptionAction_against_string_value_that_fails_should_throw_ArgumentNullException_on_exceptionAction() { - string test = "bob"; + var test = "bob"; object exceptionType = null; var exceptionMessage = string.Empty; try @@ -373,7 +373,7 @@ public class When_testing_Ensure_meets_against_a_string_value_that_passes : Ensu public override void Because() { - string test = "bob"; + var test = "bob"; try { @@ -425,7 +425,7 @@ public class When_testing_Ensure_meets_against_a_string_value_that_fails : Ensur public override void Because() { - string test = "BOB"; + var test = "BOB"; try { diff --git a/src/chocolatey.tests/infrastructure/information/VersionInformationSpecs.cs b/src/chocolatey.tests/infrastructure/information/VersionInformationSpecs.cs index 0d76f7c528..cf292bb33b 100644 --- a/src/chocolatey.tests/infrastructure/information/VersionInformationSpecs.cs +++ b/src/chocolatey.tests/infrastructure/information/VersionInformationSpecs.cs @@ -14,12 +14,12 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using chocolatey.infrastructure.information; +using FluentAssertions; + namespace chocolatey.tests.infrastructure.information { - using System; - using chocolatey.infrastructure.information; - using FluentAssertions; - public class VersionInformationSpecs { public abstract class VersionInformationSpecsBase : TinySpec diff --git a/src/chocolatey.tests/infrastructure/platforms/PlatformSpecs.cs b/src/chocolatey.tests/infrastructure/platforms/PlatformSpecs.cs index 5e4e2724fd..d2fb8fe6b6 100644 --- a/src/chocolatey.tests/infrastructure/platforms/PlatformSpecs.cs +++ b/src/chocolatey.tests/infrastructure/platforms/PlatformSpecs.cs @@ -14,16 +14,16 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using chocolatey.infrastructure.adapters; +using chocolatey.infrastructure.filesystem; +using chocolatey.infrastructure.platforms; +using Moq; +using FluentAssertions; +using Environment = System.Environment; + namespace chocolatey.tests.infrastructure.platforms { - using System; - using chocolatey.infrastructure.adapters; - using chocolatey.infrastructure.filesystem; - using chocolatey.infrastructure.platforms; - using Moq; - using FluentAssertions; - using Environment = System.Environment; - public class PlatformSpecs { public abstract class PlatformSpecsBase : TinySpec diff --git a/src/chocolatey.tests/infrastructure/tokens/TokenReplacerSpecs.cs b/src/chocolatey.tests/infrastructure/tokens/TokenReplacerSpecs.cs index 1340d086d3..12101c1930 100644 --- a/src/chocolatey.tests/infrastructure/tokens/TokenReplacerSpecs.cs +++ b/src/chocolatey.tests/infrastructure/tokens/TokenReplacerSpecs.cs @@ -14,13 +14,13 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System.Collections.Generic; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.tokens; +using FluentAssertions; + namespace chocolatey.tests.infrastructure.tokens { - using System.Collections.Generic; - using chocolatey.infrastructure.app.configuration; - using chocolatey.infrastructure.tokens; - using FluentAssertions; - public class TokenReplacerSpecs { public abstract class TokenReplacerSpecsBase : TinySpec diff --git a/src/chocolatey.tests/infrastructure/tolerance/FaultToleranceSpecs.cs b/src/chocolatey.tests/infrastructure/tolerance/FaultToleranceSpecs.cs index aee538c8f0..31187dbd51 100644 --- a/src/chocolatey.tests/infrastructure/tolerance/FaultToleranceSpecs.cs +++ b/src/chocolatey.tests/infrastructure/tolerance/FaultToleranceSpecs.cs @@ -14,13 +14,13 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using chocolatey.infrastructure.tolerance; +using NUnit.Framework; +using FluentAssertions; + namespace chocolatey.tests.infrastructure.tolerance { - using System; - using chocolatey.infrastructure.tolerance; - using NUnit.Framework; - using FluentAssertions; - public class FaultToleranceSpecs { public abstract class FaultToleranceSpecsBase : TinySpec diff --git a/src/chocolatey/AssemblyExtensions.cs b/src/chocolatey/AssemblyExtensions.cs index dd9330e67c..1209c8dfd2 100644 --- a/src/chocolatey/AssemblyExtensions.cs +++ b/src/chocolatey/AssemblyExtensions.cs @@ -14,17 +14,17 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using chocolatey.infrastructure.app.registration; +using chocolatey.infrastructure.logging; +using chocolatey.infrastructure.adapters; + namespace chocolatey { - using System; - using System.Collections.Generic; - using System.IO; - using System.Linq; - using System.Reflection; - using chocolatey.infrastructure.app.registration; - using chocolatey.infrastructure.logging; - using infrastructure.adapters; - /// /// Extensions for Assembly /// @@ -38,7 +38,7 @@ public static class AssemblyExtensions /// public static string GetManifestString(this IAssembly assembly, string manifestResourceStreamLocation) { - string manifestFileText = ""; + var manifestFileText = ""; using (Stream manifestFileStream = assembly.GetManifestResourceStream(manifestResourceStreamLocation)) { @@ -75,18 +75,27 @@ public static Stream GetManifestStream(this IAssembly assembly, string manifestR /// Borrowed heavily from http://dhvik.blogspot.com/2009/05/assemblynamegetpublickeytoken-tostring.html public static string GetPublicKeyToken(this IAssembly assembly) { - if (assembly == null) return string.Empty; + if (assembly == null) + { + return string.Empty; + } return assembly.GetName().GetPublicKeyTokenString(); } public static string GetPublicKeyTokenString(this AssemblyName assemblyName) { - if (assemblyName == null) return string.Empty; + if (assemblyName == null) + { + return string.Empty; + } - byte[] publicKeyToken = assemblyName.GetPublicKeyToken(); + var publicKeyToken = assemblyName.GetPublicKeyToken(); - if (publicKeyToken == null || publicKeyToken.Length == 0) return string.Empty; + if (publicKeyToken == null || publicKeyToken.Length == 0) + { + return string.Empty; + } return publicKeyToken.Select(x => x.ToString("x2")).Aggregate((x, y) => x + y); } @@ -139,7 +148,7 @@ public static IEnumerable GetExtensionModules(this IAssembly a return result; } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public static string get_manifest_string(this IAssembly assembly, string manifestResourceStreamLocation) => GetManifestString(assembly, manifestResourceStreamLocation); @@ -163,6 +172,6 @@ public static IEnumerable get_loadable_types(this IAssembly assembly) [Obsolete("This overload is deprecated and will be removed in v3.")] public static IEnumerable get_extension_modules(this IAssembly assembly) => GetExtensionModules(assembly); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/EnumExtensions.cs b/src/chocolatey/EnumExtensions.cs index de8d879604..db9e7c707d 100644 --- a/src/chocolatey/EnumExtensions.cs +++ b/src/chocolatey/EnumExtensions.cs @@ -14,13 +14,13 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.ComponentModel; +using System.Linq; +using System.Reflection; + namespace chocolatey { - using System; - using System.ComponentModel; - using System.Linq; - using System.Reflection; - /// /// Extensions for Enum /// @@ -32,14 +32,14 @@ public static class EnumExtensions /// The enumeration item. public static string DescriptionOrValue(this Enum enumeration) { - string description = enumeration.ToString(); + var description = enumeration.ToString(); Type type = enumeration.GetType(); MemberInfo[] memberInfo = type.GetMember(description); if (memberInfo != null && memberInfo.Length > 0) { - var attrib = memberInfo[0].GetCustomAttributes(typeof (DescriptionAttribute), false).Cast().SingleOrDefault(); + var attrib = memberInfo[0].GetCustomAttributes(typeof(DescriptionAttribute), false).Cast().SingleOrDefault(); if (attrib != null) { @@ -53,20 +53,20 @@ public static string DescriptionOrValue(this Enum enumeration) public static TEnum ParseEnumDescription(this string description) where TEnum : struct, Enum { - Type type = typeof (TEnum); + Type type = typeof(TEnum); foreach (var fieldInfo in type.GetFields()) { - var attr = fieldInfo.GetCustomAttributes(typeof (DescriptionAttribute), false).Cast().SingleOrDefault(); + var attr = fieldInfo.GetCustomAttributes(typeof(DescriptionAttribute), false).Cast().SingleOrDefault(); if (attr != null && attr.Description.Equals(description, StringComparison.Ordinal)) { - return (TEnum) fieldInfo.GetValue(null); + return (TEnum)fieldInfo.GetValue(null); } } return default(TEnum); } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public static string get_description_or_value(this Enum enumeration) => DescriptionOrValue(enumeration); @@ -75,6 +75,6 @@ public static string get_description_or_value(this Enum enumeration) public static TEnum parse_enum_from_description(this string description) where TEnum : struct, Enum => ParseEnumDescription(description); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/EnumerableExtensions.cs b/src/chocolatey/EnumerableExtensions.cs index 1880e7fd32..79d3788f07 100644 --- a/src/chocolatey/EnumerableExtensions.cs +++ b/src/chocolatey/EnumerableExtensions.cs @@ -14,13 +14,13 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; + namespace chocolatey { - using System; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - /// /// Extensions for IEnumerable /// @@ -66,8 +66,8 @@ public static string Join(this IEnumerable source, string separator) /// public static IEnumerable LastDistinct(this IEnumerable source, IEqualityComparer equalityComparer, IComparer comparer) { - bool first = true; - bool maxElementHasValue = false; + var first = true; + var maxElementHasValue = false; var previousElement = default(T); var maxElement = default(T); @@ -118,11 +118,11 @@ public static int SequenceHashCode(this IEnumerable source) unchecked { return source.Aggregate(seed, (current, item) => - (current*modifier) + item.GetHashCode()); + (current * modifier) + item.GetHashCode()); } } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public static IEnumerable or_empty_list_if_null(this IEnumerable source) => OrEmpty(source); @@ -142,6 +142,6 @@ public static IEnumerable distinct_last(this IEnumerable source, IEqual [Obsolete("This overload is deprecated and will be removed in v3.")] public static int get_sequence_hash_code(this IEnumerable source) => SequenceHashCode(source); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/ExceptionExtensions.cs b/src/chocolatey/ExceptionExtensions.cs index eda7e450a9..e496806835 100644 --- a/src/chocolatey/ExceptionExtensions.cs +++ b/src/chocolatey/ExceptionExtensions.cs @@ -1,21 +1,21 @@ -namespace chocolatey -{ - using System; - using System.Collections.Generic; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - - public static class ExceptionExtensions - { - public static IEnumerable Enumerate(this Exception error) - { - while (error != null) - { - yield return error; - - error = error.InnerException; - } - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace chocolatey +{ + public static class ExceptionExtensions + { + public static IEnumerable Enumerate(this Exception error) + { + while (error != null) + { + yield return error; + + error = error.InnerException; + } + } + } +} diff --git a/src/chocolatey/FileSystemExtensions.cs b/src/chocolatey/FileSystemExtensions.cs index 9791cdde24..be37fefd90 100644 --- a/src/chocolatey/FileSystemExtensions.cs +++ b/src/chocolatey/FileSystemExtensions.cs @@ -14,18 +14,18 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using chocolatey.infrastructure.adapters; +using chocolatey.infrastructure.app; +using chocolatey.infrastructure.filesystem; +using chocolatey.infrastructure.logging; +using chocolatey.infrastructure.registration; + namespace chocolatey { - using System; - using System.Collections.Generic; - using System.IO; - using System.Linq; - using chocolatey.infrastructure.adapters; - using chocolatey.infrastructure.app; - using chocolatey.infrastructure.filesystem; - using chocolatey.infrastructure.logging; - using chocolatey.infrastructure.registration; - public static class FileSystemExtensions { internal static IEnumerable GetExtensionAssemblies(this IFileSystem fileSystem) @@ -66,10 +66,10 @@ internal static IEnumerable GetExtensionAssemblies(this IFileSystem f return result.Distinct(); } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] internal static IEnumerable get_extension_assemblies(this IFileSystem fileSystem) => GetExtensionAssemblies(fileSystem); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/GetChocolatey.cs b/src/chocolatey/GetChocolatey.cs index c4f2814062..0e5236fd59 100644 --- a/src/chocolatey/GetChocolatey.cs +++ b/src/chocolatey/GetChocolatey.cs @@ -14,36 +14,36 @@ // See the License for the specific language governing permissions and // limitations under the License. -namespace chocolatey -{ - using System; - using System.Collections.Generic; - using System.IO; - using System.Reflection; - using infrastructure.licensing; - using SimpleInjector; - using infrastructure.app; - using infrastructure.app.builders; - using infrastructure.app.configuration; - using infrastructure.app.runners; - using infrastructure.configuration; - using infrastructure.extractors; - using infrastructure.logging; - using infrastructure.registration; - using infrastructure.synchronization; - using log4net; +using System; +using System.Collections.Generic; +using System.IO; +using System.Reflection; +using chocolatey.infrastructure.licensing; +using SimpleInjector; +using chocolatey.infrastructure.app; +using chocolatey.infrastructure.app.builders; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.runners; +using chocolatey.infrastructure.configuration; +using chocolatey.infrastructure.extractors; +using chocolatey.infrastructure.logging; +using chocolatey.infrastructure.registration; +using chocolatey.infrastructure.synchronization; +using log4net; #if !NoResources - using resources; +using chocolatey.resources; #endif - using Assembly = infrastructure.adapters.Assembly; - using IFileSystem = infrastructure.filesystem.IFileSystem; - using ILog = infrastructure.logging.ILog; - using System.Linq; +using Assembly = chocolatey.infrastructure.adapters.Assembly; +using IFileSystem = chocolatey.infrastructure.filesystem.IFileSystem; +using ILog = chocolatey.infrastructure.logging.ILog; +using System.Linq; +namespace chocolatey +{ /// /// Entry point for API /// @@ -101,7 +101,7 @@ public GetChocolatey(bool initializeLogging) _container = SimpleInjectorContainer.Container; if (initializeLogging) { - string loggingLocation = ApplicationParameters.LoggingLocation; + var loggingLocation = ApplicationParameters.LoggingLocation; var fileSystem = _container.GetInstance(); fileSystem.EnsureDirectoryExists(loggingLocation); @@ -413,7 +413,11 @@ private void EnsureOriginalConfiguration(IList args, Action { - if (action != null) action.Invoke(config); + if (action != null) + { + action.Invoke(config); + } + return true; }); } @@ -487,7 +491,7 @@ private ChocolateyConfiguration CreateConfiguration(IList args) private void EnsureEnvironment() { - string chocolateyInstall = string.Empty; + var chocolateyInstall = string.Empty; #if !DEBUG chocolateyInstall = Environment.GetEnvironmentVariable(ApplicationParameters.ChocolateyInstallEnvironmentVariableName, EnvironmentVariableTarget.Machine); diff --git a/src/chocolatey/ILogExtensions.cs b/src/chocolatey/ILogExtensions.cs index fa4d2ae227..1f7759982d 100644 --- a/src/chocolatey/ILogExtensions.cs +++ b/src/chocolatey/ILogExtensions.cs @@ -14,12 +14,12 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Runtime; +using chocolatey.infrastructure.logging; + namespace chocolatey { - using System; - using System.Runtime; - using infrastructure.logging; - /// /// Extensions for ILog /// @@ -31,15 +31,25 @@ public static class ILogExtensions public static bool LogTraceMessages = true; [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] +#pragma warning disable IDE0060 // Unused method parameter public static void Trace(this ILog logger, string message, params object[] formatting) +#pragma warning restore IDE0060 // Unused method parameter { - if (LogTraceMessages) ChocolateyLoggers.Trace.ToStringSafe().Log().Debug(message, formatting); + if (LogTraceMessages) + { + ChocolateyLoggers.Trace.ToStringSafe().Log().Debug(message, formatting); + } } [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] +#pragma warning disable IDE0060 // Unused method parameter public static void Trace(this ILog logger, Func message) +#pragma warning restore IDE0060 // Unused method parameter { - if (LogTraceMessages) ChocolateyLoggers.Trace.ToStringSafe().Log().Debug(message); + if (LogTraceMessages) + { + ChocolateyLoggers.Trace.ToStringSafe().Log().Debug(message); + } } [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] @@ -52,7 +62,7 @@ public static void Debug(this ILog logger, ChocolateyLoggers logType, string mes logger.Debug(message, formatting); break; case ChocolateyLoggers.Trace: - Trace(logger,message,formatting); + Trace(logger, message, formatting); break; default: logType.ToStringSafe().Log().Debug(message, formatting); diff --git a/src/chocolatey/LogExtensions.cs b/src/chocolatey/LogExtensions.cs index ad3d990a81..5a898292c3 100644 --- a/src/chocolatey/LogExtensions.cs +++ b/src/chocolatey/LogExtensions.cs @@ -14,12 +14,12 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Concurrent; +using chocolatey.infrastructure.logging; + namespace chocolatey { - using System; - using System.Collections.Concurrent; - using infrastructure.logging; - /// /// Extensions to help make logging awesome /// @@ -55,9 +55,11 @@ public static void ResetLoggers() /// /// The type to get the logger for. /// Instance of a logger for the object. +#pragma warning disable IDE0060 // Unused method parameter public static ILog Log(this T type) +#pragma warning restore IDE0060 // Unused method parameter { - string objectName = typeof (T).FullName; + var objectName = typeof(T).FullName; return Log(objectName); } diff --git a/src/chocolatey/NuGetVersionExtensions.cs b/src/chocolatey/NuGetVersionExtensions.cs index 6bef91eda4..62a0b467b4 100644 --- a/src/chocolatey/NuGetVersionExtensions.cs +++ b/src/chocolatey/NuGetVersionExtensions.cs @@ -13,11 +13,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +using NuGet.Versioning; +using System; + namespace chocolatey { - using NuGet.Versioning; - using System; - /// /// Helper methods for dealing with the the nuget version returned by /// the NuGet.Client libraries to ensure they can be easily used. @@ -59,7 +59,7 @@ public static string ToNormalizedStringChecked(this NuGetVersion version) } #pragma warning restore RS0030 // Do not used banned APIs -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public static string to_full_string(this NuGetVersion version) => ToFullStringChecked(version); @@ -67,6 +67,6 @@ public static string to_full_string(this NuGetVersion version) [Obsolete("This overload is deprecated and will be removed in v3.")] public static string to_normalized_string(this NuGetVersion version) => ToNormalizedStringChecked(version); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/ObjectExtensions.cs b/src/chocolatey/ObjectExtensions.cs index f7a7a7c546..b4219ebc72 100644 --- a/src/chocolatey/ObjectExtensions.cs +++ b/src/chocolatey/ObjectExtensions.cs @@ -14,12 +14,12 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.IO; +using System.Runtime.Serialization.Formatters.Binary; + namespace chocolatey { - using System; - using System.IO; - using System.Runtime.Serialization.Formatters.Binary; - /// /// Extensions for Object /// @@ -32,7 +32,10 @@ public static class ObjectExtensions /// if is null, otherwise .ToString() public static string ToStringSafe(this object input) { - if (input == null) return string.Empty; + if (input == null) + { + return string.Empty; + } return input.ToString(); } @@ -48,7 +51,7 @@ public static T DeepCopy(this T other) } } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public static string to_string(this object input) => ToStringSafe(input); @@ -56,6 +59,6 @@ public static string to_string(this object input) [Obsolete("This overload is deprecated and will be removed in v3.")] public static T deep_copy(this T other) => DeepCopy(other); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/RuleResultExtensions.cs b/src/chocolatey/RuleResultExtensions.cs index 50a1a1504d..638c68305e 100644 --- a/src/chocolatey/RuleResultExtensions.cs +++ b/src/chocolatey/RuleResultExtensions.cs @@ -13,13 +13,13 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Linq; +using chocolatey.infrastructure.rules; + namespace chocolatey { - using System; - using System.Collections.Generic; - using System.Linq; - using chocolatey.infrastructure.rules; - public static class RuleResultExtensions { /// @@ -42,10 +42,10 @@ public static IEnumerable WhereUnsupportedOrDeprecated(this IEnumera .Where(r => string.IsNullOrEmpty(r.Id) || (!r.Id.StartsWith("CHCU") && !r.Id.StartsWith("CHCD"))); } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public static IEnumerable where_unsupported_or_deprecated(this IEnumerable ruleResults, bool inverse = false) => WhereUnsupportedOrDeprecated(ruleResults, inverse); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/StringExtensions.cs b/src/chocolatey/StringExtensions.cs index 5da1455870..1c36ee88c0 100644 --- a/src/chocolatey/StringExtensions.cs +++ b/src/chocolatey/StringExtensions.cs @@ -14,21 +14,21 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Runtime.InteropServices; +using System.Security; +using System.Text; +using System.Text.RegularExpressions; +using System.Threading; +using System.Web.UI; +using chocolatey.infrastructure.app; +using chocolatey.infrastructure.logging; + namespace chocolatey { - using System; - using System.Collections.Generic; - using System.Globalization; - using System.Linq; - using System.Runtime.InteropServices; - using System.Security; - using System.Text; - using System.Text.RegularExpressions; - using System.Threading; - using System.Web.UI; - using infrastructure.app; - using infrastructure.logging; - /// /// Extensions for string /// @@ -42,7 +42,10 @@ public static class StringExtensions /// A formatted string, or if is null. public static string FormatWith(this string input, params object[] formatting) { - if (string.IsNullOrWhiteSpace(input)) return string.Empty; + if (string.IsNullOrWhiteSpace(input)) + { + return string.Empty; + } try { @@ -137,7 +140,10 @@ public static string SplitOnSpace(this string input, string linePrefix = "", int /// public static string TrimSafe(this string input) { - if (string.IsNullOrWhiteSpace(input)) return string.Empty; + if (string.IsNullOrWhiteSpace(input)) + { + return string.Empty; + } return input.Trim(); } @@ -149,7 +155,10 @@ public static string TrimSafe(this string input) /// public static string ToLowerSafe(this string input) { - if (string.IsNullOrWhiteSpace(input)) return string.Empty; + if (string.IsNullOrWhiteSpace(input)) + { + return string.Empty; + } return input.ToLower(); } @@ -161,7 +170,10 @@ public static string ToLowerSafe(this string input) /// public static string ToStringSafe(this string input) { - if (string.IsNullOrWhiteSpace(input)) return string.Empty; + if (string.IsNullOrWhiteSpace(input)) + { + return string.Empty; + } return input; } @@ -175,9 +187,12 @@ public static SecureString ToSecureStringSafe(this string input) { var secureString = new SecureString(); - if (string.IsNullOrWhiteSpace(input)) return secureString; + if (string.IsNullOrWhiteSpace(input)) + { + return secureString; + } - foreach (char character in input) + foreach (var character in input) { secureString.AppendChar(character); } @@ -187,7 +202,10 @@ public static SecureString ToSecureStringSafe(this string input) public static string FromSecureStringSafe(this SecureString input) { - if (input == null) return string.Empty; + if (input == null) + { + return string.Empty; + } IntPtr unmanagedString = IntPtr.Zero; try @@ -210,7 +228,10 @@ public static string FromSecureStringSafe(this SecureString input) /// public static string QuoteIfContainsSpaces(this string input) { - if (string.IsNullOrWhiteSpace(input)) return input; + if (string.IsNullOrWhiteSpace(input)) + { + return input; + } if (_spacePattern.IsMatch(input)) { @@ -250,7 +271,10 @@ public static bool ContainsSafe(this string input, string search, StringComparis /// public static string UnquoteSafe(this string input) { - if (string.IsNullOrWhiteSpace(input)) return string.Empty; + if (string.IsNullOrWhiteSpace(input)) + { + return string.Empty; + } if (input.StartsWith(" ")) { @@ -271,9 +295,12 @@ public static string UnquoteSafe(this string input) public static string EscapeCurlyBraces(this string input) { - if (string.IsNullOrWhiteSpace(input)) return string.Empty; + if (string.IsNullOrWhiteSpace(input)) + { + return string.Empty; + } - return _openBraceRegex.Replace(_closeBraceRegex.Replace(input,"}}"),"{{"); + return _openBraceRegex.Replace(_closeBraceRegex.Replace(input, "}}"), "{{"); } /// @@ -283,14 +310,20 @@ public static string EscapeCurlyBraces(this string input) /// The input, but with double quotes if there is a pipe character found in the string. public static string QuoteIfContainsPipe(this string input) { - if (string.IsNullOrWhiteSpace(input)) return input.ToStringSafe(); + if (string.IsNullOrWhiteSpace(input)) + { + return input.ToStringSafe(); + } - if (input.ContainsSafe("|")) return "\"{0}\"".FormatWith(input); + if (input.ContainsSafe("|")) + { + return "\"{0}\"".FormatWith(input); + } return input; } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public static string format_with(this string input, params object[] formatting) => FormatWith(input, formatting); @@ -338,6 +371,6 @@ public static string escape_curly_braces(this string input) [Obsolete("This overload is deprecated and will be removed in v3.")] public static string quote_if_pipe_found(this string input) => QuoteIfContainsPipe(input); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/StringResources.cs b/src/chocolatey/StringResources.cs index 4bbf0f6c99..8f04a3e641 100644 --- a/src/chocolatey/StringResources.cs +++ b/src/chocolatey/StringResources.cs @@ -13,10 +13,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System.ComponentModel; + namespace chocolatey { - using System.ComponentModel; - public static class StringResources { /// diff --git a/src/chocolatey/TypeExtensions.cs b/src/chocolatey/TypeExtensions.cs index 29457b3165..bdfe6e289f 100644 --- a/src/chocolatey/TypeExtensions.cs +++ b/src/chocolatey/TypeExtensions.cs @@ -14,10 +14,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; + namespace chocolatey { - using System; - /// /// Extensions for Type /// @@ -30,12 +30,15 @@ public static class TypeExtensions /// true if meets criteria for system type public static bool IsBuiltinType(this Type type) { - if (type == null) return false; + if (type == null) + { + return false; + } // if all else fails, check to see if the namespace is at system. return type.IsPrimitive || type.IsValueType - || (type == typeof (string)) + || (type == typeof(string)) || type.Namespace.Equals("System", StringComparison.Ordinal); } @@ -46,14 +49,17 @@ public static bool IsBuiltinType(this Type type) /// true if enumerable public static bool IsCollectionType(this Type type) { - if (type == null) return false; + if (type == null) + { + return false; + } // Surely we can do a check around "is ICollection" / "is ICollection<>" here? return type.IsArray || type.Namespace.Contains("System.Collections"); } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public static bool is_built_in_system_type(this Type type) => IsBuiltinType(type); @@ -61,6 +67,6 @@ public static bool is_built_in_system_type(this Type type) [Obsolete("This overload is deprecated and will be removed in v3.")] public static bool is_collections_type(this Type type) => IsCollectionType(type); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/chocolatey.csproj b/src/chocolatey/chocolatey.csproj index a945314f6d..44d3754eb3 100644 --- a/src/chocolatey/chocolatey.csproj +++ b/src/chocolatey/chocolatey.csproj @@ -204,6 +204,7 @@ + @@ -270,6 +271,7 @@ + diff --git a/src/chocolatey/infrastructure.app/ApplicationParameters.cs b/src/chocolatey/infrastructure.app/ApplicationParameters.cs index 4f28197ce0..8125f81d03 100644 --- a/src/chocolatey/infrastructure.app/ApplicationParameters.cs +++ b/src/chocolatey/infrastructure.app/ApplicationParameters.cs @@ -14,16 +14,17 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Security.Principal; +using chocolatey.infrastructure.adapters; +using chocolatey.infrastructure.filesystem; +using Environment = System.Environment; +using chocolatey.infrastructure.platforms; +using chocolatey.infrastructure.information; + namespace chocolatey.infrastructure.app { - using System; - using System.Security.Principal; - using adapters; - using filesystem; - using Environment = System.Environment; - using chocolatey.infrastructure.platforms; - using chocolatey.infrastructure.information; - /// /// Application constants and settings for the application /// @@ -60,6 +61,11 @@ public static class ApplicationParameters public static readonly string LicensedAssemblyLocation = _fileSystem.FileExists(_fileSystem.CombinePaths(InstallLocation, "chocolatey.licensed.dll")) ? _fileSystem.CombinePaths(InstallLocation, "chocolatey.licensed.dll") : _fileSystem.CombinePaths(InstallLocation, "extensions", "chocolatey", "chocolatey.licensed.dll"); #endif + internal static readonly string ChocolateyPowerShellAssemblySimpleName = "Chocolatey.PowerShell"; + internal static readonly string ChocolateyPowerShellAssemblyLocation = _fileSystem.FileExists(_fileSystem.CombinePaths(InstallLocation, "Chocolatey.PowerShell.dll")) + ? _fileSystem.CombinePaths(InstallLocation, "Chocolatey.PowerShell.dll") + : _fileSystem.CombinePaths(InstallLocation, "helpers", "Chocolatey.PowerShell.dll"); + public static readonly string CommonAppDataChocolatey = _fileSystem.CombinePaths(System.Environment.GetFolderPath(System.Environment.SpecialFolder.CommonApplicationData), Name); public static readonly string LoggingLocation = _fileSystem.CombinePaths(InstallLocation, "logs"); public static readonly string LoggingFile = @"chocolatey.log"; @@ -101,6 +107,8 @@ public static class ApplicationParameters public static readonly string ChocolateyCommunityFeedPushSource = "https://push.chocolatey.org/"; public static readonly string ChocolateyCommunityGalleryUrl = "https://community.chocolatey.org/"; public static readonly string ChocolateyCommunityFeedSource = "https://community.chocolatey.org/api/v2/"; + public static readonly string NuGetPublicFeedSourceV2 = "https://www.nuget.org/api/v2/"; + public static readonly string NuGetPublicFeedSourceV3 = "https://api.nuget.org/v3/index.json"; public static readonly string ChocolateyLicensedFeedSource = "https://licensedpackages.chocolatey.org/api/v2/"; public static readonly string ChocolateyLicensedFeedSourceName = "chocolatey.licensed"; public static readonly string UserAgent = "Chocolatey Command Line"; @@ -110,6 +118,15 @@ public static class ApplicationParameters public static readonly string PowerShellModulePathProcessDocuments = _fileSystem.CombinePaths(System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyDocuments), "WindowsPowerShell\\Modules"); public static readonly string LocalSystemSidString = "S-1-5-18"; public static readonly SecurityIdentifier LocalSystemSid = new SecurityIdentifier(LocalSystemSidString); + public static readonly List PublicNuGetSources = new List() + { + ChocolateyCommunityFeedSource, + ChocolateyCommunityFeedPushSource, + ChocolateyCommunityFeedPushSourceOld, + NuGetPublicFeedSourceV2, + NuGetPublicFeedSourceV3, + ChocolateyLicensedFeedSource, + }; private static string GetHttpCacheLocation() { @@ -152,10 +169,9 @@ public static class Environment /// public static int DefaultWaitForExitInSeconds = 2700; public static int DefaultWebRequestTimeoutInSeconds = 30; - - public static readonly string[] ConfigFileExtensions = new string[] {".autoconf",".config",".conf",".cfg",".jsc",".json",".jsonp",".ini",".xml",".yaml"}; + public static readonly string[] ConfigFileExtensions = new string[] { ".autoconf", ".config", ".conf", ".cfg", ".jsc", ".json", ".jsonp", ".ini", ".xml", ".yaml" }; public static readonly string ConfigFileTransformExtension = ".install.xdt"; - public static readonly string[] ShimDirectorFileExtensions = new string[] {".gui",".ignore"}; + public static readonly string[] ShimDirectorFileExtensions = new string[] { ".gui", ".ignore" }; public static readonly string HashProviderFileTooBig = "UnableToDetectChanges_FileTooBig"; public static readonly string HashProviderFileLocked = "UnableToDetectChanges_FileLocked"; @@ -226,6 +242,7 @@ public static class Features public static readonly string LogValidationResultsOnWarnings = "logValidationResultsOnWarnings"; public static readonly string UsePackageRepositoryOptimizations = "usePackageRepositoryOptimizations"; public static readonly string DisableCompatibilityChecks = "disableCompatibilityChecks"; + public static readonly string UsePackageHashValidation = "usePackageHashValidation"; } public static class Messages @@ -251,10 +268,10 @@ public static bool IsDebugModeCliPrimitive() return isDebug; } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public static bool is_debug_mode_cli_primitive() => IsDebugModeCliPrimitive(); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/attributes/CommandForAttribute.cs b/src/chocolatey/infrastructure.app/attributes/CommandForAttribute.cs index 927a108349..3ab30458da 100644 --- a/src/chocolatey/infrastructure.app/attributes/CommandForAttribute.cs +++ b/src/chocolatey/infrastructure.app/attributes/CommandForAttribute.cs @@ -14,10 +14,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; + namespace chocolatey.infrastructure.app.attributes { - using System; - [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)] public class CommandForAttribute : Attribute { diff --git a/src/chocolatey/infrastructure.app/attributes/MultiServiceAttribute.cs b/src/chocolatey/infrastructure.app/attributes/MultiServiceAttribute.cs index 2745bbb9da..3403c1f717 100644 --- a/src/chocolatey/infrastructure.app/attributes/MultiServiceAttribute.cs +++ b/src/chocolatey/infrastructure.app/attributes/MultiServiceAttribute.cs @@ -14,10 +14,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; + namespace chocolatey.infrastructure.app.attributes { - using System; - [AttributeUsage(AttributeTargets.Interface, Inherited = true, AllowMultiple = false)] internal sealed class MultiServiceAttribute : Attribute { diff --git a/src/chocolatey/infrastructure.app/builders/ConfigurationBuilder.cs b/src/chocolatey/infrastructure.app/builders/ConfigurationBuilder.cs index 2f0055b3af..3d7be60ae5 100644 --- a/src/chocolatey/infrastructure.app/builders/ConfigurationBuilder.cs +++ b/src/chocolatey/infrastructure.app/builders/ConfigurationBuilder.cs @@ -14,33 +14,33 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Reflection; +using System.Text; +using chocolatey.infrastructure.adapters; +using chocolatey.infrastructure.app.commands; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.cryptography; +using chocolatey.infrastructure.extractors; +using chocolatey.infrastructure.filesystem; +using chocolatey.infrastructure.information; +using chocolatey.infrastructure.services; +using chocolatey.infrastructure.licensing; +using chocolatey.infrastructure.logging; +using Microsoft.Win32; +using chocolatey.infrastructure.app.nuget; +using chocolatey.infrastructure.platforms; +using chocolatey.infrastructure.app.services; +using chocolatey.infrastructure.tolerance; +using Assembly = chocolatey.infrastructure.adapters.Assembly; +using Container = SimpleInjector.Container; +using Environment = chocolatey.infrastructure.adapters.Environment; + namespace chocolatey.infrastructure.app.builders { - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.Linq; - using System.Reflection; - using System.Text; - using adapters; - using chocolatey.infrastructure.app.commands; - using configuration; - using cryptography; - using extractors; - using filesystem; - using information; - using infrastructure.services; - using licensing; - using logging; - using Microsoft.Win32; - using nuget; - using platforms; - using services; - using tolerance; - using Assembly = adapters.Assembly; - using Container = SimpleInjector.Container; - using Environment = adapters.Environment; - /// /// Responsible for gathering all configuration related information and producing the ChocolateyConfig /// @@ -77,14 +77,16 @@ public static bool AreCompatibilityChecksDisabled(IFileSystem filesystem, IXmlSe /// The container. /// The license. /// Notify warn logging action +#pragma warning disable IDE0060 // Unused method parameter public static void SetupConfiguration(IList args, ChocolateyConfiguration config, Container container, ChocolateyLicense license, Action notifyWarnLoggingAction) +#pragma warning restore IDE0060 // Unused method parameter { var fileSystem = container.GetInstance(); var xmlService = container.GetInstance(); var configFileSettings = GetConfigFileSettings(fileSystem, xmlService); // must be done prior to setting the file configuration AddOrRemoveLicensedSource(license, configFileSettings); - SetFileConfiguration(config, configFileSettings, fileSystem, notifyWarnLoggingAction); + SetFileConfiguration(config, configFileSettings, fileSystem); ConfigurationOptions.ClearOptions(); SetGlobalOptions(args, config, container); SetEnvironmentOptions(config); @@ -153,7 +155,7 @@ private static void AddOrRemoveLicensedSource(ChocolateyLicense license, ConfigF configFileSettings.Sources.RemoveWhere(s => s.Id.IsEqualTo(configSource.Id) && !NugetEncryptionUtility.DecryptString(s.Password).IsEqualTo(license.Id)); } - private static void SetFileConfiguration(ChocolateyConfiguration config, ConfigFileSettings configFileSettings, IFileSystem fileSystem, Action notifyWarnLoggingAction) + private static void SetFileConfiguration(ChocolateyConfiguration config, ConfigFileSettings configFileSettings, IFileSystem fileSystem) { SetSourcesInPriorityOrder(config, configFileSettings); SetMachineSources(config, configFileSettings); @@ -239,7 +241,10 @@ private static void SetAllConfigItems(ChocolateyConfiguration config, ConfigFile } // if it is still empty, use temp in the Chocolatey install directory. - if (string.IsNullOrWhiteSpace(config.CacheLocation)) config.CacheLocation = fileSystem.CombinePaths(ApplicationParameters.InstallLocation, "temp"); + if (string.IsNullOrWhiteSpace(config.CacheLocation)) + { + config.CacheLocation = fileSystem.CombinePaths(ApplicationParameters.InstallLocation, "temp"); + } var commandExecutionTimeoutSeconds = 0; var commandExecutionTimeout = SetConfigItem( @@ -273,10 +278,10 @@ private static void SetAllConfigItems(ChocolateyConfiguration config, ConfigFile config.WebRequestTimeoutSeconds = webRequestTimeoutSeconds; config.Proxy.Location = SetConfigItem(ApplicationParameters.ConfigSettings.Proxy, configFileSettings, string.Empty, "Explicit proxy location."); - config.Proxy.User = SetConfigItem(ApplicationParameters.ConfigSettings.ProxyUser, configFileSettings, string.Empty, "Optional proxy user."); - config.Proxy.EncryptedPassword = SetConfigItem(ApplicationParameters.ConfigSettings.ProxyPassword, configFileSettings, string.Empty, "Optional proxy password. Encrypted."); - config.Proxy.BypassList = SetConfigItem(ApplicationParameters.ConfigSettings.ProxyBypassList, configFileSettings, string.Empty, "Optional proxy bypass list. Comma separated."); - config.Proxy.BypassOnLocal = SetConfigItem(ApplicationParameters.ConfigSettings.ProxyBypassOnLocal, configFileSettings, "true", "Bypass proxy for local connections.").IsEqualTo(bool.TrueString); + config.Proxy.User = SetConfigItem(ApplicationParameters.ConfigSettings.ProxyUser, configFileSettings, string.Empty, "Optional proxy user. Requires explicit proxy configured."); + config.Proxy.EncryptedPassword = SetConfigItem(ApplicationParameters.ConfigSettings.ProxyPassword, configFileSettings, string.Empty, "Optional proxy password. Encrypted. Requires explicit proxy and proxyUser configured."); + config.Proxy.BypassList = SetConfigItem(ApplicationParameters.ConfigSettings.ProxyBypassList, configFileSettings, string.Empty, "Optional proxy bypass list. Comma separated. Requires explicit proxy configured."); + config.Proxy.BypassOnLocal = SetConfigItem(ApplicationParameters.ConfigSettings.ProxyBypassOnLocal, configFileSettings, "true", "Bypass proxy for local connections. Requires explicit proxy configured.").IsEqualTo(bool.TrueString); config.UpgradeCommand.PackageNamesToSkip = SetConfigItem(ApplicationParameters.ConfigSettings.UpgradeAllExceptions, configFileSettings, string.Empty, "A comma-separated list of package names that should not be upgraded when running `choco upgrade all'. Defaults to empty."); config.DefaultTemplateName = SetConfigItem(ApplicationParameters.ConfigSettings.DefaultTemplateName, configFileSettings, string.Empty, "Default template name used when running 'choco new' command."); config.PushCommand.DefaultSource = SetConfigItem(ApplicationParameters.ConfigSettings.DefaultPushSource, configFileSettings, string.Empty, "Default source to push packages to when running 'choco push' command."); @@ -333,8 +338,9 @@ private static void SetAllFeatureFlags(ChocolateyConfiguration config, ConfigFil config.Features.LogWithoutColor = SetFeatureFlag(ApplicationParameters.Features.LogWithoutColor, configFileSettings, defaultEnabled: false, description: "Log without color - Do not show colorization in logging output."); config.Features.LogValidationResultsOnWarnings = SetFeatureFlag(ApplicationParameters.Features.LogValidationResultsOnWarnings, configFileSettings, defaultEnabled: true, description: "Log validation results on warnings - Should the validation results be logged if there are warnings?"); config.Features.UsePackageRepositoryOptimizations = SetFeatureFlag(ApplicationParameters.Features.UsePackageRepositoryOptimizations, configFileSettings, defaultEnabled: true, description: "Use Package Repository Optimizations - Turn on optimizations for reducing bandwidth with repository queries during package install/upgrade/outdated operations. Should generally be left enabled, unless a repository needs to support older methods of query. When disabled, this makes queries similar to the way they were done in earlier versions of Chocolatey."); + config.Features.UsePackageHashValidation = SetFeatureFlag(ApplicationParameters.Features.UsePackageHashValidation, configFileSettings, defaultEnabled: false, description: "Use Package Hash Validation - Check the hash of the downloaded package file against the source provided hash. Only supports sources that provide SHA512 hashes. Disabled by default. Available in 2.3.0+"); config.PromptForConfirmation = !SetFeatureFlag(ApplicationParameters.Features.AllowGlobalConfirmation, configFileSettings, defaultEnabled: false, description: "Prompt for confirmation in scripts or bypass."); - config.DisableCompatibilityChecks = SetFeatureFlag(ApplicationParameters.Features.DisableCompatibilityChecks, configFileSettings, defaultEnabled: false, description: "Disable Compatibility Checks - Disable showing a warning when there is an incompatibility between Chocolatey CLI and Chocolatey Licensed Extension. Available in 1.1.0+"); + config.DisableCompatibilityChecks = SetFeatureFlag(ApplicationParameters.Features.DisableCompatibilityChecks, configFileSettings, defaultEnabled: false, description: "Disable Compatibility Checks - Disable showing a warning when there is an incompatibility between Chocolatey CLI and Chocolatey Licensed Extension."); } private static bool SetFeatureFlag(string featureName, ConfigFileSettings configFileSettings, bool defaultEnabled, string description) @@ -408,7 +414,7 @@ private static void SetGlobalOptions(IList args, ChocolateyConfiguration "CommandExecutionTimeout (in seconds) - The time to allow a command to finish before timing out. Overrides the default execution timeout in the configuration of {0} seconds. Supply '0' to disable the timeout.".FormatWith(config.CommandExecutionTimeoutSeconds.ToStringSafe()), option => { - int timeout = 0; + var timeout = 0; var timeoutString = option.UnquoteSafe(); int.TryParse(timeoutString, out timeout); if (timeout > 0 || timeoutString.IsEqualTo("0")) @@ -438,7 +444,7 @@ private static void SetGlobalOptions(IList args, ChocolateyConfiguration "Proxy User Name - Explicit proxy user (optional). Requires explicit proxy (`--proxy` or config setting). Overrides the default proxy user of '{0}'.".FormatWith(config.Proxy.User), option => config.Proxy.User = option.UnquoteSafe()) .Add("proxy-password=", - "Proxy Password - Explicit proxy password (optional) to be used with username. Requires explicit proxy (`--proxy` or config setting) and user name. Overrides the default proxy password (encrypted in settings if set).", + "Proxy Password - Explicit proxy password (optional) to be used with user name. Encrypted. Requires explicit proxy (`--proxy` or config setting) and user name (`--proxy-user` or config setting). Overrides the default proxy password.", option => config.Proxy.EncryptedPassword = NugetEncryptionUtility.EncryptString(option.UnquoteSafe())) .Add("proxy-bypass-list=", "ProxyBypassList - Comma separated list of regex locations to bypass on proxy. Requires explicit proxy (`--proxy` or config setting). Overrides the default proxy bypass list of '{0}'.".FormatWith(config.Proxy.BypassList), @@ -450,7 +456,7 @@ private static void SetGlobalOptions(IList args, ChocolateyConfiguration "Log File to output to in addition to regular loggers.", option => config.AdditionalLogFileLocation = option.UnquoteSafe()) .Add("skipcompatibilitychecks|skip-compatibility-checks", - "SkipCompatibilityChecks - Prevent warnings being shown before and after command execution when a runtime compatibility problem is found between the version of Chocolatey and the Chocolatey Licensed Extension. Available in 1.1.0+", + "SkipCompatibilityChecks - Prevent warnings being shown before and after command execution when a runtime compatibility problem is found between the version of Chocolatey and the Chocolatey Licensed Extension.", option => config.DisableCompatibilityChecks = option != null) .Add("ignore-http-cache", "IgnoreHttpCache - Ignore any HTTP caches that have previously been created when querying sources, and create new caches. Available in 2.1.0+", @@ -461,7 +467,7 @@ private static void SetGlobalOptions(IList args, ChocolateyConfiguration config.CacheExpirationInMinutes = -1; } }); - ; + ; }, (unparsedArgs) => { @@ -531,27 +537,35 @@ private static void SetLicensedOptions(ChocolateyConfiguration config, Chocolate if (licensedConfigBuilder == null) { - if (config.RegularOutput) "chocolatey".Log().Warn(ChocolateyLoggers.Important, + if (config.RegularOutput) + { + "chocolatey".Log().Warn(ChocolateyLoggers.Important, @"Unable to set licensed configuration. Please upgrade to a newer licensed version (choco upgrade chocolatey.extension)."); + } + return; } try { - object componentClass = Activator.CreateInstance(licensedConfigBuilder); + var componentClass = Activator.CreateInstance(licensedConfigBuilder); licensedConfigBuilder.InvokeMember( SetConfigurationMethod, BindingFlags.InvokeMethod, null, componentClass, - new Object[] { config, configFileSettings } + new object[] { config, configFileSettings } ); } catch (Exception ex) { var isDebug = ApplicationParameters.IsDebugModeCliPrimitive(); - if (config.Debug) isDebug = true; + if (config.Debug) + { + isDebug = true; + } + var message = isDebug ? ex.ToString() : ex.Message; if (isDebug && ex.InnerException != null) @@ -605,7 +619,7 @@ FIPS Mode detected - run 'choco feature enable -n {0}' } } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] [EditorBrowsable(EditorBrowsableState.Never)] public static void initialize_with(Lazy environment) @@ -618,6 +632,6 @@ public static bool is_compatibility_checks_disabled(IFileSystem filesystem, IXml [Obsolete("This overload is deprecated and will be removed in v3.")] public static void set_up_configuration(IList args, ChocolateyConfiguration config, Container container, ChocolateyLicense license, Action notifyWarnLoggingAction) => SetupConfiguration(args, config, container, license, notifyWarnLoggingAction); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/commands/ChocolateyApiKeyCommand.cs b/src/chocolatey/infrastructure.app/commands/ChocolateyApiKeyCommand.cs index 5840d1db41..407494440b 100644 --- a/src/chocolatey/infrastructure.app/commands/ChocolateyApiKeyCommand.cs +++ b/src/chocolatey/infrastructure.app/commands/ChocolateyApiKeyCommand.cs @@ -14,20 +14,20 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Linq; +using chocolatey.infrastructure.app.attributes; +using chocolatey.infrastructure.app.domain; +using chocolatey.infrastructure.commandline; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.commands; +using chocolatey.infrastructure.configuration; +using chocolatey.infrastructure.logging; +using chocolatey.infrastructure.app.services; + namespace chocolatey.infrastructure.app.commands { - using System; - using System.Collections.Generic; - using System.Linq; - using attributes; - using chocolatey.infrastructure.app.domain; - using commandline; - using configuration; - using infrastructure.commands; - using infrastructure.configuration; - using logging; - using services; - [CommandFor("apikey", "retrieves, saves or deletes an API key for a particular source")] [CommandFor("setapikey", "retrieves, saves or deletes an API key for a particular source (alias for apikey)")] public class ChocolateyApiKeyCommand : ICommand @@ -63,7 +63,7 @@ public virtual void ParseAdditionalArguments(IList unparsedArguments, Ch } var command = ApiKeyCommandType.Unknown; - string unparsedCommand = unparsedArguments.DefaultIfEmpty(string.Empty).FirstOrDefault(); + var unparsedCommand = unparsedArguments.DefaultIfEmpty(string.Empty).FirstOrDefault(); if (!Enum.TryParse(unparsedCommand, true, out command) || command == ApiKeyCommandType.Unknown) { @@ -167,12 +167,17 @@ Exit codes that normally result from running this command. Normal: - 0: operation was successful, no issues detected - -1 or 1: an error has occurred + - 2: nothing to do, apikey already set (enhanced) + +NOTE: Starting in v2.3.0, if you have the feature '{0}' + turned on, then choco will provide enhanced exit codes that allow + better integration and scripting. If you find other exit codes that we have not yet documented, please file a ticket so we can document it at https://github.com/chocolatey/choco/issues/new/choose. -"); +".FormatWith(ApplicationParameters.Features.UseEnhancedExitCodes)); "chocolatey".Log().Info(ChocolateyLoggers.Important, "Options and Switches"); } @@ -194,7 +199,7 @@ public virtual void Run(ChocolateyConfiguration configuration) default: _configSettingsService.GetApiKey(configuration, (key) => { - string authenticatedString = string.IsNullOrWhiteSpace(key.Key) ? string.Empty : "(Authenticated)"; + var authenticatedString = string.IsNullOrWhiteSpace(key.Key) ? string.Empty : "(Authenticated)"; if (configuration.RegularOutput) { @@ -212,12 +217,15 @@ public virtual void Run(ChocolateyConfiguration configuration) public virtual bool MayRequireAdminAccess() { var config = Config.GetConfigurationSettings(); - if (config == null) return true; + if (config == null) + { + return true; + } return !string.IsNullOrWhiteSpace(config.ApiKeyCommand.Key); } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public virtual void configure_argument_parser(OptionSet optionSet, ChocolateyConfiguration configuration) => ConfigureArgumentParser(optionSet, configuration); @@ -245,6 +253,6 @@ public virtual void run(ChocolateyConfiguration configuration) [Obsolete("This overload is deprecated and will be removed in v3.")] public virtual bool may_require_admin_access() => MayRequireAdminAccess(); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/commands/ChocolateyCacheCommand.cs b/src/chocolatey/infrastructure.app/commands/ChocolateyCacheCommand.cs index 002807b00d..4db3a9cc13 100644 --- a/src/chocolatey/infrastructure.app/commands/ChocolateyCacheCommand.cs +++ b/src/chocolatey/infrastructure.app/commands/ChocolateyCacheCommand.cs @@ -13,21 +13,21 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using chocolatey.infrastructure.app.attributes; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.domain; +using chocolatey.infrastructure.app.nuget; +using chocolatey.infrastructure.commandline; +using chocolatey.infrastructure.commands; +using chocolatey.infrastructure.filesystem; +using chocolatey.infrastructure.logging; + namespace chocolatey.infrastructure.app.commands { - using System; - using System.Collections.Generic; - using System.IO; - using System.Linq; - using chocolatey.infrastructure.app.attributes; - using chocolatey.infrastructure.app.configuration; - using chocolatey.infrastructure.app.domain; - using chocolatey.infrastructure.app.nuget; - using chocolatey.infrastructure.commandline; - using chocolatey.infrastructure.commands; - using chocolatey.infrastructure.filesystem; - using chocolatey.infrastructure.logging; - [CommandFor("cache", "Manage the local HTTP caches used to store queries", Version = "2.1.0")] public class ChocolateyCacheCommand : ChocolateyCommandBase, ICommand { @@ -259,13 +259,13 @@ private void ListCachedItems(ChocolateyConfiguration configuration, string cache var cachedFiles = _fileSystem.GetFiles(cacheLocation, "*.dat", SearchOption.AllDirectories); var cachedDirectories = _fileSystem.GetDirectories(cacheLocation).Where(d => !_fileSystem.GetFileName(d).IsEqualTo(LockDirectoryName)); var expirationTimer = GetCacheExpiration(configuration); - + var expiredFiles = cachedFiles.Where(f => _fileSystem.GetFileModifiedDate(f) < expirationTimer); this.Log().Info("We found {0} cached sources.", cachedDirectories.Count()); this.Log().Info("We found {0} cached items for all sources, where {1} items have expired.", cachedFiles.Count(), expiredFiles.Count()); } - + #region Obsoleted methods [Obsolete("Will be removed in v3. Use ConfigureArgumentParser instead!")] diff --git a/src/chocolatey/infrastructure.app/commands/ChocolateyCommandBase.cs b/src/chocolatey/infrastructure.app/commands/ChocolateyCommandBase.cs index 3697cdb696..7d5c107e0b 100644 --- a/src/chocolatey/infrastructure.app/commands/ChocolateyCommandBase.cs +++ b/src/chocolatey/infrastructure.app/commands/ChocolateyCommandBase.cs @@ -13,18 +13,18 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using chocolatey.infrastructure.app.attributes; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.commands; +using chocolatey.infrastructure.logging; + namespace chocolatey.infrastructure.app.commands { - using System; - using System.Collections.Generic; - using System.Linq; - using System.Reflection; - using System.Text; - using chocolatey.infrastructure.app.attributes; - using chocolatey.infrastructure.app.configuration; - using chocolatey.infrastructure.commands; - using chocolatey.infrastructure.logging; - /// /// A base class for any Chocolatey commands which need to utilise shared logic. /// @@ -101,7 +101,7 @@ write proper scripts and integrations. var normalExitCodes = GetNormalExitCodes(configuration).ToArray(); var enhancedExitCodes = GetEnhancedExitCodes(configuration).ToArray(); - var additionalExitCodeDescription = GetAdditionalExitCodeDescription(configuration); + var additionalExitCodeDescription = GetAdditionalExitCodeDescription(); if (normalExitCodes.Length > 0 || enhancedExitCodes.Length > 0 || !string.IsNullOrEmpty(additionalExitCodeDescription)) { @@ -139,7 +139,7 @@ file a ticket so we can document it at this.Log().Info(string.Empty); } - var additionalHelpContent = GetAdditionalHelpContent(configuration); + var additionalHelpContent = GetAdditionalHelpContent(); if (!string.IsNullOrEmpty(additionalHelpContent)) { @@ -149,7 +149,7 @@ file a ticket so we can document it at this.Log().Info(ChocolateyLoggers.Important, "Options and Switches"); - var optionsAndSwitchesContent = GetOptionsAndSwitchesDescription(configuration); + var optionsAndSwitchesContent = GetOptionsAndSwitchesDescription(); if (!string.IsNullOrEmpty(optionsAndSwitchesContent)) { @@ -239,17 +239,17 @@ protected virtual void WarnForRemovedOptions(IEnumerable unparsedOptions } } - private string GetAdditionalExitCodeDescription(ChocolateyConfiguration configuration) + private string GetAdditionalExitCodeDescription() { return string.Empty; } - private string GetAdditionalHelpContent(ChocolateyConfiguration configuration) + private string GetAdditionalHelpContent() { return string.Empty; } - private string GetOptionsAndSwitchesDescription(ChocolateyConfiguration configuration) + private string GetOptionsAndSwitchesDescription() { return string.Empty; } diff --git a/src/chocolatey/infrastructure.app/commands/ChocolateyConfigCommand.cs b/src/chocolatey/infrastructure.app/commands/ChocolateyConfigCommand.cs index e878133fb8..98c860336c 100644 --- a/src/chocolatey/infrastructure.app/commands/ChocolateyConfigCommand.cs +++ b/src/chocolatey/infrastructure.app/commands/ChocolateyConfigCommand.cs @@ -14,20 +14,20 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Linq; +using chocolatey.infrastructure.app.attributes; +using chocolatey.infrastructure.commandline; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.domain; +using chocolatey.infrastructure.commands; +using chocolatey.infrastructure.configuration; +using chocolatey.infrastructure.logging; +using chocolatey.infrastructure.app.services; + namespace chocolatey.infrastructure.app.commands { - using System; - using System.Collections.Generic; - using System.Linq; - using attributes; - using commandline; - using configuration; - using domain; - using infrastructure.commands; - using infrastructure.configuration; - using logging; - using services; - [CommandFor("config", "Retrieve and configure config file settings")] public class ChocolateyConfigCommand : ICommand { @@ -58,11 +58,15 @@ public virtual void ParseAdditionalArguments(IList unparsedArguments, Ch { configuration.Input = string.Join(" ", unparsedArguments); var command = ConfigCommandType.Unknown; - string unparsedCommand = unparsedArguments.DefaultIfEmpty(string.Empty).FirstOrDefault().ToStringSafe().Replace("-", string.Empty); + var unparsedCommand = unparsedArguments.DefaultIfEmpty(string.Empty).FirstOrDefault().ToStringSafe().Replace("-", string.Empty); Enum.TryParse(unparsedCommand, true, out command); if (command == ConfigCommandType.Unknown) { - if (!string.IsNullOrWhiteSpace(unparsedCommand)) this.Log().Warn("Unknown command {0}. Setting to list.".FormatWith(unparsedCommand)); + if (!string.IsNullOrWhiteSpace(unparsedCommand)) + { + this.Log().Warn("Unknown command {0}. Setting to list.".FormatWith(unparsedCommand)); + } + command = ConfigCommandType.List; } @@ -71,7 +75,10 @@ public virtual void ParseAdditionalArguments(IList unparsedArguments, Ch if ((configuration.ConfigCommand.Command == ConfigCommandType.List || !string.IsNullOrWhiteSpace(configuration.ConfigCommand.Name) ) - && unparsedArguments.Count > 1) throw new ApplicationException("A single features command must be listed. Please see the help menu for those commands"); + && unparsedArguments.Count > 1) + { + throw new ApplicationException("A single config command must be listed. Please see the help menu for those commands."); + } if (string.IsNullOrWhiteSpace(configuration.ConfigCommand.Name) && unparsedArguments.Count >= 2) { @@ -85,8 +92,15 @@ public virtual void ParseAdditionalArguments(IList unparsedArguments, Ch public virtual void Validate(ChocolateyConfiguration configuration) { - if (configuration.ConfigCommand.Command != ConfigCommandType.List && string.IsNullOrWhiteSpace(configuration.ConfigCommand.Name)) throw new ApplicationException("When specifying the subcommand '{0}', you must also specify --name by option or position.".FormatWith(configuration.ConfigCommand.Command.ToStringSafe().ToLower())); - if (configuration.ConfigCommand.Command == ConfigCommandType.Set && string.IsNullOrWhiteSpace(configuration.ConfigCommand.ConfigValue)) throw new ApplicationException("When specifying the subcommand '{0}', you must also specify --value by option or position.".FormatWith(configuration.ConfigCommand.Command.ToStringSafe().ToLower())); + if (configuration.ConfigCommand.Command != ConfigCommandType.List && string.IsNullOrWhiteSpace(configuration.ConfigCommand.Name)) + { + throw new ApplicationException("When specifying the subcommand '{0}', you must also specify --name by option or position.".FormatWith(configuration.ConfigCommand.Command.ToStringSafe().ToLower())); + } + + if (configuration.ConfigCommand.Command == ConfigCommandType.Set && string.IsNullOrWhiteSpace(configuration.ConfigCommand.ConfigValue)) + { + throw new ApplicationException("When specifying the subcommand '{0}', you must also specify --value by option or position.".FormatWith(configuration.ConfigCommand.Command.ToStringSafe().ToLower())); + } } public virtual void HelpMessage(ChocolateyConfiguration configuration) @@ -124,12 +138,17 @@ Exit codes that normally result from running this command. Normal: - 0: operation was successful, no issues detected - -1 or 1: an error has occurred + - 2: nothing to do, config already set/unset (enhanced) + +NOTE: Starting in v2.3.0, if you have the feature '{0}' + turned on, then choco will provide enhanced exit codes that allow + better integration and scripting. If you find other exit codes that we have not yet documented, please file a ticket so we can document it at https://github.com/chocolatey/choco/issues/new/choose. -"); +".FormatWith(ApplicationParameters.Features.UseEnhancedExitCodes)); "chocolatey".Log().Info(ChocolateyLoggers.Important, "See It In Action"); "chocolatey".Log().Info(@" @@ -167,12 +186,15 @@ public virtual void Run(ChocolateyConfiguration configuration) public virtual bool MayRequireAdminAccess() { var config = Config.GetConfigurationSettings(); - if (config == null) return true; + if (config == null) + { + return true; + } return config.ConfigCommand.Command != ConfigCommandType.List; } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public virtual void configure_argument_parser(OptionSet optionSet, ChocolateyConfiguration configuration) => ConfigureArgumentParser(optionSet, configuration); @@ -200,6 +222,6 @@ public virtual void run(ChocolateyConfiguration configuration) [Obsolete("This overload is deprecated and will be removed in v3.")] public virtual bool may_require_admin_access() => MayRequireAdminAccess(); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/commands/ChocolateyExportCommand.cs b/src/chocolatey/infrastructure.app/commands/ChocolateyExportCommand.cs index ce8fd569a5..11f956a1f6 100644 --- a/src/chocolatey/infrastructure.app/commands/ChocolateyExportCommand.cs +++ b/src/chocolatey/infrastructure.app/commands/ChocolateyExportCommand.cs @@ -14,23 +14,23 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Text; +using System.Xml; +using chocolatey.infrastructure.app.attributes; +using chocolatey.infrastructure.commandline; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.filesystem; +using chocolatey.infrastructure.commands; +using chocolatey.infrastructure.logging; +using chocolatey.infrastructure.app.services; +using chocolatey.infrastructure.tolerance; + namespace chocolatey.infrastructure.app.commands { - using System; - using System.Collections.Generic; - using System.Diagnostics; - using System.IO; - using System.Text; - using System.Xml; - using attributes; - using commandline; - using configuration; - using filesystem; - using infrastructure.commands; - using logging; - using services; - using tolerance; - [CommandFor("export", "exports list of currently installed packages")] public class ChocolateyExportCommand : ICommand { @@ -59,7 +59,7 @@ public void ParseAdditionalArguments(IList unparsedArguments, Chocolatey { configuration.Input = string.Join(" ", unparsedArguments); - if (string.IsNullOrWhiteSpace(configuration.ExportCommand.OutputFilePath) && unparsedArguments.Count >=1) + if (string.IsNullOrWhiteSpace(configuration.ExportCommand.OutputFilePath) && unparsedArguments.Count >= 1) { configuration.ExportCommand.OutputFilePath = unparsedArguments[0]; } @@ -195,7 +195,7 @@ public void Run(ChocolateyConfiguration configuration) ); } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public virtual void configure_argument_parser(OptionSet optionSet, ChocolateyConfiguration configuration) => ConfigureArgumentParser(optionSet, configuration); @@ -223,6 +223,6 @@ public virtual void run(ChocolateyConfiguration configuration) [Obsolete("This overload is deprecated and will be removed in v3.")] public virtual bool may_require_admin_access() => MayRequireAdminAccess(); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/commands/ChocolateyFeatureCommand.cs b/src/chocolatey/infrastructure.app/commands/ChocolateyFeatureCommand.cs index 968e161661..e1da018479 100644 --- a/src/chocolatey/infrastructure.app/commands/ChocolateyFeatureCommand.cs +++ b/src/chocolatey/infrastructure.app/commands/ChocolateyFeatureCommand.cs @@ -14,20 +14,20 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Linq; +using chocolatey.infrastructure.app.attributes; +using chocolatey.infrastructure.commandline; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.domain; +using chocolatey.infrastructure.commands; +using chocolatey.infrastructure.configuration; +using chocolatey.infrastructure.logging; +using chocolatey.infrastructure.app.services; + namespace chocolatey.infrastructure.app.commands { - using System; - using System.Collections.Generic; - using System.Linq; - using attributes; - using commandline; - using configuration; - using domain; - using infrastructure.commands; - using infrastructure.configuration; - using logging; - using services; - [CommandFor("feature", "view and configure choco features")] [CommandFor("features", "view and configure choco features (alias for feature)")] public class ChocolateyFeatureCommand : ICommand @@ -55,11 +55,15 @@ public virtual void ParseAdditionalArguments(IList unparsedArguments, Ch configuration.Input = string.Join(" ", unparsedArguments); var command = FeatureCommandType.Unknown; - string unparsedCommand = unparsedArguments.DefaultIfEmpty(string.Empty).FirstOrDefault(); + var unparsedCommand = unparsedArguments.DefaultIfEmpty(string.Empty).FirstOrDefault(); Enum.TryParse(unparsedCommand, true, out command); if (command == FeatureCommandType.Unknown) { - if (!string.IsNullOrWhiteSpace(unparsedCommand)) this.Log().Warn("Unknown command {0}. Setting to list.".FormatWith(unparsedCommand)); + if (!string.IsNullOrWhiteSpace(unparsedCommand)) + { + this.Log().Warn("Unknown command {0}. Setting to list.".FormatWith(unparsedCommand)); + } + command = FeatureCommandType.List; } @@ -70,7 +74,7 @@ public virtual void ParseAdditionalArguments(IList unparsedArguments, Ch ) && unparsedArguments.Count > 1) { - throw new ApplicationException("A single features command must be listed. Please see the help menu for those commands"); + throw new ApplicationException("A single feature command must be listed. Please see the help menu for those commands."); } if (string.IsNullOrWhiteSpace(configuration.FeatureCommand.Name) && unparsedArguments.Count >= 2) @@ -120,12 +124,17 @@ Exit codes that normally result from running this command. Normal: - 0: operation was successful, no issues detected - -1 or 1: an error has occurred + - 2: nothing to do, feature already set (enhanced) + +NOTE: Starting in v2.3.0, if you have the feature '{0}' + turned on, then choco will provide enhanced exit codes that allow + better integration and scripting. If you find other exit codes that we have not yet documented, please file a ticket so we can document it at https://github.com/chocolatey/choco/issues/new/choose. -"); +".FormatWith(ApplicationParameters.Features.UseEnhancedExitCodes)); "chocolatey".Log().Info(ChocolateyLoggers.Important, "Options and Switches"); } @@ -157,12 +166,15 @@ public virtual void Run(ChocolateyConfiguration configuration) public virtual bool MayRequireAdminAccess() { var config = Config.GetConfigurationSettings(); - if (config == null) return true; + if (config == null) + { + return true; + } return config.FeatureCommand.Command != FeatureCommandType.List; } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public virtual void configure_argument_parser(OptionSet optionSet, ChocolateyConfiguration configuration) => ConfigureArgumentParser(optionSet, configuration); @@ -190,6 +202,6 @@ public virtual void run(ChocolateyConfiguration configuration) [Obsolete("This overload is deprecated and will be removed in v3.")] public virtual bool may_require_admin_access() => MayRequireAdminAccess(); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/commands/ChocolateyHelpCommand.cs b/src/chocolatey/infrastructure.app/commands/ChocolateyHelpCommand.cs index 221665768d..19b8f3f2a7 100644 --- a/src/chocolatey/infrastructure.app/commands/ChocolateyHelpCommand.cs +++ b/src/chocolatey/infrastructure.app/commands/ChocolateyHelpCommand.cs @@ -14,19 +14,19 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using chocolatey.infrastructure.app.attributes; +using chocolatey.infrastructure.commandline; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.commands; +using chocolatey.infrastructure.logging; +using SimpleInjector; + namespace chocolatey.infrastructure.app.commands { - using System; - using System.Collections.Generic; - using System.Linq; - using System.Text; - using attributes; - using commandline; - using configuration; - using infrastructure.commands; - using logging; - using SimpleInjector; - [CommandFor("help", "displays top level help information for choco")] public class ChocolateyHelpCommand : ICommand { @@ -266,7 +266,7 @@ everywhere they are used and with newer versions of Chocolatey. "chocolatey".Log().Info(ChocolateyLoggers.Important, "Default Options and Switches"); } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public virtual void configure_argument_parser(OptionSet optionSet, ChocolateyConfiguration configuration) => ConfigureArgumentParser(optionSet, configuration); @@ -294,6 +294,6 @@ public virtual void run(ChocolateyConfiguration configuration) [Obsolete("This overload is deprecated and will be removed in v3.")] public virtual bool may_require_admin_access() => MayRequireAdminAccess(); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/commands/ChocolateyInfoCommand.cs b/src/chocolatey/infrastructure.app/commands/ChocolateyInfoCommand.cs index cc32c98d74..ea4b44c90d 100644 --- a/src/chocolatey/infrastructure.app/commands/ChocolateyInfoCommand.cs +++ b/src/chocolatey/infrastructure.app/commands/ChocolateyInfoCommand.cs @@ -14,16 +14,16 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using chocolatey.infrastructure.app.attributes; +using chocolatey.infrastructure.commandline; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.logging; +using chocolatey.infrastructure.app.services; + namespace chocolatey.infrastructure.app.commands { - using System; - using System.Collections.Generic; - using attributes; - using commandline; - using configuration; - using logging; - using services; - [CommandFor("info", "retrieves package information. Shorthand for choco search pkgname --exact --verbose")] public class ChocolateyInfoCommand : ChocolateySearchCommand { @@ -74,6 +74,9 @@ public override void ConfigureArgumentParser(OptionSet optionSet, ChocolateyConf configuration.Features.UsePackageRepositoryOptimizations = false; } }) + .Add("include-configured-sources", + "Include Configured Sources - When using the '--source' option, this appends the sources that have been saved into the chocolatey.config file by 'source' command. Available in 2.3.0+", + option => configuration.IncludeConfiguredSources = option != null) ; } diff --git a/src/chocolatey/infrastructure.app/commands/ChocolateyInstallCommand.cs b/src/chocolatey/infrastructure.app/commands/ChocolateyInstallCommand.cs index 78f78b9787..45bf7cf207 100644 --- a/src/chocolatey/infrastructure.app/commands/ChocolateyInstallCommand.cs +++ b/src/chocolatey/infrastructure.app/commands/ChocolateyInstallCommand.cs @@ -14,18 +14,18 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Linq; +using chocolatey.infrastructure.app.attributes; +using chocolatey.infrastructure.commandline; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.commands; +using chocolatey.infrastructure.logging; +using chocolatey.infrastructure.app.services; + namespace chocolatey.infrastructure.app.commands { - using System; - using System.Collections.Generic; - using System.Linq; - using attributes; - using commandline; - using configuration; - using infrastructure.commands; - using logging; - using services; - [CommandFor("install", "installs packages using configured sources")] public class ChocolateyInstallCommand : ChocolateyCommandBase, ICommand { @@ -109,19 +109,28 @@ public virtual void ConfigureArgumentParser(OptionSet optionSet, ChocolateyConfi "IgnoreChecksums - Ignore checksums provided by the package. Overrides the default feature '{0}' set to '{1}'.".FormatWith(ApplicationParameters.Features.ChecksumFiles, configuration.Features.ChecksumFiles.ToStringSafe()), option => { - if (option != null) configuration.Features.ChecksumFiles = false; + if (option != null) + { + configuration.Features.ChecksumFiles = false; + } }) .Add("allowemptychecksum|allowemptychecksums|allow-empty-checksums", "Allow Empty Checksums - Allow packages to have empty/missing checksums for downloaded resources from non-secure locations (HTTP, FTP). Use this switch is not recommended if using sources that download resources from the internet. Overrides the default feature '{0}' set to '{1}'.".FormatWith(ApplicationParameters.Features.AllowEmptyChecksums, configuration.Features.AllowEmptyChecksums.ToStringSafe()), option => { - if (option != null) configuration.Features.AllowEmptyChecksums = true; + if (option != null) + { + configuration.Features.AllowEmptyChecksums = true; + } }) .Add("allowemptychecksumsecure|allowemptychecksumssecure|allow-empty-checksums-secure", "Allow Empty Checksums Secure - Allow packages to have empty checksums for downloaded resources from secure locations (HTTPS). Overrides the default feature '{0}' set to '{1}'.".FormatWith(ApplicationParameters.Features.AllowEmptyChecksumsSecure, configuration.Features.AllowEmptyChecksumsSecure.ToStringSafe()), option => { - if (option != null) configuration.Features.AllowEmptyChecksumsSecure = true; + if (option != null) + { + configuration.Features.AllowEmptyChecksumsSecure = true; + } }) .Add("requirechecksum|requirechecksums|require-checksums", "Require Checksums - Requires packages to have checksums for downloaded resources (both non-secure and secure). Overrides the default feature '{0}' set to '{1}' and '{2}' set to '{3}'.".FormatWith(ApplicationParameters.Features.AllowEmptyChecksums, configuration.Features.AllowEmptyChecksums.ToStringSafe(), ApplicationParameters.Features.AllowEmptyChecksumsSecure, configuration.Features.AllowEmptyChecksumsSecure.ToStringSafe()), @@ -196,6 +205,10 @@ public virtual void ConfigureArgumentParser(OptionSet optionSet, ChocolateyConfi "Skip hooks - Do not run hook scripts. Available in 1.2.0+", option => configuration.SkipHookScripts = option != null ) + .Add("include-configured-sources", + "Include Configured Sources - When using the '--source' option, this appends the sources that have been saved into the chocolatey.config file by 'source' command. Available in 2.3.0+", + option => configuration.IncludeConfiguredSources = option != null + ) ; //todo: #770 package name can be a url / installertype @@ -266,10 +279,6 @@ Installs a package or a list of packages (sometimes specified as a "chocolatey".Log().Info(@" choco install [ ] [] -NOTE: `all` is a special package keyword that will allow you to install - all packages from a custom feed. Will not work with Chocolatey default - feed. THIS IS NOT YET REIMPLEMENTED. - NOTE: Any package name ending with .config is considered a 'packages.config' file. Please see https://ch0.co/packages_config @@ -305,6 +314,11 @@ choco install nodejs.install --version 0.10.35 choco install choco install +NOTE: `all` is a special package keyword that will allow you to install + all packages available on a source. This keyword is not available for + public repositories like the Chocolatey Community Repository, and is + intended to be used with internal package sources only. + NOTE: See scripting in the command reference (`choco -?`) for how to write proper scripts and integrations. @@ -431,7 +445,7 @@ public virtual bool MayRequireAdminAccess() return true; } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public virtual void configure_argument_parser(OptionSet optionSet, ChocolateyConfiguration configuration) => ConfigureArgumentParser(optionSet, configuration); @@ -459,6 +473,6 @@ public virtual void run(ChocolateyConfiguration configuration) [Obsolete("This overload is deprecated and will be removed in v3.")] public virtual bool may_require_admin_access() => MayRequireAdminAccess(); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/commands/ChocolateyListCommand.cs b/src/chocolatey/infrastructure.app/commands/ChocolateyListCommand.cs index 9e37dd568b..ff65fa62b6 100644 --- a/src/chocolatey/infrastructure.app/commands/ChocolateyListCommand.cs +++ b/src/chocolatey/infrastructure.app/commands/ChocolateyListCommand.cs @@ -13,20 +13,20 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Linq; +using chocolatey.infrastructure.app.attributes; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.domain; +using chocolatey.infrastructure.app.services; +using chocolatey.infrastructure.commandline; +using chocolatey.infrastructure.commands; +using chocolatey.infrastructure.logging; +using chocolatey.infrastructure.results; + namespace chocolatey.infrastructure.app.commands { - using System; - using System.Collections.Generic; - using System.Linq; - using chocolatey.infrastructure.app.attributes; - using chocolatey.infrastructure.app.configuration; - using chocolatey.infrastructure.app.domain; - using chocolatey.infrastructure.app.services; - using chocolatey.infrastructure.commandline; - using chocolatey.infrastructure.commands; - using chocolatey.infrastructure.logging; - using chocolatey.infrastructure.results; - [CommandFor("list", "lists local packages")] public class ChocolateyListCommand : IListCommand { @@ -95,7 +95,7 @@ public virtual void ConfigureArgumentParser(OptionSet optionSet, ChocolateyConfi "Prerelease - Include Prereleases? Defaults to false.", option => configuration.Prerelease = option != null) .Add("i|includeprograms|include-programs", - "IncludePrograms - Filters out apps Chocolatey has listed as packages and includes those in the list. Defaults to false.", + "IncludePrograms - Includes software from Programs and Features not being managed by Chocolatey CLI.", option => configuration.ListCommand.IncludeRegistryPrograms = option != null) .Add("version=", "Version - Specific version of a package to return.", @@ -151,8 +151,8 @@ public virtual void ParseAdditionalArguments(IList unparsedArguments, Ch foreach (var argument in unparsedArguments) { - bool isUnsupportedArgument = _unsupportedArguments.Contains(argument, StringComparer.OrdinalIgnoreCase); - bool isUnsupportedRegistryProgramsArgument = _unsupportedIncludeRegistryProgramsArguments.Contains(argument, StringComparer.OrdinalIgnoreCase); + var isUnsupportedArgument = _unsupportedArguments.Contains(argument, StringComparer.OrdinalIgnoreCase); + var isUnsupportedRegistryProgramsArgument = _unsupportedIncludeRegistryProgramsArguments.Contains(argument, StringComparer.OrdinalIgnoreCase); if (isUnsupportedArgument || isUnsupportedRegistryProgramsArgument) { @@ -252,7 +252,7 @@ public virtual void Run(ChocolateyConfiguration config) { // Would have liked to have done this in the Validate method, but can't, since the SourceType // hasn't yet been set, since the sources have not yet been parsed. - if (config.ListCommand.ExplicitSource && config.SourceType == SourceTypes.Normal) + if (config.ListCommand.ExplicitSource && config.SourceType == SourceTypes.Normal) { throw new ApplicationException("When using the '--source' option with the 'choco list' command, only a named alternative source can be provided."); } @@ -269,7 +269,7 @@ public virtual void Run(ChocolateyConfiguration config) } } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public virtual void configure_argument_parser(OptionSet optionSet, ChocolateyConfiguration configuration) => ConfigureArgumentParser(optionSet, configuration); @@ -305,6 +305,6 @@ public virtual int count(ChocolateyConfiguration config) [Obsolete("This overload is deprecated and will be removed in v3.")] public virtual IEnumerable list(ChocolateyConfiguration config) => List(config); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/commands/ChocolateyNewCommand.cs b/src/chocolatey/infrastructure.app/commands/ChocolateyNewCommand.cs index 859f51affe..4ad5280caa 100644 --- a/src/chocolatey/infrastructure.app/commands/ChocolateyNewCommand.cs +++ b/src/chocolatey/infrastructure.app/commands/ChocolateyNewCommand.cs @@ -14,19 +14,19 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Linq; +using chocolatey.infrastructure.app.attributes; +using chocolatey.infrastructure.commandline; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.commands; +using chocolatey.infrastructure.logging; +using chocolatey.infrastructure.app.services; +using chocolatey.infrastructure.app.templates; + namespace chocolatey.infrastructure.app.commands { - using System; - using System.Collections.Generic; - using System.Linq; - using attributes; - using commandline; - using configuration; - using infrastructure.commands; - using logging; - using services; - using templates; - [CommandFor("new", "creates template files for creating a new Chocolatey package")] public class ChocolateyNewCommand : ICommand { @@ -75,7 +75,7 @@ public virtual void ParseAdditionalArguments(IList unparsedArguments, Ch if (string.IsNullOrWhiteSpace(configuration.NewCommand.Name)) { configuration.NewCommand.Name = unparsedArguments.DefaultIfEmpty(string.Empty).FirstOrDefault(arg => !arg.StartsWith("-") && !arg.ContainsSafe("=")); - var property = unparsedArguments.DefaultIfEmpty(string.Empty).FirstOrDefault().Split(new[] {'='}, StringSplitOptions.RemoveEmptyEntries); + var property = unparsedArguments.DefaultIfEmpty(string.Empty).FirstOrDefault().Split(new[] { '=' }, StringSplitOptions.RemoveEmptyEntries); if (property.Length == 1) { configuration.NewCommand.TemplateProperties.Add(TemplateValues.NamePropertyName, configuration.NewCommand.Name); @@ -193,7 +193,7 @@ public virtual bool MayRequireAdminAccess() return false; } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public virtual void configure_argument_parser(OptionSet optionSet, ChocolateyConfiguration configuration) => ConfigureArgumentParser(optionSet, configuration); @@ -221,6 +221,6 @@ public virtual void run(ChocolateyConfiguration configuration) [Obsolete("This overload is deprecated and will be removed in v3.")] public virtual bool may_require_admin_access() => MayRequireAdminAccess(); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/commands/ChocolateyOutdatedCommand.cs b/src/chocolatey/infrastructure.app/commands/ChocolateyOutdatedCommand.cs index af63ffed56..aff0f25614 100644 --- a/src/chocolatey/infrastructure.app/commands/ChocolateyOutdatedCommand.cs +++ b/src/chocolatey/infrastructure.app/commands/ChocolateyOutdatedCommand.cs @@ -14,17 +14,17 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using chocolatey.infrastructure.app.attributes; +using chocolatey.infrastructure.commandline; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.commands; +using chocolatey.infrastructure.logging; +using chocolatey.infrastructure.app.services; + namespace chocolatey.infrastructure.app.commands { - using System; - using System.Collections.Generic; - using attributes; - using commandline; - using configuration; - using infrastructure.commands; - using logging; - using services; - [CommandFor("outdated", "retrieves information about packages that are outdated. Similar to upgrade all --noop")] public class ChocolateyOutdatedCommand : ICommand { @@ -72,6 +72,9 @@ public virtual void ConfigureArgumentParser(OptionSet optionSet, ChocolateyConfi configuration.Features.UsePackageRepositoryOptimizations = false; } }) + .Add("include-configured-sources", + "Include Configured Sources - When using the '--source' option, this appends the sources that have been saved into the chocolatey.config file by 'source' command. Available in 2.3.0+", + option => configuration.IncludeConfiguredSources = option != null) ; } @@ -130,7 +133,7 @@ Exit codes that normally result from running this command. Enhanced: - 0: no outdated packages - -1 or 1: an error has occurred - - 2: outdated packages have been found + - 2: outdated packages have been found (enhanced) NOTE: If you have the feature '{0}' turned on, then choco will provide enhanced exit codes that allow @@ -166,7 +169,7 @@ public virtual bool MayRequireAdminAccess() return false; } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public virtual void configure_argument_parser(OptionSet optionSet, ChocolateyConfiguration configuration) => ConfigureArgumentParser(optionSet, configuration); @@ -194,6 +197,6 @@ public virtual void run(ChocolateyConfiguration configuration) [Obsolete("This overload is deprecated and will be removed in v3.")] public virtual bool may_require_admin_access() => MayRequireAdminAccess(); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/commands/ChocolateyPackCommand.cs b/src/chocolatey/infrastructure.app/commands/ChocolateyPackCommand.cs index 1236b00f91..29fcf05ae8 100644 --- a/src/chocolatey/infrastructure.app/commands/ChocolateyPackCommand.cs +++ b/src/chocolatey/infrastructure.app/commands/ChocolateyPackCommand.cs @@ -14,18 +14,18 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Linq; +using chocolatey.infrastructure.app.attributes; +using chocolatey.infrastructure.commandline; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.commands; +using chocolatey.infrastructure.logging; +using chocolatey.infrastructure.app.services; + namespace chocolatey.infrastructure.app.commands { - using System; - using System.Collections.Generic; - using System.Linq; - using attributes; - using commandline; - using configuration; - using infrastructure.commands; - using logging; - using services; - [CommandFor("pack", "packages nuspec, scripts, and other Chocolatey package resources into a nupkg file")] public class ChocolateyPackCommand : ICommand { @@ -136,7 +136,7 @@ public virtual bool MayRequireAdminAccess() return false; } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public virtual void configure_argument_parser(OptionSet optionSet, ChocolateyConfiguration configuration) => ConfigureArgumentParser(optionSet, configuration); @@ -164,6 +164,6 @@ public virtual void run(ChocolateyConfiguration configuration) [Obsolete("This overload is deprecated and will be removed in v3.")] public virtual bool may_require_admin_access() => MayRequireAdminAccess(); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/commands/ChocolateyPinCommand.cs b/src/chocolatey/infrastructure.app/commands/ChocolateyPinCommand.cs index ef4ebe3d36..81e0809b5d 100644 --- a/src/chocolatey/infrastructure.app/commands/ChocolateyPinCommand.cs +++ b/src/chocolatey/infrastructure.app/commands/ChocolateyPinCommand.cs @@ -14,24 +14,24 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Linq; +using chocolatey.infrastructure.app.attributes; +using chocolatey.infrastructure.commandline; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.domain; +using chocolatey.infrastructure.commands; +using chocolatey.infrastructure.configuration; +using chocolatey.infrastructure.logging; +using chocolatey.infrastructure.app.nuget; +using NuGet.Common; +using NuGet.PackageManagement; +using NuGet.Versioning; +using chocolatey.infrastructure.app.services; + namespace chocolatey.infrastructure.app.commands { - using System; - using System.Collections.Generic; - using System.Linq; - using attributes; - using commandline; - using configuration; - using domain; - using infrastructure.commands; - using infrastructure.configuration; - using logging; - using nuget; - using NuGet.Common; - using NuGet.PackageManagement; - using NuGet.Versioning; - using services; - [CommandFor("pin", "suppress upgrades for a package")] public class ChocolateyPinCommand : ICommand { @@ -69,12 +69,16 @@ public virtual void ParseAdditionalArguments(IList unparsedArguments, Ch } var command = PinCommandType.Unknown; - string unparsedCommand = unparsedArguments.DefaultIfEmpty(string.Empty).FirstOrDefault(); + var unparsedCommand = unparsedArguments.DefaultIfEmpty(string.Empty).FirstOrDefault(); Enum.TryParse(unparsedCommand, true, out command); if (command == PinCommandType.Unknown) { - if (!string.IsNullOrWhiteSpace(unparsedCommand)) this.Log().Warn("Unknown command {0}. Setting to list.".FormatWith(unparsedCommand)); + if (!string.IsNullOrWhiteSpace(unparsedCommand)) + { + this.Log().Warn("Unknown command {0}. Setting to list.".FormatWith(unparsedCommand)); + } + command = PinCommandType.List; } @@ -130,12 +134,17 @@ Exit codes that normally result from running this command. Normal: - 0: operation was successful, no issues detected - -1 or 1: an error has occurred + - 2: nothing to do (enhanced) + +NOTE: Starting in v2.3.0, if you have the feature '{0}' + turned on, then choco will provide enhanced exit codes that allow + better integration and scripting. If you find other exit codes that we have not yet documented, please file a ticket so we can document it at https://github.com/chocolatey/choco/issues/new/choose. -"); +".FormatWith(ApplicationParameters.Features.UseEnhancedExitCodes)); "chocolatey".Log().Info(ChocolateyLoggers.Important, "Options and Switches"); } @@ -206,7 +215,7 @@ public virtual void SetPin(ChocolateyConfiguration config) var pkgInfo = _packageInfoService.Get(installedPackage.PackageMetadata); - bool changeMessage = pkgInfo.IsPinned != addingAPin; + var changeMessage = pkgInfo.IsPinned != addingAPin; pkgInfo.IsPinned = addingAPin; _packageInfoService.Save(pkgInfo); @@ -218,18 +227,26 @@ public virtual void SetPin(ChocolateyConfiguration config) else { this.Log().Warn(NoChangeMessage); + + if (config.Features.UseEnhancedExitCodes && Environment.ExitCode == 0) + { + Environment.ExitCode = 2; + } } } public virtual bool MayRequireAdminAccess() { var config = Config.GetConfigurationSettings(); - if (config == null) return true; + if (config == null) + { + return true; + } return config.PinCommand.Command != PinCommandType.List; } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public virtual void configure_argument_parser(OptionSet optionSet, ChocolateyConfiguration configuration) => ConfigureArgumentParser(optionSet, configuration); @@ -257,6 +274,6 @@ public virtual void run(ChocolateyConfiguration configuration) [Obsolete("This overload is deprecated and will be removed in v3.")] public virtual bool may_require_admin_access() => MayRequireAdminAccess(); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/commands/ChocolateyPushCommand.cs b/src/chocolatey/infrastructure.app/commands/ChocolateyPushCommand.cs index 390b1cd877..91c6512320 100644 --- a/src/chocolatey/infrastructure.app/commands/ChocolateyPushCommand.cs +++ b/src/chocolatey/infrastructure.app/commands/ChocolateyPushCommand.cs @@ -14,18 +14,18 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Linq; +using chocolatey.infrastructure.app.attributes; +using chocolatey.infrastructure.commandline; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.commands; +using chocolatey.infrastructure.logging; +using chocolatey.infrastructure.app.services; + namespace chocolatey.infrastructure.app.commands { - using System; - using System.Collections.Generic; - using System.Linq; - using attributes; - using commandline; - using configuration; - using infrastructure.commands; - using logging; - using services; - [CommandFor("push", "pushes a compiled nupkg to a source")] public class ChocolateyPushCommand : ICommand { @@ -98,7 +98,7 @@ public virtual void Validate(ChocolateyConfiguration configuration) { if (remoteSource.Scheme == "http" && remoteSource.Host != "localhost") { - string errorMessage = + var errorMessage = @"WARNING! The specified source '{0}' is not secure. Sending apikey over insecure channels leaves your data susceptible to hackers. Please update your source to a more secure source and try again. @@ -194,7 +194,7 @@ public virtual bool MayRequireAdminAccess() return false; } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public virtual void configure_argument_parser(OptionSet optionSet, ChocolateyConfiguration configuration) => ConfigureArgumentParser(optionSet, configuration); @@ -222,6 +222,6 @@ public virtual void run(ChocolateyConfiguration configuration) [Obsolete("This overload is deprecated and will be removed in v3.")] public virtual bool may_require_admin_access() => MayRequireAdminAccess(); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/commands/ChocolateyRuleCommand.cs b/src/chocolatey/infrastructure.app/commands/ChocolateyRuleCommand.cs new file mode 100644 index 0000000000..a8b94e2cd1 --- /dev/null +++ b/src/chocolatey/infrastructure.app/commands/ChocolateyRuleCommand.cs @@ -0,0 +1,233 @@ +// Copyright © 2017 - 2024 Chocolatey Software, Inc +// Copyright © 2011 - 2017 RealDimensions Software, LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +using System; +using System.Collections.Generic; +using System.Linq; +using chocolatey.infrastructure.app.attributes; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.commandline; +using chocolatey.infrastructure.commands; +using chocolatey.infrastructure.logging; +using chocolatey.infrastructure.rules; +using chocolatey.infrastructure.services; + +namespace chocolatey.infrastructure.app.commands +{ + [CommandFor("rule", "view or list implemented package rules", Version = "2.3.0")] + public class ChocolateyRuleCommand : ChocolateyCommandBase, ICommand + { + private readonly IRuleService _ruleService; + + public ChocolateyRuleCommand(IRuleService ruleService) + { + _ruleService = ruleService ?? throw new ArgumentNullException(nameof(ruleService)); + } + + public virtual void ConfigureArgumentParser(OptionSet optionSet, ChocolateyConfiguration configuration) + { + optionSet + .Add("n=|name=", + "Name - the name of the rule to show more details about. Required with actions other than list. Defaults to empty.", + option => configuration.RuleCommand.Name = option); + } + + public virtual void DryRun(ChocolateyConfiguration configuration) + { + Run(configuration); + } + + public virtual bool MayRequireAdminAccess() + { + return false; + } + + public virtual void ParseAdditionalArguments(IList unparsedArguments, ChocolateyConfiguration configuration) + { + configuration.Input = string.Join(" ", unparsedArguments); + + var command = unparsedArguments.DefaultIfEmpty().Select(a => a.ToLowerSafe()).FirstOrDefault(); + + if (string.IsNullOrEmpty(command)) + { + command = "list"; + } + + configuration.RuleCommand.Command = command; + + if (string.IsNullOrEmpty(configuration.RuleCommand.Name) && unparsedArguments.Count >= 2) + { + configuration.RuleCommand.Name = unparsedArguments[1]; + } + } + + public virtual void Run(ChocolateyConfiguration config) + { + IEnumerable implementedRules = _ruleService.GetAllAvailableRules().OrderBy(r => r.Id); + + if (!string.IsNullOrEmpty(config.RuleCommand.Name)) + { + var foundRule = implementedRules.FirstOrDefault(i => i.Id.IsEqualTo(config.RuleCommand.Name)); + + // Since the return value is a structure, it will never be null. + // As such we check that the identifier is not empty. + if (config.RegularOutput) + { + if (string.IsNullOrEmpty(foundRule.Id)) + { + throw new ApplicationException("No rule with the name {0} could be found.".FormatWith(config.RuleCommand.Name)); + } + + // Not using multiline logging here, as it causes issues + // with unit tests. + this.Log().Info("Name: {0} | Severity: {1}", foundRule.Id, foundRule.Severity); + this.Log().Info("Summary: {0}", foundRule.Summary); + this.Log().Info("Help URL: {0}", foundRule.HelpUrl); + + return; + } + else if (!string.IsNullOrEmpty(foundRule.Id)) + { + implementedRules = new[] { foundRule }; + } + else + { + return; + } + } + + if (config.RegularOutput) + { + this.Log().Info(ChocolateyLoggers.Important, "Implemented Package Rules"); + } + + OutputRules("Error/Required", config, implementedRules.Where(r => r.Severity == RuleType.Error).ToList()); + OutputRules("Warning/Guideline", config, implementedRules.Where(r => r.Severity == RuleType.Warning).ToList()); + OutputRules("Information/Suggestion", config, implementedRules.Where(r => r.Severity == RuleType.Information).ToList()); + OutputRules("Note", config, implementedRules.Where(r => r.Severity == RuleType.Note).ToList()); + OutputRules("Disabled", config, implementedRules.Where(r => r.Severity == RuleType.None).ToList()); + } + + public virtual void Validate(ChocolateyConfiguration configuration) + { + switch (configuration.RuleCommand.Command) + { + case "list": + if (!string.IsNullOrEmpty(configuration.RuleCommand.Name)) + { + throw new ApplicationException("A Rule Name (-n|--name) should not be specified when listing all validation rules."); + } + break; + case "get": + if (string.IsNullOrEmpty(configuration.RuleCommand.Name)) + { + throw new ApplicationException("A Rule Name (-n|--name) is required when getting information for a specific rule."); + } + break; + + default: + this.Log().Warn("Unknown command '{0}'. Setting to list.", configuration.RuleCommand.Command); + configuration.RuleCommand.Command = "list"; + Validate(configuration); + break; + } + } + + protected override string GetCommandDescription(CommandForAttribute attribute, ChocolateyConfiguration configuration) + { + return @"Retrieve information about what rule validations are implemented by Chocolatey CLI."; + } + + protected override IEnumerable GetCommandExamples(CommandForAttribute[] attributes, ChocolateyConfiguration configuration) + { + return new[] + { + "choco rule", + "choco rule list", + "choco rule get --name CHCR0002" + }; + } + + protected override IEnumerable GetCommandUsage(CommandForAttribute[] attributes, ChocolateyConfiguration configuration) + { + return new[] + { + "choco rule [list]|get [options/switches]", + }; + } + + protected virtual void OutputRules(string type, ChocolateyConfiguration config, IReadOnlyList rules) + { + if (config.RegularOutput) + { + this.Log().Info(""); + this.Log().Info(ChocolateyLoggers.Important, type + " Rules"); + this.Log().Info(""); + + if (rules.Count == 0) + { + this.Log().Info("No implemented " + type + " rules available."); + + return; + } + } + + foreach (var rule in rules) + { + if (config.RegularOutput) + { + this.Log().Info("{0}: {1}", rule.Id, rule.Summary); + } + else + { + this.Log().Info("{0}|{1}|{2}|{3}", rule.Severity, rule.Id, rule.Summary, rule.HelpUrl); + } + } + } + +#pragma warning disable IDE0022, IDE1006 + + [Obsolete("This overload is deprecated and will be removed in v3.")] + public virtual void configure_argument_parser(OptionSet optionSet, ChocolateyConfiguration configuration) + => ConfigureArgumentParser(optionSet, configuration); + + [Obsolete("This overload is deprecated and will be removed in v3.")] + public virtual void handle_additional_argument_parsing(IList unparsedArguments, ChocolateyConfiguration configuration) + => ParseAdditionalArguments(unparsedArguments, configuration); + + [Obsolete("This overload is deprecated and will be removed in v3.")] + public virtual void handle_validation(ChocolateyConfiguration configuration) + => Validate(configuration); + + [Obsolete("This overload is deprecated and will be removed in v3.")] + public virtual void help_message(ChocolateyConfiguration configuration) + => HelpMessage(configuration); + + [Obsolete("This overload is deprecated and will be removed in v3.")] + public virtual bool may_require_admin_access() + => MayRequireAdminAccess(); + + [Obsolete("This overload is deprecated and will be removed in v3.")] + public virtual void noop(ChocolateyConfiguration configuration) + => DryRun(configuration); + + [Obsolete("This overload is deprecated and will be removed in v3.")] + public virtual void run(ChocolateyConfiguration configuration) + => Run(configuration); + +#pragma warning restore IDE0022, IDE1006 + } +} diff --git a/src/chocolatey/infrastructure.app/commands/ChocolateySearchCommand.cs b/src/chocolatey/infrastructure.app/commands/ChocolateySearchCommand.cs index 28c3368a73..2bf9d85959 100644 --- a/src/chocolatey/infrastructure.app/commands/ChocolateySearchCommand.cs +++ b/src/chocolatey/infrastructure.app/commands/ChocolateySearchCommand.cs @@ -14,19 +14,19 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Linq; +using chocolatey.infrastructure.app.attributes; +using chocolatey.infrastructure.commandline; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.commands; +using chocolatey.infrastructure.logging; +using chocolatey.infrastructure.results; +using chocolatey.infrastructure.app.services; + namespace chocolatey.infrastructure.app.commands { - using System; - using System.Collections.Generic; - using System.Linq; - using attributes; - using commandline; - using configuration; - using infrastructure.commands; - using logging; - using results; - using services; - [CommandFor("search", "searches remote packages")] [CommandFor("find", "searches remote packages (alias for search)")] public class ChocolateySearchCommand : IListCommand @@ -129,6 +129,9 @@ public virtual void ConfigureArgumentParser(OptionSet optionSet, ChocolateyConfi configuration.Features.UsePackageRepositoryOptimizations = false; } }) + .Add("include-configured-sources", + "Include Configured Sources - When using the '--source' option, this appends the sources that have been saved into the chocolatey.config file by 'source' command. Available in 2.3.0+", + option => configuration.IncludeConfiguredSources = option != null) ; } @@ -209,7 +212,6 @@ file a ticket so we can document it at choco {0}: https://raw.githubusercontent.com/wiki/chocolatey/choco/images/gifs/choco_search.gif ".FormatWith(configuration.CommandName)); - "chocolatey".Log().Info(ChocolateyLoggers.Important, "Alternative Sources"); "chocolatey".Log().Info(ChocolateyLoggers.Important, "Options and Switches"); } @@ -249,7 +251,7 @@ public virtual bool MayRequireAdminAccess() return false; } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public virtual void configure_argument_parser(OptionSet optionSet, ChocolateyConfiguration configuration) => ConfigureArgumentParser(optionSet, configuration); @@ -285,6 +287,6 @@ public virtual int count(ChocolateyConfiguration config) [Obsolete("This overload is deprecated and will be removed in v3.")] public virtual IEnumerable list(ChocolateyConfiguration config) => List(config); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/commands/ChocolateySourceCommand.cs b/src/chocolatey/infrastructure.app/commands/ChocolateySourceCommand.cs index bf78c4ca26..12c3981bd0 100644 --- a/src/chocolatey/infrastructure.app/commands/ChocolateySourceCommand.cs +++ b/src/chocolatey/infrastructure.app/commands/ChocolateySourceCommand.cs @@ -14,21 +14,21 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Linq; +using chocolatey.infrastructure.app.attributes; +using chocolatey.infrastructure.results; +using chocolatey.infrastructure.commandline; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.domain; +using chocolatey.infrastructure.commands; +using chocolatey.infrastructure.configuration; +using chocolatey.infrastructure.logging; +using chocolatey.infrastructure.app.services; + namespace chocolatey.infrastructure.app.commands { - using System; - using System.Collections.Generic; - using System.Linq; - using attributes; - using chocolatey.infrastructure.results; - using commandline; - using configuration; - using domain; - using infrastructure.commands; - using infrastructure.configuration; - using logging; - using services; - [CommandFor("source", "view and configure default sources")] [CommandFor("sources", "view and configure default sources (alias for source)")] public class ChocolateySourceCommand : IListCommand @@ -70,10 +70,10 @@ public virtual void ConfigureArgumentParser(OptionSet optionSet, ChocolateyConfi "Bypass Proxy - Should this source explicitly bypass any explicitly or system configured proxies? Defaults to false.", option => configuration.SourceCommand.BypassProxy = option != null) .Add("allowselfservice|allow-self-service", - "Allow Self-Service - Should this source be allowed to be used with self-service? Requires business edition (v1.10.0+) with feature 'useBackgroundServiceWithSelfServiceSourcesOnly' turned on. Defaults to false.", + "Allow Self-Service - Should this source be allowed to be used with self-service? Requires business edition with feature 'useBackgroundServiceWithSelfServiceSourcesOnly' turned on. Defaults to false.", option => configuration.SourceCommand.AllowSelfService = option != null) .Add("adminonly|admin-only", - "Visible to Administrators Only - Should this source be visible to non-administrators? Requires business edition (v1.12.2+). Defaults to false.", + "Visible to Administrators Only - Should this source be visible to non-administrators? Requires business edition. Defaults to false.", option => configuration.SourceCommand.VisibleToAdminsOnly = option != null) ; } @@ -88,11 +88,15 @@ public virtual void ParseAdditionalArguments(IList unparsedArguments, Ch } var command = SourceCommandType.Unknown; - string unparsedCommand = unparsedArguments.DefaultIfEmpty(string.Empty).FirstOrDefault(); + var unparsedCommand = unparsedArguments.DefaultIfEmpty(string.Empty).FirstOrDefault(); Enum.TryParse(unparsedCommand, true, out command); if (command == SourceCommandType.Unknown) { - if (!string.IsNullOrWhiteSpace(unparsedCommand)) this.Log().Warn("Unknown command {0}. Setting to list.".FormatWith(unparsedCommand)); + if (!string.IsNullOrWhiteSpace(unparsedCommand)) + { + this.Log().Warn("Unknown command {0}. Setting to list.".FormatWith(unparsedCommand)); + } + command = SourceCommandType.List; } @@ -160,12 +164,17 @@ Exit codes that normally result from running this command. Normal: - 0: operation was successful, no issues detected - -1 or 1: an error has occurred + - 2: nothing to do (enhanced) + +NOTE: Starting in v2.3.0, if you have the feature '{0}' + turned on, then choco will provide enhanced exit codes that allow + better integration and scripting. If you find other exit codes that we have not yet documented, please file a ticket so we can document it at https://github.com/chocolatey/choco/issues/new/choose. -"); +".FormatWith(ApplicationParameters.Features.UseEnhancedExitCodes)); "chocolatey".Log().Info(ChocolateyLoggers.Important, "Options and Switches"); } @@ -210,12 +219,15 @@ public virtual int Count(ChocolateyConfiguration config) public virtual bool MayRequireAdminAccess() { var config = Config.GetConfigurationSettings(); - if (config == null) return true; + if (config == null) + { + return true; + } return config.SourceCommand.Command != SourceCommandType.List; } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public virtual void configure_argument_parser(OptionSet optionSet, ChocolateyConfiguration configuration) => ConfigureArgumentParser(optionSet, configuration); @@ -251,6 +263,6 @@ public virtual int count(ChocolateyConfiguration config) [Obsolete("This overload is deprecated and will be removed in v3.")] public virtual IEnumerable list(ChocolateyConfiguration config) => List(config); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/commands/ChocolateyTemplateCommand.cs b/src/chocolatey/infrastructure.app/commands/ChocolateyTemplateCommand.cs index ee8fa0aac1..ed3b0abca6 100644 --- a/src/chocolatey/infrastructure.app/commands/ChocolateyTemplateCommand.cs +++ b/src/chocolatey/infrastructure.app/commands/ChocolateyTemplateCommand.cs @@ -1,188 +1,192 @@ -// Copyright © 2017 - 2021 Chocolatey Software, Inc -// Copyright © 2011 - 2017 RealDimensions Software, LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -namespace chocolatey.infrastructure.app.commands -{ - using System; - using System.Collections.Generic; - using System.Linq; - using attributes; - using chocolatey.infrastructure.results; - using commandline; - using configuration; - using domain; - using infrastructure.commands; - using logging; - using services; - using templates; - - [CommandFor("template", "get information about installed templates")] - [CommandFor("templates", "get information about installed templates (alias for template)")] - public class ChocolateyTemplateCommand : ICommand - { - private readonly ITemplateService _templateService; - - public ChocolateyTemplateCommand(ITemplateService templateService) - { - _templateService = templateService; - } - - public void ConfigureArgumentParser(OptionSet optionSet, ChocolateyConfiguration configuration) - { - optionSet - .Add("n=|name=", - "The name of the template to get information about.", - option => configuration.TemplateCommand.Name = option.UnquoteSafe().ToLower()); - // todo: #2570 Allow for templates from an external path? Requires #1477 - } - - public virtual void ParseAdditionalArguments(IList unparsedArguments, ChocolateyConfiguration configuration) - { - // don't set configuration.Input or it will be passed to list - - if (unparsedArguments.Count > 1) - { - throw new ApplicationException("A single template command must be listed. Please see the help menu for those commands"); - } - - var command = TemplateCommandType.Unknown; - string unparsedCommand = unparsedArguments.DefaultIfEmpty(string.Empty).FirstOrDefault(); - Enum.TryParse(unparsedCommand, true, out command); - - if (command == TemplateCommandType.Unknown) - { - if (!string.IsNullOrWhiteSpace(unparsedCommand)) this.Log().Warn("Unknown command {0}. Setting to list.".FormatWith(unparsedCommand)); - command = TemplateCommandType.List; - } - - configuration.TemplateCommand.Command = command; - } - - public virtual void Validate(ChocolateyConfiguration configuration) - { - if (configuration.TemplateCommand.Command != TemplateCommandType.List && string.IsNullOrWhiteSpace(configuration.TemplateCommand.Name)) - { - throw new ApplicationException("When specifying the subcommand '{0}', you must also specify --name.".FormatWith(configuration.TemplateCommand.Command.ToStringSafe().ToLower())); - } - } - - public virtual void HelpMessage(ChocolateyConfiguration configuration) - { - "chocolatey".Log().Info(ChocolateyLoggers.Important, "Template Command"); - "chocolatey".Log().Info(@" -List information installed templates. - -Both manually installed templates and templates installed via - .template packages are displayed."); - - "chocolatey".Log().Info(ChocolateyLoggers.Important, "Usage"); - "chocolatey".Log().Info(@" - choco template [list]|info []"); - - "chocolatey".Log().Info(ChocolateyLoggers.Important, "Examples"); - "chocolatey".Log().Info(@" - choco template - choco templates - choco template list - choco template info --name msi - choco template list --reduce-output - choco template list --verbose - -NOTE: See scripting in the command reference (`choco -?`) for how to - write proper scripts and integrations. - -"); - - "chocolatey".Log().Info(ChocolateyLoggers.Important, "Exit Codes"); - "chocolatey".Log().Info(@" -Exit codes that normally result from running this command. - -Normal: - - 0: operation was successful, no issues detected - - -1 or 1: an error has occurred - -If you find other exit codes that we have not yet documented, please - file a ticket so we can document it at - https://github.com/chocolatey/choco/issues/new/choose. - -"); - - "chocolatey".Log().Info(ChocolateyLoggers.Important, "Options and Switches"); - } - - public virtual void DryRun(ChocolateyConfiguration configuration) - { - switch (configuration.TemplateCommand.Command) - { - case TemplateCommandType.List: - _templateService.ListDryRun(configuration); - break; - case TemplateCommandType.Info: - _templateService.ListDryRun(configuration); - break; - } - } - - public virtual void Run(ChocolateyConfiguration configuration) - { - switch (configuration.TemplateCommand.Command) - { - case TemplateCommandType.List: - _templateService.List(configuration); - break; - case TemplateCommandType.Info: - configuration.Verbose = true; - _templateService.List(configuration); - break; - } - } - - public virtual bool MayRequireAdminAccess() - { - return false; - } - -#pragma warning disable IDE1006 - [Obsolete("This overload is deprecated and will be removed in v3.")] - public virtual void configure_argument_parser(OptionSet optionSet, ChocolateyConfiguration configuration) - => ConfigureArgumentParser(optionSet, configuration); - - [Obsolete("This overload is deprecated and will be removed in v3.")] - public virtual void handle_additional_argument_parsing(IList unparsedArguments, ChocolateyConfiguration configuration) - => ParseAdditionalArguments(unparsedArguments, configuration); - - [Obsolete("This overload is deprecated and will be removed in v3.")] - public virtual void handle_validation(ChocolateyConfiguration configuration) - => Validate(configuration); - - [Obsolete("This overload is deprecated and will be removed in v3.")] - public virtual void help_message(ChocolateyConfiguration configuration) - => HelpMessage(configuration); - - [Obsolete("This overload is deprecated and will be removed in v3.")] - public virtual void noop(ChocolateyConfiguration configuration) - => DryRun(configuration); - - [Obsolete("This overload is deprecated and will be removed in v3.")] - public virtual void run(ChocolateyConfiguration configuration) - => Run(configuration); - - [Obsolete("This overload is deprecated and will be removed in v3.")] - public virtual bool may_require_admin_access() - => MayRequireAdminAccess(); -#pragma warning restore IDE1006 - } -} +// Copyright © 2017 - 2021 Chocolatey Software, Inc +// Copyright © 2011 - 2017 RealDimensions Software, LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +using System; +using System.Collections.Generic; +using System.Linq; +using chocolatey.infrastructure.app.attributes; +using chocolatey.infrastructure.results; +using chocolatey.infrastructure.commandline; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.domain; +using chocolatey.infrastructure.commands; +using chocolatey.infrastructure.logging; +using chocolatey.infrastructure.app.services; +using chocolatey.infrastructure.app.templates; + +namespace chocolatey.infrastructure.app.commands +{ + [CommandFor("template", "get information about installed templates")] + [CommandFor("templates", "get information about installed templates (alias for template)")] + public class ChocolateyTemplateCommand : ICommand + { + private readonly ITemplateService _templateService; + + public ChocolateyTemplateCommand(ITemplateService templateService) + { + _templateService = templateService; + } + + public void ConfigureArgumentParser(OptionSet optionSet, ChocolateyConfiguration configuration) + { + optionSet + .Add("n=|name=", + "The name of the template to get information about.", + option => configuration.TemplateCommand.Name = option.UnquoteSafe().ToLower()); + // todo: #2570 Allow for templates from an external path? Requires #1477 + } + + public virtual void ParseAdditionalArguments(IList unparsedArguments, ChocolateyConfiguration configuration) + { + // don't set configuration.Input or it will be passed to list + + if (unparsedArguments.Count > 1) + { + throw new ApplicationException("A single template command must be listed. Please see the help menu for those commands"); + } + + var command = TemplateCommandType.Unknown; + var unparsedCommand = unparsedArguments.DefaultIfEmpty(string.Empty).FirstOrDefault(); + Enum.TryParse(unparsedCommand, true, out command); + + if (command == TemplateCommandType.Unknown) + { + if (!string.IsNullOrWhiteSpace(unparsedCommand)) + { + this.Log().Warn("Unknown command {0}. Setting to list.".FormatWith(unparsedCommand)); + } + + command = TemplateCommandType.List; + } + + configuration.TemplateCommand.Command = command; + } + + public virtual void Validate(ChocolateyConfiguration configuration) + { + if (configuration.TemplateCommand.Command != TemplateCommandType.List && string.IsNullOrWhiteSpace(configuration.TemplateCommand.Name)) + { + throw new ApplicationException("When specifying the subcommand '{0}', you must also specify --name.".FormatWith(configuration.TemplateCommand.Command.ToStringSafe().ToLower())); + } + } + + public virtual void HelpMessage(ChocolateyConfiguration configuration) + { + "chocolatey".Log().Info(ChocolateyLoggers.Important, "Template Command"); + "chocolatey".Log().Info(@" +List information installed templates. + +Both manually installed templates and templates installed via + .template packages are displayed."); + + "chocolatey".Log().Info(ChocolateyLoggers.Important, "Usage"); + "chocolatey".Log().Info(@" + choco template [list]|info []"); + + "chocolatey".Log().Info(ChocolateyLoggers.Important, "Examples"); + "chocolatey".Log().Info(@" + choco template + choco templates + choco template list + choco template info --name msi + choco template list --reduce-output + choco template list --verbose + +NOTE: See scripting in the command reference (`choco -?`) for how to + write proper scripts and integrations. + +"); + + "chocolatey".Log().Info(ChocolateyLoggers.Important, "Exit Codes"); + "chocolatey".Log().Info(@" +Exit codes that normally result from running this command. + +Normal: + - 0: operation was successful, no issues detected + - -1 or 1: an error has occurred + +If you find other exit codes that we have not yet documented, please + file a ticket so we can document it at + https://github.com/chocolatey/choco/issues/new/choose. + +"); + + "chocolatey".Log().Info(ChocolateyLoggers.Important, "Options and Switches"); + } + + public virtual void DryRun(ChocolateyConfiguration configuration) + { + switch (configuration.TemplateCommand.Command) + { + case TemplateCommandType.List: + _templateService.ListDryRun(configuration); + break; + case TemplateCommandType.Info: + _templateService.ListDryRun(configuration); + break; + } + } + + public virtual void Run(ChocolateyConfiguration configuration) + { + switch (configuration.TemplateCommand.Command) + { + case TemplateCommandType.List: + _templateService.List(configuration); + break; + case TemplateCommandType.Info: + configuration.Verbose = true; + _templateService.List(configuration); + break; + } + } + + public virtual bool MayRequireAdminAccess() + { + return false; + } + +#pragma warning disable IDE0022, IDE1006 + [Obsolete("This overload is deprecated and will be removed in v3.")] + public virtual void configure_argument_parser(OptionSet optionSet, ChocolateyConfiguration configuration) + => ConfigureArgumentParser(optionSet, configuration); + + [Obsolete("This overload is deprecated and will be removed in v3.")] + public virtual void handle_additional_argument_parsing(IList unparsedArguments, ChocolateyConfiguration configuration) + => ParseAdditionalArguments(unparsedArguments, configuration); + + [Obsolete("This overload is deprecated and will be removed in v3.")] + public virtual void handle_validation(ChocolateyConfiguration configuration) + => Validate(configuration); + + [Obsolete("This overload is deprecated and will be removed in v3.")] + public virtual void help_message(ChocolateyConfiguration configuration) + => HelpMessage(configuration); + + [Obsolete("This overload is deprecated and will be removed in v3.")] + public virtual void noop(ChocolateyConfiguration configuration) + => DryRun(configuration); + + [Obsolete("This overload is deprecated and will be removed in v3.")] + public virtual void run(ChocolateyConfiguration configuration) + => Run(configuration); + + [Obsolete("This overload is deprecated and will be removed in v3.")] + public virtual bool may_require_admin_access() + => MayRequireAdminAccess(); +#pragma warning restore IDE0022, IDE1006 + } +} diff --git a/src/chocolatey/infrastructure.app/commands/ChocolateyUninstallCommand.cs b/src/chocolatey/infrastructure.app/commands/ChocolateyUninstallCommand.cs index dc468bfb80..8abb40f6f4 100644 --- a/src/chocolatey/infrastructure.app/commands/ChocolateyUninstallCommand.cs +++ b/src/chocolatey/infrastructure.app/commands/ChocolateyUninstallCommand.cs @@ -14,18 +14,18 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Linq; +using chocolatey.infrastructure.app.attributes; +using chocolatey.infrastructure.commandline; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.commands; +using chocolatey.infrastructure.logging; +using chocolatey.infrastructure.app.services; + namespace chocolatey.infrastructure.app.commands { - using System; - using System.Collections.Generic; - using System.Linq; - using attributes; - using commandline; - using configuration; - using infrastructure.commands; - using logging; - using services; - [CommandFor("uninstall", "uninstalls a package")] public class ChocolateyUninstallCommand : ChocolateyCommandBase, ICommand { @@ -291,7 +291,7 @@ public virtual bool MayRequireAdminAccess() return true; } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public virtual void configure_argument_parser(OptionSet optionSet, ChocolateyConfiguration configuration) => ConfigureArgumentParser(optionSet, configuration); @@ -319,6 +319,6 @@ public virtual void run(ChocolateyConfiguration configuration) [Obsolete("This overload is deprecated and will be removed in v3.")] public virtual bool may_require_admin_access() => MayRequireAdminAccess(); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/commands/ChocolateyUnpackSelfCommand.cs b/src/chocolatey/infrastructure.app/commands/ChocolateyUnpackSelfCommand.cs index 449396479d..00295fe884 100644 --- a/src/chocolatey/infrastructure.app/commands/ChocolateyUnpackSelfCommand.cs +++ b/src/chocolatey/infrastructure.app/commands/ChocolateyUnpackSelfCommand.cs @@ -14,30 +14,31 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.ComponentModel; +using chocolatey.infrastructure.adapters; +using chocolatey.infrastructure.app.attributes; +using chocolatey.infrastructure.commandline; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.extractors; +using chocolatey.infrastructure.filesystem; +using chocolatey.infrastructure.commands; +using chocolatey.infrastructure.logging; +#if !NoResources +using chocolatey.resources; + namespace chocolatey.infrastructure.app.commands { - using System; - using System.Collections.Generic; - using System.ComponentModel; - using adapters; - using attributes; - using commandline; - using configuration; - using extractors; - using filesystem; - using infrastructure.commands; - using logging; -#if !NoResources - using resources; #endif - [CommandFor("unpackself", "re-installs Chocolatey base files")] + [CommandFor("unpackself", "[DEPRECATED] will be removed in v3.0.0 - re-installs Chocolatey base files")] public class ChocolateyUnpackSelfCommand : ICommand { private readonly IFileSystem _fileSystem; #if !NoResources - private Lazy _assemblyInitializer = new Lazy(() => adapters.Assembly.GetAssembly(typeof (ChocolateyResourcesAssembly))); + private Lazy _assemblyInitializer = new Lazy(() => adapters.Assembly.GetAssembly(typeof(ChocolateyResourcesAssembly))); #else private Lazy _assemblyInitializer = new Lazy(); #endif @@ -68,12 +69,17 @@ public virtual void ParseAdditionalArguments(IList unparsedArguments, Ch public virtual void Validate(ChocolateyConfiguration configuration) { + this.Log().Warn(ChocolateyLoggers.Important, @" +DEPRECATION NOTICE - choco unpackself command is deprecated and will be + removed in version 3.0.0."); } public virtual void HelpMessage(ChocolateyConfiguration configuration) { - this.Log().Info(ChocolateyLoggers.Important, "UnpackSelf Command"); + this.Log().Info(ChocolateyLoggers.Important, "[DEPRECATED] UnpackSelf Command"); this.Log().Info(@" +NOTE: Unpackself has been deprecated and will be removed in version 3.0.0. + This will unpack files needed by choco. It will overwrite existing files only if --force is specified. @@ -121,7 +127,7 @@ public virtual bool MayRequireAdminAccess() return true; } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public virtual void configure_argument_parser(OptionSet optionSet, ChocolateyConfiguration configuration) => ConfigureArgumentParser(optionSet, configuration); @@ -149,6 +155,6 @@ public virtual void run(ChocolateyConfiguration configuration) [Obsolete("This overload is deprecated and will be removed in v3.")] public virtual bool may_require_admin_access() => MayRequireAdminAccess(); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/commands/ChocolateyUpgradeCommand.cs b/src/chocolatey/infrastructure.app/commands/ChocolateyUpgradeCommand.cs index 8c8080d3b8..03569df162 100644 --- a/src/chocolatey/infrastructure.app/commands/ChocolateyUpgradeCommand.cs +++ b/src/chocolatey/infrastructure.app/commands/ChocolateyUpgradeCommand.cs @@ -14,18 +14,18 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Linq; +using chocolatey.infrastructure.app.attributes; +using chocolatey.infrastructure.commandline; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.commands; +using chocolatey.infrastructure.logging; +using chocolatey.infrastructure.app.services; + namespace chocolatey.infrastructure.app.commands { - using System; - using System.Collections.Generic; - using System.Linq; - using attributes; - using commandline; - using configuration; - using infrastructure.commands; - using logging; - using services; - [CommandFor("upgrade", "upgrades packages from various sources")] public class ChocolateyUpgradeCommand : ChocolateyCommandBase, ICommand { @@ -115,19 +115,28 @@ public virtual void ConfigureArgumentParser(OptionSet optionSet, ChocolateyConfi "IgnoreChecksums - Ignore checksums provided by the package. Overrides the default feature '{0}' set to '{1}'.".FormatWith(ApplicationParameters.Features.ChecksumFiles, configuration.Features.ChecksumFiles.ToStringSafe()), option => { - if (option != null) configuration.Features.ChecksumFiles = false; + if (option != null) + { + configuration.Features.ChecksumFiles = false; + } }) .Add("allowemptychecksum|allowemptychecksums|allow-empty-checksums", "Allow Empty Checksums - Allow packages to have empty/missing checksums for downloaded resources from non-secure locations (HTTP, FTP). Use this switch is not recommended if using sources that download resources from the internet. Overrides the default feature '{0}' set to '{1}'.".FormatWith(ApplicationParameters.Features.AllowEmptyChecksums, configuration.Features.AllowEmptyChecksums.ToStringSafe()), option => { - if (option != null) configuration.Features.AllowEmptyChecksums = true; + if (option != null) + { + configuration.Features.AllowEmptyChecksums = true; + } }) .Add("allowemptychecksumsecure|allowemptychecksumssecure|allow-empty-checksums-secure", "Allow Empty Checksums Secure - Allow packages to have empty checksums for downloaded resources from secure locations (HTTPS). Overrides the default feature '{0}' set to '{1}'.".FormatWith(ApplicationParameters.Features.AllowEmptyChecksumsSecure, configuration.Features.AllowEmptyChecksumsSecure.ToStringSafe()), option => { - if (option != null) configuration.Features.AllowEmptyChecksumsSecure = true; + if (option != null) + { + configuration.Features.AllowEmptyChecksumsSecure = true; + } }) .Add("requirechecksum|requirechecksums|require-checksums", "Require Checksums - Requires packages to have checksums for downloaded resources (both non-secure and secure). Overrides the default feature '{0}' set to '{1}' and '{2}' set to '{3}'.".FormatWith(ApplicationParameters.Features.AllowEmptyChecksums, configuration.Features.AllowEmptyChecksums.ToStringSafe(), ApplicationParameters.Features.AllowEmptyChecksumsSecure, configuration.Features.AllowEmptyChecksumsSecure.ToStringSafe()), @@ -194,13 +203,19 @@ public virtual void ConfigureArgumentParser(OptionSet optionSet, ChocolateyConfi "Use Remembered Options for Upgrade - use the arguments and options used during install for upgrade. Does not override arguments being passed at runtime. Overrides the default feature '{0}' set to '{1}'.".FormatWith(ApplicationParameters.Features.UseRememberedArgumentsForUpgrades, configuration.Features.UseRememberedArgumentsForUpgrades.ToStringSafe()), option => { - if (option != null) configuration.Features.UseRememberedArgumentsForUpgrades = true; + if (option != null) + { + configuration.Features.UseRememberedArgumentsForUpgrades = true; + } }) .Add("ignorerememberedargs|ignorerememberedarguments|ignorerememberedoptions|ignore-remembered-args|ignore-remembered-arguments|ignore-remembered-options", "Ignore Remembered Options for Upgrade - ignore the arguments and options used during install for upgrade. Overrides the default feature '{0}' set to '{1}'.".FormatWith(ApplicationParameters.Features.UseRememberedArgumentsForUpgrades, configuration.Features.UseRememberedArgumentsForUpgrades.ToStringSafe()), option => { - if (option != null) configuration.Features.UseRememberedArgumentsForUpgrades = false; + if (option != null) + { + configuration.Features.UseRememberedArgumentsForUpgrades = false; + } }) .Add("exitwhenrebootdetected|exit-when-reboot-detected", "Exit When Reboot Detected - Stop running install, upgrade, or uninstall when a reboot request is detected. Requires '{0}' feature to be turned on. Will exit with either {1} or {2}. Overrides the default feature '{3}' set to '{4}'.".FormatWith @@ -235,6 +250,14 @@ public virtual void ConfigureArgumentParser(OptionSet optionSet, ChocolateyConfi "Skip hooks - Do not run hook scripts. Available in 1.2.0+", option => configuration.SkipHookScripts = option != null ) + .Add("ignore-pinned", + "Ignore Pinned - Ignores any pins and upgrades the package(s) anyway. Available in 2.3.0+", + option => configuration.UpgradeCommand.IgnorePinned = option != null + ) + .Add("include-configured-sources", + "Include Configured Sources - When using the '--source' option, this appends the sources that have been saved into the chocolatey.config file by 'source' command. Available in 2.3.0+", + option => configuration.IncludeConfiguredSources = option != null + ) ; } @@ -336,6 +359,11 @@ Exit codes that normally result from running this command. Normal: - 0: operation was successful, no issues detected - -1 or 1: an error has occurred + - 2: nothing to do, no packages outdated (enhanced) + +NOTE: Starting in v2.3.0, if you have the feature '{2}' + turned on, then choco will provide enhanced exit codes that allow + better integration and scripting. Package Exit Codes: - 1641: success, reboot initiated @@ -353,7 +381,7 @@ turned on. Uninstall command has additional valid exit codes. In addition to the above exit codes, you may also see reboot exit codes when the feature '{1}' is turned on. It typically requires the feature '{0}' to also be turned on to work properly. -".FormatWith(ApplicationParameters.Features.UsePackageExitCodes, ApplicationParameters.Features.ExitOnRebootDetected)); +".FormatWith(ApplicationParameters.Features.UsePackageExitCodes, ApplicationParameters.Features.ExitOnRebootDetected, ApplicationParameters.Features.UseEnhancedExitCodes)); "chocolatey".Log().Info(ChocolateyLoggers.Important, "See It In Action"); "chocolatey".Log().Info(@" @@ -386,7 +414,7 @@ public virtual bool MayRequireAdminAccess() return true; } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public virtual void configure_argument_parser(OptionSet optionSet, ChocolateyConfiguration configuration) => ConfigureArgumentParser(optionSet, configuration); @@ -414,6 +442,6 @@ public virtual void run(ChocolateyConfiguration configuration) [Obsolete("This overload is deprecated and will be removed in v3.")] public virtual bool may_require_admin_access() => MayRequireAdminAccess(); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/configuration/ChocolateyConfiguration.cs b/src/chocolatey/infrastructure.app/configuration/ChocolateyConfiguration.cs index 5ec4816f43..1c4ea87af6 100644 --- a/src/chocolatey/infrastructure.app/configuration/ChocolateyConfiguration.cs +++ b/src/chocolatey/infrastructure.app/configuration/ChocolateyConfiguration.cs @@ -14,16 +14,16 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Reflection; +using System.Text; +using chocolatey.infrastructure.app.domain; +using chocolatey.infrastructure.logging; +using chocolatey.infrastructure.platforms; + namespace chocolatey.infrastructure.app.configuration { - using System; - using System.Collections.Generic; - using System.Reflection; - using System.Text; - using domain; - using logging; - using platforms; - /// /// The chocolatey configuration. /// @@ -58,6 +58,7 @@ public ChocolateyConfiguration() ExportCommand = new ExportCommandConfiguration(); TemplateCommand = new TemplateCommandConfiguration(); CacheCommand = new CacheCommandConfiguration(); + RuleCommand = new RuleCommandConfiguration(); #if DEBUG AllowUnofficialBuild = true; #endif @@ -108,7 +109,7 @@ public void RevertChanges(bool removeBackup = false) // Runtime type lookup ensures this also fully works with derived classes (for example: licensed configuration) // without needing to re-implement this method / make it overridable. - var t = this.GetType(); + var t = GetType(); var backup = removeBackup ? _configurationBackups.Pop() : _configurationBackups.Peek(); @@ -262,6 +263,7 @@ private void AppendOutput(StringBuilder propertyValues, string append) public string Sources { get; set; } public string SourceType { get; set; } + public bool IncludeConfiguredSources { get; set; } // top level commands @@ -494,7 +496,12 @@ private void AppendOutput(StringBuilder propertyValues, string append) /// public CacheCommandConfiguration CacheCommand { get; set; } -#pragma warning disable IDE1006 + /// + /// Gets or sets the configuration related specifically to the Rule command. + /// + public RuleCommandConfiguration RuleCommand { get; set; } + +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public void start_backup() => CreateBackup(); @@ -502,7 +509,7 @@ public void start_backup() [Obsolete("This overload is deprecated and will be removed in v3.")] public void reset_config(bool removeBackup = false) => RevertChanges(removeBackup); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } [Serializable] @@ -560,6 +567,7 @@ public sealed class FeaturesConfiguration public bool ExitOnRebootDetected { get; set; } public bool LogValidationResultsOnWarnings { get; set; } public bool UsePackageRepositoryOptimizations { get; set; } + public bool UsePackageHashValidation { get; set; } } //todo: #2565 retrofit other command configs this way @@ -600,6 +608,7 @@ public sealed class UpgradeCommandConfiguration public bool NotifyOnlyAvailableUpgrades { get; set; } public string PackageNamesToSkip { get; set; } public bool ExcludePrerelease { get; set; } + public bool IgnorePinned { get; set; } } [Serializable] @@ -746,4 +755,18 @@ public sealed class CacheCommandConfiguration /// public bool RemoveExpiredItemsOnly { get; set; } } + + [Serializable] + public sealed class RuleCommandConfiguration + { + /// + /// Gets or sets the name or identifier of a rule the user wants to use for the command. + /// + public string Name { get; set; } + + /// + /// Gets or sets the sub command to execute. + /// + public string Command { get; set; } + } } diff --git a/src/chocolatey/infrastructure.app/configuration/ConfigFileApiKeySetting.cs b/src/chocolatey/infrastructure.app/configuration/ConfigFileApiKeySetting.cs index 0806ec1a45..a756fe8c14 100644 --- a/src/chocolatey/infrastructure.app/configuration/ConfigFileApiKeySetting.cs +++ b/src/chocolatey/infrastructure.app/configuration/ConfigFileApiKeySetting.cs @@ -14,11 +14,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Xml.Serialization; + namespace chocolatey.infrastructure.app.configuration { - using System; - using System.Xml.Serialization; - /// /// XML config file api keys element /// @@ -40,7 +40,7 @@ public override bool Equals(object obj) return false; } - var item = (ConfigFileApiKeySetting) obj; + var item = (ConfigFileApiKeySetting)obj; return (Source == item.Source) && (Key == item.Key); diff --git a/src/chocolatey/infrastructure.app/configuration/ConfigFileConfigSetting.cs b/src/chocolatey/infrastructure.app/configuration/ConfigFileConfigSetting.cs index 8b354bf836..8bcf054cdd 100644 --- a/src/chocolatey/infrastructure.app/configuration/ConfigFileConfigSetting.cs +++ b/src/chocolatey/infrastructure.app/configuration/ConfigFileConfigSetting.cs @@ -14,11 +14,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Xml.Serialization; + namespace chocolatey.infrastructure.app.configuration { - using System; - using System.Xml.Serialization; - /// /// XML config file config element /// @@ -43,7 +43,7 @@ public override bool Equals(object obj) return false; } - var item = (ConfigFileConfigSetting) obj; + var item = (ConfigFileConfigSetting)obj; return (Key == item.Key) && (Value == item.Value) diff --git a/src/chocolatey/infrastructure.app/configuration/ConfigFileFeatureSetting.cs b/src/chocolatey/infrastructure.app/configuration/ConfigFileFeatureSetting.cs index 01267505fc..1fa65957a8 100644 --- a/src/chocolatey/infrastructure.app/configuration/ConfigFileFeatureSetting.cs +++ b/src/chocolatey/infrastructure.app/configuration/ConfigFileFeatureSetting.cs @@ -14,11 +14,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Xml.Serialization; + namespace chocolatey.infrastructure.app.configuration { - using System; - using System.Xml.Serialization; - /// /// XML config file features element /// @@ -46,7 +46,7 @@ public override bool Equals(object obj) return false; } - var item = (ConfigFileFeatureSetting) obj; + var item = (ConfigFileFeatureSetting)obj; return (Name == item.Name) && (Enabled == item.Enabled) diff --git a/src/chocolatey/infrastructure.app/configuration/ConfigFileSettings.cs b/src/chocolatey/infrastructure.app/configuration/ConfigFileSettings.cs index 8141d94d8e..08d1b36217 100644 --- a/src/chocolatey/infrastructure.app/configuration/ConfigFileSettings.cs +++ b/src/chocolatey/infrastructure.app/configuration/ConfigFileSettings.cs @@ -14,12 +14,12 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Xml.Serialization; + namespace chocolatey.infrastructure.app.configuration { - using System; - using System.Collections.Generic; - using System.Xml.Serialization; - /// /// XML configuration file /// @@ -47,7 +47,7 @@ public override bool Equals(object obj) return false; } - var item = (ConfigFileSettings) obj; + var item = (ConfigFileSettings)obj; return (ConfigSettings == item.ConfigSettings) && (Sources == item.Sources) diff --git a/src/chocolatey/infrastructure.app/configuration/ConfigFileSourceSetting.cs b/src/chocolatey/infrastructure.app/configuration/ConfigFileSourceSetting.cs index 85be8c95c7..e1f4ada5e0 100644 --- a/src/chocolatey/infrastructure.app/configuration/ConfigFileSourceSetting.cs +++ b/src/chocolatey/infrastructure.app/configuration/ConfigFileSourceSetting.cs @@ -14,11 +14,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Xml.Serialization; + namespace chocolatey.infrastructure.app.configuration { - using System; - using System.Xml.Serialization; - /// /// XML config file sources element /// @@ -67,7 +67,7 @@ public override bool Equals(object obj) return false; } - var item = (ConfigFileSourceSetting) obj; + var item = (ConfigFileSourceSetting)obj; return (Id == item.Id) && (Value == item.Value) diff --git a/src/chocolatey/infrastructure.app/configuration/ConfigurationOptions.cs b/src/chocolatey/infrastructure.app/configuration/ConfigurationOptions.cs index 8b13a07ff0..61c30aaac9 100644 --- a/src/chocolatey/infrastructure.app/configuration/ConfigurationOptions.cs +++ b/src/chocolatey/infrastructure.app/configuration/ConfigurationOptions.cs @@ -14,18 +14,18 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Diagnostics; +using System.Linq; +using System.Text.RegularExpressions; +using chocolatey.infrastructure.adapters; +using chocolatey.infrastructure.commandline; +using Console = chocolatey.infrastructure.adapters.Console; + namespace chocolatey.infrastructure.app.configuration { - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.Diagnostics; - using System.Linq; - using System.Text.RegularExpressions; - using adapters; - using commandline; - using Console = adapters.Console; - public static class ConfigurationOptions { private static Lazy _console = new Lazy(() => new Console()); @@ -38,7 +38,7 @@ public static void InitializeWith(Lazy console) public static void ClearOptions() { - _optionSet.Clear(); + OptionSet.Clear(); } private static IConsole Console @@ -46,12 +46,7 @@ private static IConsole Console get { return _console.Value; } } - private static readonly OptionSet _optionSet = new OptionSet(); - - public static OptionSet OptionSet - { - get { return _optionSet; } - } + public static OptionSet OptionSet { get; } = new OptionSet(); /// /// Parses arguments and updates the configuration @@ -72,9 +67,9 @@ public static void ParseArgumentsAndUpdateConfiguration(ICollection args IList unparsedArguments = new List(); // add help only once - if (_optionSet.Count == 0) + if (OptionSet.Count == 0) { - _optionSet + OptionSet .Add("?|help|h", "Prints out the help menu.", option => configuration.HelpRequested = option != null) @@ -85,16 +80,16 @@ public static void ParseArgumentsAndUpdateConfiguration(ICollection args if (setOptions != null) { - setOptions(_optionSet); + setOptions(OptionSet); } try { - unparsedArguments = _optionSet.Parse(args); + unparsedArguments = OptionSet.Parse(args); } catch (OptionException) { - ShowHelp(_optionSet, helpMessage); + ShowHelp(OptionSet, helpMessage); configuration.UnsuccessfulParsing = true; } @@ -146,7 +141,7 @@ public static void ParseArgumentsAndUpdateConfiguration(ICollection args return; } - ShowHelp(_optionSet, helpMessage); + ShowHelp(OptionSet, helpMessage); } else { @@ -178,7 +173,7 @@ private static void ShowHelp(OptionSet optionSet, Action helpMessage) optionSet.WriteOptionDescriptions(Console.Out); } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] [EditorBrowsable(EditorBrowsableState.Never)] public static void initialize_with(Lazy console) @@ -196,6 +191,6 @@ public static void parse_arguments_and_update_configuration(ICollection Action validateConfiguration, Action helpMessage) => ParseArgumentsAndUpdateConfiguration(args, configuration, setOptions, afterParse, validateConfiguration, helpMessage); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/configuration/EnvironmentSettings.cs b/src/chocolatey/infrastructure.app/configuration/EnvironmentSettings.cs index 6f1decbde3..dc0aa9c096 100644 --- a/src/chocolatey/infrastructure.app/configuration/EnvironmentSettings.cs +++ b/src/chocolatey/infrastructure.app/configuration/EnvironmentSettings.cs @@ -14,21 +14,21 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Reflection; +using System.Security.Principal; +using System.Text; +using chocolatey.infrastructure.adapters; +using chocolatey.infrastructure.logging; +using chocolatey.infrastructure.app.nuget; +using Environment = chocolatey.infrastructure.adapters.Environment; + namespace chocolatey.infrastructure.app.configuration { - using System; - using System.Collections; - using System.Collections.Generic; - using System.ComponentModel; - using System.Linq; - using System.Reflection; - using System.Security.Principal; - using System.Text; - using adapters; - using logging; - using nuget; - using Environment = adapters.Environment; - public static class EnvironmentSettings { private const string SetEnvironmentMethod = "SetEnvironment"; @@ -45,7 +45,9 @@ private static IEnvironment Environment get { return _environmentInitializer.Value; } } +#pragma warning disable IDE0060 // Unused method parameter public static void ResetEnvironmentVariables(ChocolateyConfiguration config) +#pragma warning restore IDE0060 // Unused method parameter { Environment.SetEnvironmentVariable(ApplicationParameters.Environment.ChocolateyPackageInstallLocation, null); Environment.SetEnvironmentVariable(ApplicationParameters.Environment.ChocolateyPackageInstallerType, null); @@ -86,11 +88,30 @@ public static void SetEnvironmentVariables(ChocolateyConfiguration config) Environment.SetEnvironmentVariable("TEMP", config.CacheLocation); Environment.SetEnvironmentVariable("TMP", config.CacheLocation); - if (config.Debug) Environment.SetEnvironmentVariable("ChocolateyEnvironmentDebug", "true"); - if (config.Verbose) Environment.SetEnvironmentVariable("ChocolateyEnvironmentVerbose", "true"); - if (!config.Features.ChecksumFiles) Environment.SetEnvironmentVariable(ApplicationParameters.Environment.ChocolateyIgnoreChecksums, "true"); - if (config.Features.AllowEmptyChecksums) Environment.SetEnvironmentVariable(ApplicationParameters.Environment.ChocolateyAllowEmptyChecksums, "true"); - if (config.Features.AllowEmptyChecksumsSecure) Environment.SetEnvironmentVariable(ApplicationParameters.Environment.ChocolateyAllowEmptyChecksumsSecure, "true"); + if (config.Debug) + { + Environment.SetEnvironmentVariable("ChocolateyEnvironmentDebug", "true"); + } + + if (config.Verbose) + { + Environment.SetEnvironmentVariable("ChocolateyEnvironmentVerbose", "true"); + } + + if (!config.Features.ChecksumFiles) + { + Environment.SetEnvironmentVariable(ApplicationParameters.Environment.ChocolateyIgnoreChecksums, "true"); + } + + if (config.Features.AllowEmptyChecksums) + { + Environment.SetEnvironmentVariable(ApplicationParameters.Environment.ChocolateyAllowEmptyChecksums, "true"); + } + + if (config.Features.AllowEmptyChecksumsSecure) + { + Environment.SetEnvironmentVariable(ApplicationParameters.Environment.ChocolateyAllowEmptyChecksumsSecure, "true"); + } Environment.SetEnvironmentVariable("chocolateyRequestTimeout", config.WebRequestTimeoutSeconds.ToStringSafe() + "000"); @@ -123,12 +144,27 @@ public static void SetEnvironmentVariables(ChocolateyConfiguration config) } - if (config.Proxy.BypassOnLocal) Environment.SetEnvironmentVariable("chocolateyProxyBypassOnLocal", "true"); + if (config.Proxy.BypassOnLocal) + { + Environment.SetEnvironmentVariable("chocolateyProxyBypassOnLocal", "true"); + } + } + + if (config.Features.UsePowerShellHost) + { + Environment.SetEnvironmentVariable(ApplicationParameters.Environment.ChocolateyPowerShellHost, "true"); + } + + if (config.Force) + { + Environment.SetEnvironmentVariable(ApplicationParameters.Environment.ChocolateyForce, "true"); + } + + if (config.Features.ExitOnRebootDetected) + { + Environment.SetEnvironmentVariable(ApplicationParameters.Environment.ChocolateyExitOnRebootDetected, "true"); } - if (config.Features.UsePowerShellHost) Environment.SetEnvironmentVariable(ApplicationParameters.Environment.ChocolateyPowerShellHost, "true"); - if (config.Force) Environment.SetEnvironmentVariable(ApplicationParameters.Environment.ChocolateyForce, "true"); - if (config.Features.ExitOnRebootDetected) Environment.SetEnvironmentVariable(ApplicationParameters.Environment.ChocolateyExitOnRebootDetected, "true"); SetLicensedEnvironment(config); } @@ -149,27 +185,35 @@ private static void SetLicensedEnvironment(ChocolateyConfiguration config) if (licensedEnvironmentSettings == null) { - if (config.RegularOutput) "chocolatey".Log().Warn( + if (config.RegularOutput) + { + "chocolatey".Log().Warn( ChocolateyLoggers.Important, @"Unable to set licensed environment settings. Please upgrade to a newer licensed version (choco upgrade chocolatey.extension)."); + } + return; } try { - object componentClass = Activator.CreateInstance(licensedEnvironmentSettings); + var componentClass = Activator.CreateInstance(licensedEnvironmentSettings); licensedEnvironmentSettings.InvokeMember( SetEnvironmentMethod, BindingFlags.InvokeMethod, null, componentClass, - new Object[] { config } + new object[] { config } ); } catch (Exception ex) { var isDebug = ApplicationParameters.IsDebugModeCliPrimitive(); - if (config.Debug) isDebug = true; + if (config.Debug) + { + isDebug = true; + } + var message = isDebug ? ex.ToString() : ex.Message; if (isDebug && ex.InnerException != null) @@ -234,11 +278,21 @@ public static void UpdateEnvironmentVariables() "chocolatey".Log().Debug("Unable to determine current user to determine if LocalSystem account (to skip user env vars).{0} Reported error: {1}".FormatWith(Environment.NewLine, ex.Message)); } - if (setUserEnvironmentVariables) RefreshEnvironmentVariables(userVariables); + if (setUserEnvironmentVariables) + { + RefreshEnvironmentVariables(userVariables); + } // restore process overridden variables - if (originalEnvironmentVariables.Contains(ApplicationParameters.Environment.Username)) Environment.SetEnvironmentVariable(ApplicationParameters.Environment.Username, userName); - if (originalEnvironmentVariables.Contains(ApplicationParameters.Environment.ProcessorArchitecture)) Environment.SetEnvironmentVariable(ApplicationParameters.Environment.ProcessorArchitecture, architecture); + if (originalEnvironmentVariables.Contains(ApplicationParameters.Environment.Username)) + { + Environment.SetEnvironmentVariable(ApplicationParameters.Environment.Username, userName); + } + + if (originalEnvironmentVariables.Contains(ApplicationParameters.Environment.ProcessorArchitecture)) + { + Environment.SetEnvironmentVariable(ApplicationParameters.Environment.ProcessorArchitecture, architecture); + } // combine environment values that append together var updatedPath = "{0};{1};".FormatWith( @@ -257,7 +311,7 @@ public static void UpdateEnvironmentVariables() // add back in process items updatedPath += GetProcessOnlyItems(updatedPath, originalPath); updatedPathExt += GetProcessOnlyItems(updatedPathExt, originalPathExt); - updatedPsModulePath = "{0};{1}".FormatWith(GetProcessOnlyItems(updatedPsModulePath, originalPsModulePath),updatedPsModulePath); + updatedPsModulePath = "{0};{1}".FormatWith(GetProcessOnlyItems(updatedPsModulePath, originalPsModulePath), updatedPsModulePath); if (!updatedPsModulePath.ContainsSafe(ApplicationParameters.PowerShellModulePathProcessProgramFiles)) { @@ -281,7 +335,10 @@ public static void UpdateEnvironmentVariables() private static IDictionary ConvertToCaseInsensitiveDictionary(IDictionary originalDictionary) { - if (originalDictionary == null) return new Hashtable(new Dictionary(), StringComparer.OrdinalIgnoreCase); + if (originalDictionary == null) + { + return new Hashtable(new Dictionary(), StringComparer.OrdinalIgnoreCase); + } return new Hashtable(originalDictionary, StringComparer.OrdinalIgnoreCase); } @@ -302,7 +359,7 @@ private static string GetProcessOnlyItems(string currentValues, IEnumerable environment) @@ -330,6 +387,6 @@ public static void set_environment_variables(ChocolateyConfiguration config) [Obsolete("This overload is deprecated and will be removed in v3.")] public static void update_environment_variables() => UpdateEnvironmentVariables(); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/configuration/PackagesConfigFilePackageSetting.cs b/src/chocolatey/infrastructure.app/configuration/PackagesConfigFilePackageSetting.cs index 5c4e8d5c1c..2344a34a6a 100644 --- a/src/chocolatey/infrastructure.app/configuration/PackagesConfigFilePackageSetting.cs +++ b/src/chocolatey/infrastructure.app/configuration/PackagesConfigFilePackageSetting.cs @@ -14,11 +14,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Xml.Serialization; + namespace chocolatey.infrastructure.app.configuration { - using System; - using System.Xml.Serialization; - /// /// XML packages.config file package element /// @@ -58,7 +58,7 @@ public sealed class PackagesConfigFilePackageSetting [XmlAttribute(AttributeName = "pinPackage")] public bool PinPackage { get; set; } - + [System.ComponentModel.DefaultValue(-1)] [XmlAttribute(AttributeName = "executionTimeout")] public int ExecutionTimeout { get; set; } diff --git a/src/chocolatey/infrastructure.app/configuration/PackagesConfigFileSettings.cs b/src/chocolatey/infrastructure.app/configuration/PackagesConfigFileSettings.cs index a2061d1364..1439933e59 100644 --- a/src/chocolatey/infrastructure.app/configuration/PackagesConfigFileSettings.cs +++ b/src/chocolatey/infrastructure.app/configuration/PackagesConfigFileSettings.cs @@ -14,12 +14,12 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Xml.Serialization; + namespace chocolatey.infrastructure.app.configuration { - using System; - using System.Collections.Generic; - using System.Xml.Serialization; - /// /// XML packages.config configuration file /// diff --git a/src/chocolatey/infrastructure.app/domain/ApiKeyCommandType.cs b/src/chocolatey/infrastructure.app/domain/ApiKeyCommandType.cs index 8ed9f79406..17bac25ae7 100644 --- a/src/chocolatey/infrastructure.app/domain/ApiKeyCommandType.cs +++ b/src/chocolatey/infrastructure.app/domain/ApiKeyCommandType.cs @@ -1,25 +1,25 @@ -// Copyright © 2023 Chocolatey Software, Inc -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -namespace chocolatey.infrastructure.app.domain -{ - public enum ApiKeyCommandType - { - Unknown, - List, - Add, - Remove, - } -} +// Copyright © 2023 Chocolatey Software, Inc +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +namespace chocolatey.infrastructure.app.domain +{ + public enum ApiKeyCommandType + { + Unknown, + List, + Add, + Remove, + } +} diff --git a/src/chocolatey/infrastructure.app/domain/ChocolateyPackageInformation.cs b/src/chocolatey/infrastructure.app/domain/ChocolateyPackageInformation.cs index 3fb1f5fe54..9fb89fd800 100644 --- a/src/chocolatey/infrastructure.app/domain/ChocolateyPackageInformation.cs +++ b/src/chocolatey/infrastructure.app/domain/ChocolateyPackageInformation.cs @@ -14,13 +14,13 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using NuGet.Packaging; +using NuGet.Versioning; +using chocolatey.infrastructure.results; + namespace chocolatey.infrastructure.app.domain { - using System; - using NuGet.Packaging; - using NuGet.Versioning; - using results; - public sealed class ChocolateyPackageInformation { public ChocolateyPackageInformation(IPackageMetadata package) @@ -36,5 +36,6 @@ public ChocolateyPackageInformation(IPackageMetadata package) public bool HasSilentUninstall { get; set; } public bool IsPinned { get; set; } public string ExtraInformation { get; set; } + public string DeploymentLocation { get; set; } } } diff --git a/src/chocolatey/infrastructure.app/domain/ChocolateyPackageMetadata.cs b/src/chocolatey/infrastructure.app/domain/ChocolateyPackageMetadata.cs index 2ec61e67f5..a776bdc434 100644 --- a/src/chocolatey/infrastructure.app/domain/ChocolateyPackageMetadata.cs +++ b/src/chocolatey/infrastructure.app/domain/ChocolateyPackageMetadata.cs @@ -15,17 +15,16 @@ // limitations under the License. using System; +using System.Collections.Generic; +using NuGet.Configuration; +using NuGet.Packaging; +using NuGet.Packaging.Core; +using NuGet.Versioning; +using IFileSystem = chocolatey.infrastructure.filesystem.IFileSystem; namespace chocolatey.infrastructure.app.domain { - using System.Collections.Generic; - using NuGet.Configuration; - using NuGet.Packaging; - using NuGet.Packaging.Core; - using NuGet.Versioning; - using IFileSystem = filesystem.IFileSystem; - - public class ChocolateyPackageMetadata : IPackageMetadata + public class ChocolateyPackageMetadata : IPackageMetadata { public ChocolateyPackageMetadata(NuspecReader reader) { @@ -186,11 +185,39 @@ public ChocolateyPackageMetadata(string packagePath, IFileSystem filesystem) public string Copyright { get; } public string Icon { get; } public string Readme { get; } - public IEnumerable FrameworkReferences => null; - public IEnumerable PackageAssemblyReferences => null; + public IEnumerable FrameworkReferences + { + get + { + return null; + } + } + + public IEnumerable PackageAssemblyReferences + { + get + { + return null; + } + } + public IEnumerable DependencyGroups { get; } - public Version MinClientVersion => null; - public IEnumerable ContentFiles => null; + public Version MinClientVersion + { + get + { + return null; + } + } + + public IEnumerable ContentFiles + { + get + { + return null; + } + } + public IEnumerable PackageTypes { get; } public RepositoryMetadata Repository { get; } public LicenseMetadata LicenseMetadata { get; } diff --git a/src/chocolatey/infrastructure.app/domain/CommandNameType.cs b/src/chocolatey/infrastructure.app/domain/CommandNameType.cs index 55a9d6f7fb..f2dda6b4e9 100644 --- a/src/chocolatey/infrastructure.app/domain/CommandNameType.cs +++ b/src/chocolatey/infrastructure.app/domain/CommandNameType.cs @@ -14,10 +14,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; + namespace chocolatey.infrastructure.app.domain { - using System; - public enum CommandNameType { List, @@ -25,7 +25,7 @@ public enum CommandNameType Upgrade, Uninstall, -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] list = List, [Obsolete("This overload is deprecated and will be removed in v3.")] @@ -34,6 +34,6 @@ public enum CommandNameType upgrade = Upgrade, [Obsolete("This overload is deprecated and will be removed in v3.")] uninstall = Uninstall, -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/domain/ConfigCommandType.cs b/src/chocolatey/infrastructure.app/domain/ConfigCommandType.cs index b82ef2d17b..1998f4537d 100644 --- a/src/chocolatey/infrastructure.app/domain/ConfigCommandType.cs +++ b/src/chocolatey/infrastructure.app/domain/ConfigCommandType.cs @@ -14,10 +14,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; + namespace chocolatey.infrastructure.app.domain { - using System; - public enum ConfigCommandType { Unknown, @@ -26,7 +26,7 @@ public enum ConfigCommandType Set, Unset, -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] unknown = Unknown, [Obsolete("This overload is deprecated and will be removed in v3.")] @@ -37,6 +37,6 @@ public enum ConfigCommandType set = Set, [Obsolete("This overload is deprecated and will be removed in v3.")] unset = Unset, -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/domain/FeatureCommandType.cs b/src/chocolatey/infrastructure.app/domain/FeatureCommandType.cs index f91ac060b4..4fec0c36cf 100644 --- a/src/chocolatey/infrastructure.app/domain/FeatureCommandType.cs +++ b/src/chocolatey/infrastructure.app/domain/FeatureCommandType.cs @@ -14,10 +14,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; + namespace chocolatey.infrastructure.app.domain { - using System; - public enum FeatureCommandType { Unknown, @@ -26,7 +26,7 @@ public enum FeatureCommandType Enable, Disable, -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] unknown = Unknown, [Obsolete("This overload is deprecated and will be removed in v3.")] @@ -35,6 +35,6 @@ public enum FeatureCommandType enable = Enable, [Obsolete("This overload is deprecated and will be removed in v3.")] disable = Disable, -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/domain/GenericRegistryKey.cs b/src/chocolatey/infrastructure.app/domain/GenericRegistryKey.cs index 95650d1404..574cb2cfba 100644 --- a/src/chocolatey/infrastructure.app/domain/GenericRegistryKey.cs +++ b/src/chocolatey/infrastructure.app/domain/GenericRegistryKey.cs @@ -14,11 +14,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System.Collections.Generic; +using Microsoft.Win32; + namespace chocolatey.infrastructure.app.domain { - using System.Collections.Generic; - using Microsoft.Win32; - public class GenericRegistryKey { public string Name { get; set; } diff --git a/src/chocolatey/infrastructure.app/domain/GenericRegistryValue.cs b/src/chocolatey/infrastructure.app/domain/GenericRegistryValue.cs index b428968ad1..979da4a7ab 100644 --- a/src/chocolatey/infrastructure.app/domain/GenericRegistryValue.cs +++ b/src/chocolatey/infrastructure.app/domain/GenericRegistryValue.cs @@ -14,10 +14,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; + namespace chocolatey.infrastructure.app.domain { - using System; - public class GenericRegistryValue : IEquatable { public string ParentKeyName { get; set; } @@ -40,7 +40,10 @@ public override bool Equals(object obj) bool IEquatable.Equals(GenericRegistryValue other) { - if (other == null) return false; + if (other == null) + { + return false; + } return ParentKeyName.IsEqualTo(other.ParentKeyName) && Name.IsEqualTo(other.Name) diff --git a/src/chocolatey/infrastructure.app/domain/InstallTokens.cs b/src/chocolatey/infrastructure.app/domain/InstallTokens.cs index a72bc64045..095fd42fe5 100644 --- a/src/chocolatey/infrastructure.app/domain/InstallTokens.cs +++ b/src/chocolatey/infrastructure.app/domain/InstallTokens.cs @@ -14,10 +14,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; + namespace chocolatey.infrastructure.app.domain { - using System; - public static class InstallTokens { public const string InstallerLocation = "{{INSTALLER_LOCATION}}"; @@ -27,7 +27,7 @@ public static class InstallTokens public const string UninstallerLocation = "{{UNINSTALLER_LOCATION}}"; public const string TempLocation = "{{TEMP_LOCATION}}"; -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public const string INSTALLER_LOCATION = InstallerLocation; [Obsolete("This overload is deprecated and will be removed in v3.")] @@ -40,6 +40,6 @@ public static class InstallTokens public const string UNINSTALLER_LOCATION = UninstallerLocation; [Obsolete("This overload is deprecated and will be removed in v3.")] public const string TEMP_LOCATION = TempLocation; -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/domain/PackageFile.cs b/src/chocolatey/infrastructure.app/domain/PackageFile.cs index eb3ccc689c..dfc62d5628 100644 --- a/src/chocolatey/infrastructure.app/domain/PackageFile.cs +++ b/src/chocolatey/infrastructure.app/domain/PackageFile.cs @@ -14,11 +14,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Xml.Serialization; + namespace chocolatey.infrastructure.app.domain { - using System; - using System.Xml.Serialization; - /// /// A package file in the snapshot. /// diff --git a/src/chocolatey/infrastructure.app/domain/PackageFiles.cs b/src/chocolatey/infrastructure.app/domain/PackageFiles.cs index bc6b333cec..2da84e1fa8 100644 --- a/src/chocolatey/infrastructure.app/domain/PackageFiles.cs +++ b/src/chocolatey/infrastructure.app/domain/PackageFiles.cs @@ -14,13 +14,13 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Linq; +using System.Xml.Serialization; + namespace chocolatey.infrastructure.app.domain { - using System; - using System.Collections.Generic; - using System.Linq; - using System.Xml.Serialization; - /// /// The package files snapshot /// diff --git a/src/chocolatey/infrastructure.app/domain/PinCommandType.cs b/src/chocolatey/infrastructure.app/domain/PinCommandType.cs index 92aa9b4ff2..5d14640175 100644 --- a/src/chocolatey/infrastructure.app/domain/PinCommandType.cs +++ b/src/chocolatey/infrastructure.app/domain/PinCommandType.cs @@ -14,10 +14,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; + namespace chocolatey.infrastructure.app.domain { - using System; - public enum PinCommandType { Unknown, @@ -25,7 +25,7 @@ public enum PinCommandType Add, Remove, -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] unknown = Unknown, [Obsolete("This overload is deprecated and will be removed in v3.")] @@ -34,6 +34,6 @@ public enum PinCommandType add = Add, [Obsolete("This overload is deprecated and will be removed in v3.")] remove = Remove, -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/domain/Registry.cs b/src/chocolatey/infrastructure.app/domain/Registry.cs index 68d63d7d39..9535eb32b5 100644 --- a/src/chocolatey/infrastructure.app/domain/Registry.cs +++ b/src/chocolatey/infrastructure.app/domain/Registry.cs @@ -14,13 +14,13 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Linq; +using System.Xml.Serialization; + namespace chocolatey.infrastructure.app.domain { - using System; - using System.Collections.Generic; - using System.Linq; - using System.Xml.Serialization; - /// /// The installer registry as a snapshot /// diff --git a/src/chocolatey/infrastructure.app/domain/RegistryApplicationKey.cs b/src/chocolatey/infrastructure.app/domain/RegistryApplicationKey.cs index dc49cef296..86db5de414 100644 --- a/src/chocolatey/infrastructure.app/domain/RegistryApplicationKey.cs +++ b/src/chocolatey/infrastructure.app/domain/RegistryApplicationKey.cs @@ -14,13 +14,13 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Xml.Serialization; +using Microsoft.Win32; +using chocolatey.infrastructure.xml; + namespace chocolatey.infrastructure.app.domain { - using System; - using System.Xml.Serialization; - using Microsoft.Win32; - using xml; - [Serializable] [XmlType("key")] public class RegistryApplicationKey : IEquatable @@ -107,14 +107,20 @@ public override int GetHashCode() public override bool Equals(object obj) { - if (ReferenceEquals(this, obj)) return true; + if (ReferenceEquals(this, obj)) + { + return true; + } return Equals(obj as RegistryApplicationKey); } bool IEquatable.Equals(RegistryApplicationKey other) { - if (ReferenceEquals(other, null)) return false; + if (other is null) + { + return false; + } return DisplayName.ToStringSafe().IsEqualTo(other.DisplayName) && DisplayVersion.IsEqualTo(other.DisplayVersion) @@ -123,10 +129,10 @@ bool IEquatable.Equals(RegistryApplicationKey other) ; } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public bool is_in_programs_and_features() => IsInProgramsAndFeatures(); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/domain/RegistryValueExtensions.cs b/src/chocolatey/infrastructure.app/domain/RegistryValueExtensions.cs index 7a3f6e1860..7e72f06526 100644 --- a/src/chocolatey/infrastructure.app/domain/RegistryValueExtensions.cs +++ b/src/chocolatey/infrastructure.app/domain/RegistryValueExtensions.cs @@ -14,17 +14,20 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Security; +using Microsoft.Win32; + namespace chocolatey.infrastructure.app.domain { - using System; - using System.Security; - using Microsoft.Win32; - public static class RegistryValueExtensions { public static string AsXmlSafeString(this RegistryKey key, string name) { - if (key == null) return string.Empty; + if (key == null) + { + return string.Empty; + } // Since it is possible that registry keys contain characters that are not valid // in XML files, ensure that all content is escaped, prior to serialization @@ -35,10 +38,10 @@ public static string AsXmlSafeString(this RegistryKey key, string name) .Replace("\0", string.Empty); } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public static string get_value_as_string(this RegistryKey key, string name) => AsXmlSafeString(key, name); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/domain/SourceCommandType.cs b/src/chocolatey/infrastructure.app/domain/SourceCommandType.cs index a8020de803..e1b25a1005 100644 --- a/src/chocolatey/infrastructure.app/domain/SourceCommandType.cs +++ b/src/chocolatey/infrastructure.app/domain/SourceCommandType.cs @@ -14,10 +14,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; + namespace chocolatey.infrastructure.app.domain { - using System; - public enum SourceCommandType { Unknown, @@ -27,7 +27,7 @@ public enum SourceCommandType Enable, Disable, -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] unknown = Unknown, [Obsolete("This overload is deprecated and will be removed in v3.")] @@ -40,6 +40,6 @@ public enum SourceCommandType enable = Enable, [Obsolete("This overload is deprecated and will be removed in v3.")] disable = Disable, -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/domain/SourceType.cs b/src/chocolatey/infrastructure.app/domain/SourceType.cs index a9beab9cb0..6eefe41cee 100644 --- a/src/chocolatey/infrastructure.app/domain/SourceType.cs +++ b/src/chocolatey/infrastructure.app/domain/SourceType.cs @@ -14,12 +14,12 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; + namespace chocolatey.infrastructure.app.domain { - using System; - /// - /// Special source modifiers that use alternate sources for packages + /// Special source modifiers that use alternative sources for packages /// [Obsolete("This source type is no longer used, and only provided for backwards compatibility, instead use SourceTypes class instead.")] public enum SourceType diff --git a/src/chocolatey/infrastructure.app/domain/SourceTypes.cs b/src/chocolatey/infrastructure.app/domain/SourceTypes.cs index 8299e528fc..a87ed5cd2f 100644 --- a/src/chocolatey/infrastructure.app/domain/SourceTypes.cs +++ b/src/chocolatey/infrastructure.app/domain/SourceTypes.cs @@ -14,10 +14,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; + namespace chocolatey.infrastructure.app.domain { - using System; - /// /// This class contains the default source types that are implemented in /// the Chocolatey CLI codebase. This is replacing the enumeration previously @@ -60,7 +60,7 @@ public static class SourceTypes /// public const string WindowsFeatures = "windowsfeatures"; -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public const string CYGWIN = Cygwin; [Obsolete("This overload is deprecated and will be removed in v3.")] @@ -73,6 +73,6 @@ public static class SourceTypes public const string WINDOWS_FEATURE = WindowsFeature; [Obsolete("This overload is deprecated and will be removed in v3.")] public const string WINDOWS_FEATURES = WindowsFeatures; -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/domain/TemplateCommandType.cs b/src/chocolatey/infrastructure.app/domain/TemplateCommandType.cs index 38b0321b63..8ae72d54b4 100644 --- a/src/chocolatey/infrastructure.app/domain/TemplateCommandType.cs +++ b/src/chocolatey/infrastructure.app/domain/TemplateCommandType.cs @@ -1,36 +1,36 @@ -// Copyright © 2017 - 2021 Chocolatey Software, Inc -// Copyright © 2011 - 2017 RealDimensions Software, LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -namespace chocolatey.infrastructure.app.domain -{ - using System; - - public enum TemplateCommandType - { - Unknown, - List, - Info, - -#pragma warning disable IDE1006 - [Obsolete("This overload is deprecated and will be removed in v3.")] - unknown = Unknown, - [Obsolete("This overload is deprecated and will be removed in v3.")] - list = List, - [Obsolete("This overload is deprecated and will be removed in v3.")] - info = Info, -#pragma warning restore IDE1006 - } -} +// Copyright © 2017 - 2021 Chocolatey Software, Inc +// Copyright © 2011 - 2017 RealDimensions Software, LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +using System; + +namespace chocolatey.infrastructure.app.domain +{ + public enum TemplateCommandType + { + Unknown, + List, + Info, + +#pragma warning disable IDE0022, IDE1006 + [Obsolete("This overload is deprecated and will be removed in v3.")] + unknown = Unknown, + [Obsolete("This overload is deprecated and will be removed in v3.")] + list = List, + [Obsolete("This overload is deprecated and will be removed in v3.")] + info = Info, +#pragma warning restore IDE0022, IDE1006 + } +} diff --git a/src/chocolatey/infrastructure.app/domain/installers/BitRockInstaller.cs b/src/chocolatey/infrastructure.app/domain/installers/BitRockInstaller.cs index 49fb3f8cec..0dae42f8c2 100644 --- a/src/chocolatey/infrastructure.app/domain/installers/BitRockInstaller.cs +++ b/src/chocolatey/infrastructure.app/domain/installers/BitRockInstaller.cs @@ -14,10 +14,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System.Collections.Generic; + namespace chocolatey.infrastructure.app.domain.installers { - using System.Collections.Generic; - /// /// BitRock Installer Options /// diff --git a/src/chocolatey/infrastructure.app/domain/installers/CustomInstaller.cs b/src/chocolatey/infrastructure.app/domain/installers/CustomInstaller.cs index be9c4c351d..fc6e977c67 100644 --- a/src/chocolatey/infrastructure.app/domain/installers/CustomInstaller.cs +++ b/src/chocolatey/infrastructure.app/domain/installers/CustomInstaller.cs @@ -14,11 +14,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; + namespace chocolatey.infrastructure.app.domain.installers { - using System; - using System.Collections.Generic; - public class CustomInstaller : InstallerBase { public CustomInstaller() @@ -44,8 +44,15 @@ public override InstallerType InstallerType public override string BuildInstallCommandArguments(bool logFile, bool customInstallLocation, bool languageRequested) { - if (customInstallLocation) this.Log().Warn("CustomInstaller doesn't support custom install locations."); - if (languageRequested) this.Log().Warn("CustomInstaller doesn't support custom language options."); + if (customInstallLocation) + { + this.Log().Warn("CustomInstaller doesn't support custom install locations."); + } + + if (languageRequested) + { + this.Log().Warn("CustomInstaller doesn't support custom language options."); + } return string.Empty; } diff --git a/src/chocolatey/infrastructure.app/domain/installers/GhostInstaller.cs b/src/chocolatey/infrastructure.app/domain/installers/GhostInstaller.cs index dfd05ade8f..4c128c2d23 100644 --- a/src/chocolatey/infrastructure.app/domain/installers/GhostInstaller.cs +++ b/src/chocolatey/infrastructure.app/domain/installers/GhostInstaller.cs @@ -14,10 +14,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System.Collections.Generic; + namespace chocolatey.infrastructure.app.domain.installers { - using System.Collections.Generic; - /// /// Ghost Installer Options /// diff --git a/src/chocolatey/infrastructure.app/domain/installers/IInstaller.cs b/src/chocolatey/infrastructure.app/domain/installers/IInstaller.cs index 785e5671ed..14a388db4c 100644 --- a/src/chocolatey/infrastructure.app/domain/installers/IInstaller.cs +++ b/src/chocolatey/infrastructure.app/domain/installers/IInstaller.cs @@ -14,11 +14,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; + namespace chocolatey.infrastructure.app.domain.installers { - using System; - using System.Collections.Generic; - public interface IInstaller { InstallerType InstallerType { get; } @@ -38,12 +38,12 @@ public interface IInstaller string BuildInstallCommandArguments(bool logFile, bool customInstallLocation, bool languageRequested); string BuildUninstallCommandArguments(); -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] string build_install_command_arguments(bool logFile, bool customInstallLocation, bool languageRequested); [Obsolete("This overload is deprecated and will be removed in v3.")] string build_uninstall_command_arguments(); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/domain/installers/InnoSetupInstaller.cs b/src/chocolatey/infrastructure.app/domain/installers/InnoSetupInstaller.cs index 96ce3859c6..14b4ee0976 100644 --- a/src/chocolatey/infrastructure.app/domain/installers/InnoSetupInstaller.cs +++ b/src/chocolatey/infrastructure.app/domain/installers/InnoSetupInstaller.cs @@ -14,10 +14,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System.Collections.Generic; + namespace chocolatey.infrastructure.app.domain.installers { - using System.Collections.Generic; - /// /// InnoSetup Installer Options /// diff --git a/src/chocolatey/infrastructure.app/domain/installers/InstallForJInstaller.cs b/src/chocolatey/infrastructure.app/domain/installers/InstallForJInstaller.cs index 7136efcc01..6d269f6809 100644 --- a/src/chocolatey/infrastructure.app/domain/installers/InstallForJInstaller.cs +++ b/src/chocolatey/infrastructure.app/domain/installers/InstallForJInstaller.cs @@ -14,10 +14,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System.Collections.Generic; + namespace chocolatey.infrastructure.app.domain.installers { - using System.Collections.Generic; - /// /// InstallForJ Installer Options /// diff --git a/src/chocolatey/infrastructure.app/domain/installers/InstallShieldInstaller.cs b/src/chocolatey/infrastructure.app/domain/installers/InstallShieldInstaller.cs index d935eca87f..27cc71dee5 100644 --- a/src/chocolatey/infrastructure.app/domain/installers/InstallShieldInstaller.cs +++ b/src/chocolatey/infrastructure.app/domain/installers/InstallShieldInstaller.cs @@ -14,10 +14,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System.Collections.Generic; + namespace chocolatey.infrastructure.app.domain.installers { - using System.Collections.Generic; - /// /// InstallShield Installer Options /// diff --git a/src/chocolatey/infrastructure.app/domain/installers/InstallerBase.cs b/src/chocolatey/infrastructure.app/domain/installers/InstallerBase.cs index 8682e11c74..29e9ef830a 100644 --- a/src/chocolatey/infrastructure.app/domain/installers/InstallerBase.cs +++ b/src/chocolatey/infrastructure.app/domain/installers/InstallerBase.cs @@ -14,12 +14,12 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Text; + namespace chocolatey.infrastructure.app.domain.installers { - using System; - using System.Collections.Generic; - using System.Text; - public abstract class InstallerBase : IInstaller { public abstract InstallerType InstallerType { get; } @@ -41,11 +41,20 @@ public virtual string BuildInstallCommandArguments(bool logFile, bool customInst { var args = new StringBuilder(); args.Append("{0} {1} {2}".FormatWith(SilentInstall, NoReboot, OtherInstallOptions).TrimSafe()); - if (languageRequested) args.AppendFormat(" {0}", Language); + if (languageRequested) + { + args.AppendFormat(" {0}", Language); + } //MSI may have issues with 1622 - opening a log file location - if (logFile) args.AppendFormat(" {0}", LogFile); + if (logFile) + { + args.AppendFormat(" {0}", LogFile); + } // custom install location must be last for NSIS - if (customInstallLocation) args.AppendFormat(" {0}", CustomInstallLocation); + if (customInstallLocation) + { + args.AppendFormat(" {0}", CustomInstallLocation); + } return args.ToString(); } @@ -56,7 +65,7 @@ public virtual string BuildUninstallCommandArguments() return "{0} {1} {2}".FormatWith(SilentUninstall, NoReboot, OtherUninstallOptions).TrimSafe(); } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public virtual string build_install_command_arguments(bool logFile, bool customInstallLocation, bool languageRequested) => BuildInstallCommandArguments(logFile, customInstallLocation, languageRequested); @@ -64,7 +73,7 @@ public virtual string build_install_command_arguments(bool logFile, bool customI [Obsolete("This overload is deprecated and will be removed in v3.")] public virtual string build_uninstall_command_arguments() => BuildUninstallCommandArguments(); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/domain/installers/IzPackInstaller.cs b/src/chocolatey/infrastructure.app/domain/installers/IzPackInstaller.cs index 1c796619cd..999c534703 100644 --- a/src/chocolatey/infrastructure.app/domain/installers/IzPackInstaller.cs +++ b/src/chocolatey/infrastructure.app/domain/installers/IzPackInstaller.cs @@ -14,10 +14,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System.Collections.Generic; + namespace chocolatey.infrastructure.app.domain.installers { - using System.Collections.Generic; - /// /// izPack Installer Options /// diff --git a/src/chocolatey/infrastructure.app/domain/installers/MsiInstaller.cs b/src/chocolatey/infrastructure.app/domain/installers/MsiInstaller.cs index c5a8bdb986..1c64f1ace3 100644 --- a/src/chocolatey/infrastructure.app/domain/installers/MsiInstaller.cs +++ b/src/chocolatey/infrastructure.app/domain/installers/MsiInstaller.cs @@ -14,10 +14,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System.Collections.Generic; + namespace chocolatey.infrastructure.app.domain.installers { - using System.Collections.Generic; - /// /// Windows Installer (MsiExec) Options /// @@ -47,7 +47,7 @@ public MsiInstaller() OtherInstallOptions = "ALLUSERS=1 DISABLEDESKTOPSHORTCUT=1 ADDDESKTOPICON=0 ADDSTARTMENU=0"; UninstallExecutable = "msiexec.exe"; //todo: eventually will need this - //SilentUninstall = "/qn /x{0}".format_with(InstallTokens.UNINSTALLER_LOCATION); + //SilentUninstall = "/qn /x{0}".FormatWith(InstallTokens.UNINSTALLER_LOCATION); SilentUninstall = "/qn"; OtherUninstallOptions = ""; // https://msdn.microsoft.com/en-us/library/aa376931.aspx diff --git a/src/chocolatey/infrastructure.app/domain/installers/MsiPatchInstaller.cs b/src/chocolatey/infrastructure.app/domain/installers/MsiPatchInstaller.cs index a93f2722b1..77c214f8eb 100644 --- a/src/chocolatey/infrastructure.app/domain/installers/MsiPatchInstaller.cs +++ b/src/chocolatey/infrastructure.app/domain/installers/MsiPatchInstaller.cs @@ -14,10 +14,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System.Collections.Generic; + namespace chocolatey.infrastructure.app.domain.installers { - using System.Collections.Generic; - public class MsiPatchInstaller : InstallerBase { public MsiPatchInstaller() diff --git a/src/chocolatey/infrastructure.app/domain/installers/NsisInstaller.cs b/src/chocolatey/infrastructure.app/domain/installers/NsisInstaller.cs index ca7a4c2673..f930a9accb 100644 --- a/src/chocolatey/infrastructure.app/domain/installers/NsisInstaller.cs +++ b/src/chocolatey/infrastructure.app/domain/installers/NsisInstaller.cs @@ -14,10 +14,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System.Collections.Generic; + namespace chocolatey.infrastructure.app.domain.installers { - using System.Collections.Generic; - /// /// NSIS Installer Options /// diff --git a/src/chocolatey/infrastructure.app/domain/installers/PackageForTheWebInstaller.cs b/src/chocolatey/infrastructure.app/domain/installers/PackageForTheWebInstaller.cs index 8569026572..008dba2ace 100644 --- a/src/chocolatey/infrastructure.app/domain/installers/PackageForTheWebInstaller.cs +++ b/src/chocolatey/infrastructure.app/domain/installers/PackageForTheWebInstaller.cs @@ -14,10 +14,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System.Collections.Generic; + namespace chocolatey.infrastructure.app.domain.installers { - using System.Collections.Generic; - /// /// PackageForTheWeb Options /// diff --git a/src/chocolatey/infrastructure.app/domain/installers/QtInstaller.cs b/src/chocolatey/infrastructure.app/domain/installers/QtInstaller.cs index fb21501619..5fbc86db6d 100644 --- a/src/chocolatey/infrastructure.app/domain/installers/QtInstaller.cs +++ b/src/chocolatey/infrastructure.app/domain/installers/QtInstaller.cs @@ -14,10 +14,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System.Collections.Generic; + namespace chocolatey.infrastructure.app.domain.installers { - using System.Collections.Generic; - /// /// QT Installer Options /// @@ -34,7 +34,7 @@ public QtInstaller() NoReboot = ""; LogFile = ""; //http://doc.qt.io/qtinstallerframework/ifw-globalconfig.html - //CustomInstallLocation = "targetdir={0}".format_with(InstallTokens.CUSTOM_INSTALL_LOCATION); + //CustomInstallLocation = "targetdir={0}".FormatWith(InstallTokens.CUSTOM_INSTALL_LOCATION); CustomInstallLocation = ""; Language = ""; OtherInstallOptions = ""; diff --git a/src/chocolatey/infrastructure.app/domain/installers/SetupFactoryInstaller.cs b/src/chocolatey/infrastructure.app/domain/installers/SetupFactoryInstaller.cs index a41dd41f8a..cd4f5044b8 100644 --- a/src/chocolatey/infrastructure.app/domain/installers/SetupFactoryInstaller.cs +++ b/src/chocolatey/infrastructure.app/domain/installers/SetupFactoryInstaller.cs @@ -14,10 +14,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System.Collections.Generic; + namespace chocolatey.infrastructure.app.domain.installers { - using System.Collections.Generic; - /// /// SetupFactory Options /// @@ -40,7 +40,7 @@ public SetupFactoryInstaller() // todo: #2582 basically we need an environment variable for AppFolder CustomInstallLocation = ""; Language = ""; - //OtherInstallOptions = "\"/T:{0}\"".format_with(InstallTokens.TEMP_LOCATION); + //OtherInstallOptions = "\"/T:{0}\"".FormatWith(InstallTokens.TEMP_LOCATION); OtherInstallOptions = ""; UninstallExecutable = "\"{0}\"".FormatWith(InstallTokens.UninstallerLocation); SilentUninstall = "/S"; diff --git a/src/chocolatey/infrastructure.app/domain/installers/SquirrelInstaller.cs b/src/chocolatey/infrastructure.app/domain/installers/SquirrelInstaller.cs index 225f19a9b9..19918fe648 100644 --- a/src/chocolatey/infrastructure.app/domain/installers/SquirrelInstaller.cs +++ b/src/chocolatey/infrastructure.app/domain/installers/SquirrelInstaller.cs @@ -14,10 +14,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System.Collections.Generic; + namespace chocolatey.infrastructure.app.domain.installers { - using System.Collections.Generic; - /// /// Squirrel Installer Options /// diff --git a/src/chocolatey/infrastructure.app/domain/installers/WindowsUpdateInstaller.cs b/src/chocolatey/infrastructure.app/domain/installers/WindowsUpdateInstaller.cs index 961cb9f7b8..61f4247fac 100644 --- a/src/chocolatey/infrastructure.app/domain/installers/WindowsUpdateInstaller.cs +++ b/src/chocolatey/infrastructure.app/domain/installers/WindowsUpdateInstaller.cs @@ -14,10 +14,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System.Collections.Generic; + namespace chocolatey.infrastructure.app.domain.installers { - using System.Collections.Generic; - /// /// Windows Update Installer (msu) /// diff --git a/src/chocolatey/infrastructure.app/domain/installers/WiseInstaller.cs b/src/chocolatey/infrastructure.app/domain/installers/WiseInstaller.cs index dbec70b392..1f80029b83 100644 --- a/src/chocolatey/infrastructure.app/domain/installers/WiseInstaller.cs +++ b/src/chocolatey/infrastructure.app/domain/installers/WiseInstaller.cs @@ -14,10 +14,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System.Collections.Generic; + namespace chocolatey.infrastructure.app.domain.installers { - using System.Collections.Generic; - /// /// WISE Options /// diff --git a/src/chocolatey/infrastructure.app/events/HandlePackageResultCompletedMessage.cs b/src/chocolatey/infrastructure.app/events/HandlePackageResultCompletedMessage.cs index 1726534d08..61b19f9861 100644 --- a/src/chocolatey/infrastructure.app/events/HandlePackageResultCompletedMessage.cs +++ b/src/chocolatey/infrastructure.app/events/HandlePackageResultCompletedMessage.cs @@ -14,13 +14,13 @@ // See the License for the specific language governing permissions and // limitations under the License. +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.domain; +using chocolatey.infrastructure.events; +using chocolatey.infrastructure.results; + namespace chocolatey.infrastructure.app.events { - using configuration; - using domain; - using infrastructure.events; - using results; - public class HandlePackageResultCompletedMessage : IMessage { public PackageResult PackageResult { get; private set; } diff --git a/src/chocolatey/infrastructure.app/events/PostRunMessage.cs b/src/chocolatey/infrastructure.app/events/PostRunMessage.cs index 32b8aaf3c2..46c6b30415 100644 --- a/src/chocolatey/infrastructure.app/events/PostRunMessage.cs +++ b/src/chocolatey/infrastructure.app/events/PostRunMessage.cs @@ -14,19 +14,19 @@ // See the License for the specific language governing permissions and // limitations under the License. +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.commands; +using chocolatey.infrastructure.events; + namespace chocolatey.infrastructure.app.events { - using configuration; - using infrastructure.commands; - using infrastructure.events; - public class PostRunMessage : IMessage { public ChocolateyConfiguration Configuration { get; private set; } public PostRunMessage(ChocolateyConfiguration configuration) { - this.Configuration = configuration; + Configuration = configuration; } } @@ -39,7 +39,7 @@ public class PostRunMessage : IMessage where TCommand : ICommand public PostRunMessage(TCommand command, ChocolateyConfiguration configuration, object[] state) { Command = command; - this.Configuration = configuration; + Configuration = configuration; State = state; } } diff --git a/src/chocolatey/infrastructure.app/events/PreRunMessage.cs b/src/chocolatey/infrastructure.app/events/PreRunMessage.cs index 344db88558..ffa96a87e8 100644 --- a/src/chocolatey/infrastructure.app/events/PreRunMessage.cs +++ b/src/chocolatey/infrastructure.app/events/PreRunMessage.cs @@ -14,19 +14,19 @@ // See the License for the specific language governing permissions and // limitations under the License. +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.commands; +using chocolatey.infrastructure.events; + namespace chocolatey.infrastructure.app.events { - using configuration; - using infrastructure.commands; - using infrastructure.events; - public class PreRunMessage : IMessage { public ChocolateyConfiguration Configuration { get; private set; } public PreRunMessage(ChocolateyConfiguration configuration) { - this.Configuration = configuration; + Configuration = configuration; } } @@ -39,7 +39,7 @@ public class PreRunMessage : IMessage where TCommand : ICommand public PreRunMessage(TCommand command, ChocolateyConfiguration configuration, object[] state) { Command = command; - this.Configuration = configuration; + Configuration = configuration; State = state; } } diff --git a/src/chocolatey/infrastructure.app/nuget/ChocolateyLocalPackageRepository.cs b/src/chocolatey/infrastructure.app/nuget/ChocolateyLocalPackageRepository.cs index 47411b1032..fc59d71869 100644 --- a/src/chocolatey/infrastructure.app/nuget/ChocolateyLocalPackageRepository.cs +++ b/src/chocolatey/infrastructure.app/nuget/ChocolateyLocalPackageRepository.cs @@ -14,19 +14,20 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.Versioning; +using System.Threading; +using chocolatey.infrastructure.filesystem; +using NuGet.Common; +using NuGet.Packaging; +using NuGet.ProjectManagement; +using NuGet.Versioning; + namespace chocolatey.infrastructure.app.nuget { - using System; - using System.Collections.Generic; - using System.IO; - using System.Linq; - using System.Runtime.Versioning; - using System.Threading; - using filesystem; - using NuGet.Common; - using NuGet.Packaging; - using NuGet.ProjectManagement; - using NuGet.Versioning; // ReSharper disable InconsistentNaming /* diff --git a/src/chocolatey/infrastructure.app/nuget/ChocolateyNuGetProjectContext.cs b/src/chocolatey/infrastructure.app/nuget/ChocolateyNuGetProjectContext.cs index 49637d6852..330a9d16d8 100644 --- a/src/chocolatey/infrastructure.app/nuget/ChocolateyNuGetProjectContext.cs +++ b/src/chocolatey/infrastructure.app/nuget/ChocolateyNuGetProjectContext.cs @@ -3,18 +3,17 @@ using System.Linq; using System.Text; using System.Threading.Tasks; +using System.Xml.Linq; +using chocolatey.infrastructure.app.configuration; +using NuGet.Common; +using NuGet.Packaging; +using NuGet.ProjectManagement; +using chocolatey.infrastructure.logging; +using NuGet.Configuration; +using NuGet.Packaging.Signing; namespace chocolatey.infrastructure.app.nuget { - using System.Xml.Linq; - using configuration; - using NuGet.Common; - using NuGet.Packaging; - using NuGet.ProjectManagement; - using logging; - using NuGet.Configuration; - using NuGet.Packaging.Signing; - public class ChocolateyNuGetProjectContext : INuGetProjectContext { private readonly ILogger _logger; @@ -24,7 +23,7 @@ public ChocolateyNuGetProjectContext(ChocolateyConfiguration config, ILogger log //TODO, set client policy correctly here with settings, fix in chocolatey implementation of ISettings for this purpose var chocolateyNugetSettings = new ChocolateyNuGetSettings(config); var clientPolicyContext = ClientPolicyContext.GetClientPolicy(chocolateyNugetSettings, logger); - _extractionContext = new PackageExtractionContext( + PackageExtractionContext = new PackageExtractionContext( PackageSaveMode.Nupkg | PackageSaveMode.Nuspec | PackageSaveMode.Files, XmlDocFileSaveMode.None, clientPolicyContext, @@ -33,8 +32,6 @@ public ChocolateyNuGetProjectContext(ChocolateyConfiguration config, ILogger log _logger = logger; } - private PackageExtractionContext _extractionContext; - public void Log(MessageLevel level, string message, params object[] args) { switch (level) @@ -75,20 +72,24 @@ public FileConflictAction ResolveFileConflict(string message) return FileConflictAction.OverwriteAll; } - public PackageExtractionContext PackageExtractionContext + public PackageExtractionContext PackageExtractionContext { get; set; } + + public ISourceControlManagerProvider SourceControlManagerProvider { get { - return _extractionContext; + return null; } - set + } + + public ExecutionContext ExecutionContext + { + get { - _extractionContext = value; + return null; } } - public ISourceControlManagerProvider SourceControlManagerProvider => null; - public ExecutionContext ExecutionContext => null; public XDocument OriginalPackagesConfig { get; set; } public NuGetActionType ActionType { get; set; } public Guid OperationId { get; set; } diff --git a/src/chocolatey/infrastructure.app/nuget/ChocolateyNuGetSettings.cs b/src/chocolatey/infrastructure.app/nuget/ChocolateyNuGetSettings.cs index 6825a98707..6f655d4ba5 100644 --- a/src/chocolatey/infrastructure.app/nuget/ChocolateyNuGetSettings.cs +++ b/src/chocolatey/infrastructure.app/nuget/ChocolateyNuGetSettings.cs @@ -3,20 +3,21 @@ using System.Linq; using System.Text; using System.Threading.Tasks; +using chocolatey.infrastructure.app.configuration; +using NuGet.Configuration; +using NuGet.Packaging.Signing; namespace chocolatey.infrastructure.app.nuget { - using configuration; - using NuGet.Configuration; - using NuGet.Packaging.Signing; - public class ChocolateyNuGetSettings : ISettings { //private ClientPolicyContext private const string ConfigSectionName = "config"; //private SettingSection _configSettingSection; +#pragma warning disable IDE0060 // unused method parameter public ChocolateyNuGetSettings(ChocolateyConfiguration config) +#pragma warning restore IDE0060 // unused method parameter { //new SettingSection //_clientCertItem = @@ -29,9 +30,15 @@ public void AddOrUpdate(string sectionName, SettingItem item) this.Log().Warn("NuGet tried to add an item to section {0}".FormatWith(sectionName)); } - public IList GetConfigFilePaths() => Enumerable.Empty().ToList(); + public IList GetConfigFilePaths() + { + return Enumerable.Empty().ToList(); + } - public IList GetConfigRoots() => Enumerable.Empty().ToList(); + public IList GetConfigRoots() + { + return Enumerable.Empty().ToList(); + } public SettingSection GetSection(string sectionName) { @@ -40,7 +47,7 @@ public SettingSection GetSection(string sectionName) case ConfigSectionName: //TODO fix return null; - //break; + //break; default: return null; } diff --git a/src/chocolatey/infrastructure.app/nuget/ChocolateyNugetCredentialProvider.cs b/src/chocolatey/infrastructure.app/nuget/ChocolateyNugetCredentialProvider.cs index 1025e2bfef..2c7e4ee692 100644 --- a/src/chocolatey/infrastructure.app/nuget/ChocolateyNugetCredentialProvider.cs +++ b/src/chocolatey/infrastructure.app/nuget/ChocolateyNugetCredentialProvider.cs @@ -14,20 +14,20 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Linq; +using System.Net; +using System.Text.RegularExpressions; +using chocolatey.infrastructure.commandline; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.logging; +using NuGet.Credentials; +using System.Threading.Tasks; +using NuGet.Configuration; +using System.Threading; + namespace chocolatey.infrastructure.app.nuget { - using System; - using System.Linq; - using System.Net; - using System.Text.RegularExpressions; - using commandline; - using configuration; - using logging; - using NuGet.Credentials; - using System.Threading.Tasks; - using NuGet.Configuration; - using System.Threading; - public sealed class ChocolateyNugetCredentialProvider : ICredentialProvider { private readonly ChocolateyConfiguration _config; @@ -120,7 +120,7 @@ public Task GetAsync(Uri uri, IWebProxy proxy, CredentialReq // find the source that is the closest match foreach (var candidateSource in candidateSources.OrEmpty()) { - var candidateRegEx = new Regex(Regex.Escape(candidateSource.Key.TrimEnd('/')),RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); + var candidateRegEx = new Regex(Regex.Escape(candidateSource.Key.TrimEnd('/')), RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); if (candidateRegEx.IsMatch(uri.OriginalString.TrimEnd('/'))) { this.Log().Debug("Source selected will be '{0}'".FormatWith(candidateSource.Key.TrimEnd('/'))); @@ -159,8 +159,9 @@ public Task GetAsync(Uri uri, IWebProxy proxy, CredentialReq return Task.FromResult(new CredentialResponse(new NetworkCredential(source.Username, NugetEncryptionUtility.DecryptString(source.EncryptedPassword)))); } - +#pragma warning disable IDE0060 // unused method parameter public ICredentials GetUserCredentials(Uri uri, IWebProxy proxy, CredentialRequestType credentialType) +#pragma warning restore IDE0060 // unused method parameter { if (!_config.Information.IsInteractive) { @@ -169,13 +170,13 @@ public ICredentials GetUserCredentials(Uri uri, IWebProxy proxy, CredentialReque return CredentialCache.DefaultCredentials; } - string message = credentialType == CredentialRequestType.Proxy ? + var message = credentialType == CredentialRequestType.Proxy ? "Please provide proxy credentials:" : "Please provide credentials for: {0}".FormatWith(uri.OriginalString); this.Log().Info(ChocolateyLoggers.Important, message); Console.Write("User name: "); - string username = Console.ReadLine(); + var username = Console.ReadLine(); Console.Write("Password: "); var password = InteractivePrompt.GetPassword(_config.PromptForConfirmation); @@ -186,18 +187,18 @@ public ICredentials GetUserCredentials(Uri uri, IWebProxy proxy, CredentialReque } var credentials = new NetworkCredential - { - UserName = username, - Password = password - }; + { + UserName = username, + Password = password + }; return credentials; } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public ICredentials get_credentials_from_user(Uri uri, IWebProxy proxy, CredentialRequestType credentialType) => GetUserCredentials(uri, proxy, credentialType); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/nuget/ChocolateyNugetLogger.cs b/src/chocolatey/infrastructure.app/nuget/ChocolateyNugetLogger.cs index 0b6b993fc4..45d77ebe38 100644 --- a/src/chocolatey/infrastructure.app/nuget/ChocolateyNugetLogger.cs +++ b/src/chocolatey/infrastructure.app/nuget/ChocolateyNugetLogger.cs @@ -14,15 +14,15 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.IO; +using System.Text; +using System.Threading.Tasks; +using chocolatey.infrastructure.logging; +using NuGet.Common; + namespace chocolatey.infrastructure.app.nuget { - using System; - using System.IO; - using System.Text; - using System.Threading.Tasks; - using logging; - using NuGet.Common; - public sealed class ChocolateyNugetLogger : ILogger { public void LogDebug(string message) diff --git a/src/chocolatey/infrastructure.app/nuget/ChocolateyPackagePathResolver.cs b/src/chocolatey/infrastructure.app/nuget/ChocolateyPackagePathResolver.cs index 03f2c0a0ba..2d3abb1c63 100644 --- a/src/chocolatey/infrastructure.app/nuget/ChocolateyPackagePathResolver.cs +++ b/src/chocolatey/infrastructure.app/nuget/ChocolateyPackagePathResolver.cs @@ -14,17 +14,17 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.IO; +using chocolatey.infrastructure.filesystem; +using NuGet.Configuration; +using NuGet.Packaging; +using NuGet.Packaging.Core; +using NuGet.ProjectManagement; +using NuGet.Versioning; + namespace chocolatey.infrastructure.app.nuget { - using System; - using System.IO; - using filesystem; - using NuGet.Configuration; - using NuGet.Packaging; - using NuGet.Packaging.Core; - using NuGet.ProjectManagement; - using NuGet.Versioning; - public sealed class ChocolateyPackagePathResolver : PackagePathResolver { public string RootDirectory { get; set; } @@ -38,16 +38,24 @@ public ChocolateyPackagePathResolver(string rootDirectory, IFileSystem filesyste } public override string GetInstallPath(PackageIdentity packageIdentity) - => GetInstallPath(packageIdentity.Id); + { + return GetInstallPath(packageIdentity.Id); + } public string GetInstallPath(string packageId) - => _filesystem.CombinePaths(RootDirectory, packageId); + { + return _filesystem.CombinePaths(RootDirectory, packageId); + } [Obsolete("This overload will be removed in a future version.")] public string GetInstallPath(string id, NuGetVersion version) - => GetInstallPath(id); + { + return GetInstallPath(id); + } public override string GetPackageFileName(PackageIdentity packageIdentity) - => packageIdentity.Id + NuGetConstants.PackageExtension; + { + return packageIdentity.Id + NuGetConstants.PackageExtension; + } } } diff --git a/src/chocolatey/infrastructure.app/nuget/ChocolateyPhysicalFileSystem.cs b/src/chocolatey/infrastructure.app/nuget/ChocolateyPhysicalFileSystem.cs index 3a55e31f4e..0c01de3463 100644 --- a/src/chocolatey/infrastructure.app/nuget/ChocolateyPhysicalFileSystem.cs +++ b/src/chocolatey/infrastructure.app/nuget/ChocolateyPhysicalFileSystem.cs @@ -14,9 +14,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System.Collections.Generic; + namespace chocolatey.infrastructure.app.nuget { - using System.Collections.Generic; // ReSharper disable InconsistentNaming diff --git a/src/chocolatey/infrastructure.app/nuget/ChocolateySourceCacheContext.cs b/src/chocolatey/infrastructure.app/nuget/ChocolateySourceCacheContext.cs index aa494477de..59639d05a9 100644 --- a/src/chocolatey/infrastructure.app/nuget/ChocolateySourceCacheContext.cs +++ b/src/chocolatey/infrastructure.app/nuget/ChocolateySourceCacheContext.cs @@ -1,11 +1,11 @@ -namespace chocolatey.infrastructure.app.nuget -{ - using System; - using System.Threading; - using Alphaleonis.Win32.Filesystem; - using chocolatey.infrastructure.app.configuration; - using NuGet.Protocol.Core.Types; +using System; +using System.Threading; +using Alphaleonis.Win32.Filesystem; +using chocolatey.infrastructure.app.configuration; +using NuGet.Protocol.Core.Types; +namespace chocolatey.infrastructure.app.nuget +{ public class ChocolateySourceCacheContext : SourceCacheContext { /// @@ -47,7 +47,10 @@ public override string GeneratedTempFolder return _generatedChocolateyTempFolder; } - set => Interlocked.CompareExchange(ref _generatedChocolateyTempFolder, value, comparand: null); + set + { + Interlocked.CompareExchange(ref _generatedChocolateyTempFolder, value, comparand: null); + } } /// diff --git a/src/chocolatey/infrastructure.app/nuget/DictionaryPropertyProvider.cs b/src/chocolatey/infrastructure.app/nuget/DictionaryPropertyProvider.cs index 4e6e086388..a6bb8f5702 100644 --- a/src/chocolatey/infrastructure.app/nuget/DictionaryPropertyProvider.cs +++ b/src/chocolatey/infrastructure.app/nuget/DictionaryPropertyProvider.cs @@ -14,10 +14,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System.Collections.Generic; + namespace chocolatey.infrastructure.app.nuget { - using System.Collections.Generic; - // ReSharper disable InconsistentNaming public sealed class DictionaryPropertyProvider diff --git a/src/chocolatey/infrastructure.app/nuget/NuGetEndpointResources.cs b/src/chocolatey/infrastructure.app/nuget/NuGetEndpointResources.cs index 9189b69251..91069800d4 100644 --- a/src/chocolatey/infrastructure.app/nuget/NuGetEndpointResources.cs +++ b/src/chocolatey/infrastructure.app/nuget/NuGetEndpointResources.cs @@ -13,14 +13,14 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using chocolatey.infrastructure.logging; +using NuGet.Protocol.Core.Types; + namespace chocolatey.infrastructure.app.nuget { - using System; - using System.Collections.Concurrent; - using System.Collections.Generic; - using chocolatey.infrastructure.logging; - using NuGet.Protocol.Core.Types; - public sealed class NuGetEndpointResources { private static readonly ConcurrentDictionary _cachedResources = new ConcurrentDictionary(); diff --git a/src/chocolatey/infrastructure.app/nuget/NuGetEndpointResourcesExtensions.cs b/src/chocolatey/infrastructure.app/nuget/NuGetEndpointResourcesExtensions.cs index 14877e9e04..1f8de8819d 100644 --- a/src/chocolatey/infrastructure.app/nuget/NuGetEndpointResourcesExtensions.cs +++ b/src/chocolatey/infrastructure.app/nuget/NuGetEndpointResourcesExtensions.cs @@ -13,12 +13,12 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System.Collections.Generic; +using System.Linq; +using NuGet.Protocol.Core.Types; + namespace chocolatey.infrastructure.app.nuget { - using System.Collections.Generic; - using System.Linq; - using NuGet.Protocol.Core.Types; - public static class NuGetEndpointResourcesExtensions { public static IEnumerable MetadataResources(this IEnumerable resources) diff --git a/src/chocolatey/infrastructure.app/nuget/NuGetFileSystemExtensions.cs b/src/chocolatey/infrastructure.app/nuget/NuGetFileSystemExtensions.cs index 351f9cbf64..fc467ecc31 100644 --- a/src/chocolatey/infrastructure.app/nuget/NuGetFileSystemExtensions.cs +++ b/src/chocolatey/infrastructure.app/nuget/NuGetFileSystemExtensions.cs @@ -14,12 +14,13 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.IO; +using NuGet.Packaging; + namespace chocolatey.infrastructure.app.nuget { - using System; - using System.Collections.Generic; - using System.IO; - using NuGet.Packaging; // ReSharper disable InconsistentNaming /* diff --git a/src/chocolatey/infrastructure.app/nuget/NugetCommon.cs b/src/chocolatey/infrastructure.app/nuget/NugetCommon.cs index 3550ebd467..e08c71febc 100644 --- a/src/chocolatey/infrastructure.app/nuget/NugetCommon.cs +++ b/src/chocolatey/infrastructure.app/nuget/NugetCommon.cs @@ -14,44 +14,44 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Net.Security; +using System.Runtime.CompilerServices; +using System.Security.Cryptography.X509Certificates; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using chocolatey.infrastructure.adapters; +using Alphaleonis.Win32.Filesystem; +using Chocolatey.NuGet.Frameworks; +using chocolatey.infrastructure.configuration; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.domain; +using chocolatey.infrastructure.filesystem; +using chocolatey.infrastructure.logging; +using NuGet; +using NuGet.Common; +using NuGet.Configuration; +using NuGet.Credentials; +using NuGet.PackageManagement; +using NuGet.Packaging; +using NuGet.Packaging.Core; +using NuGet.ProjectManagement; +using NuGet.Protocol; +using NuGet.Protocol.Core.Types; +using NuGet.Versioning; +using chocolatey.infrastructure.results; +using Console = chocolatey.infrastructure.adapters.Console; +using Environment = chocolatey.infrastructure.adapters.Environment; +using System.Collections.Concurrent; + namespace chocolatey.infrastructure.app.nuget { - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Net.Security; - using System.Runtime.CompilerServices; - using System.Security.Cryptography.X509Certificates; - using System.Text; - using System.Threading; - using System.Threading.Tasks; - using adapters; - using Alphaleonis.Win32.Filesystem; - using Chocolatey.NuGet.Frameworks; - using infrastructure.configuration; - using configuration; - using domain; - using filesystem; - using logging; - using NuGet; - using NuGet.Common; - using NuGet.Configuration; - using NuGet.Credentials; - using NuGet.PackageManagement; - using NuGet.Packaging; - using NuGet.Packaging.Core; - using NuGet.ProjectManagement; - using NuGet.Protocol; - using NuGet.Protocol.Core.Types; - using NuGet.Versioning; - using results; - using Console = adapters.Console; - using Environment = adapters.Environment; - using System.Collections.Concurrent; - public sealed class NugetCommon { private static readonly ConcurrentDictionary _repositories = new ConcurrentDictionary(); @@ -59,14 +59,14 @@ public sealed class NugetCommon [Obsolete("This member is unused and should probably be removed.")] private static Lazy _console = new Lazy(() => new Console()); -#pragma warning disable IDE1006 +#pragma warning disable IDE1006 // Naming [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("This member is unused and should probably be removed.")] public static void initialize_with(Lazy console) { _console = console; } -#pragma warning restore IDE1006 +#pragma warning restore IDE1006 // Naming [Obsolete("This member is unused and should probably be removed.")] private static IConsole Console @@ -74,9 +74,11 @@ private static IConsole Console get { return _console.Value; } } +#pragma warning disable IDE0022 // Block body for methods [Obsolete("This overload is obsolete and will be removed in a future version.")] public static ChocolateyPackagePathResolver GetPathResolver(ChocolateyConfiguration configuration, IFileSystem nugetPackagesFileSystem) => GetPathResolver(nugetPackagesFileSystem); +#pragma warning restore IDE0022 // Block body for methods public static ChocolateyPackagePathResolver GetPathResolver(IFileSystem nugetPackagesFileSystem) { @@ -94,7 +96,9 @@ public static SourceRepository GetLocalRepository() return Repository.Factory.GetCoreV3(nugetSource); } +#pragma warning disable IDE0060 // unused method parameter (nugetLogger) public static IEnumerable GetRemoteRepositories(ChocolateyConfiguration configuration, ILogger nugetLogger, IFileSystem filesystem) +#pragma warning restore IDE0060 // unused method parameter (nugetLogger) { // Set user agent for all NuGet library calls. Should not affect any HTTP calls that Chocolatey itself would make. UserAgent.SetUserAgentString(new UserAgentStringBuilder("{0}/{1} via NuGet Client".FormatWith(ApplicationParameters.UserAgent, configuration.Information.ChocolateyProductVersion))); @@ -107,7 +111,7 @@ public static IEnumerable GetRemoteRepositories(ChocolateyConf "chocolatey".Log().Debug("Using proxy server '{0}'.".FormatWith(configuration.Proxy.Location)); var proxy = new System.Net.WebProxy(configuration.Proxy.Location, true); - if (!String.IsNullOrWhiteSpace(configuration.Proxy.User) && !String.IsNullOrWhiteSpace(configuration.Proxy.EncryptedPassword)) + if (!string.IsNullOrWhiteSpace(configuration.Proxy.User) && !string.IsNullOrWhiteSpace(configuration.Proxy.EncryptedPassword)) { proxy.Credentials = new NetworkCredential(configuration.Proxy.User, NugetEncryptionUtility.DecryptString(configuration.Proxy.EncryptedPassword)); } @@ -115,7 +119,7 @@ public static IEnumerable GetRemoteRepositories(ChocolateyConf if (!string.IsNullOrWhiteSpace(configuration.Proxy.BypassList)) { "chocolatey".Log().Debug("Proxy has a bypass list of '{0}'.".FormatWith(configuration.Proxy.BypassList.EscapeCurlyBraces())); - proxy.BypassList = configuration.Proxy.BypassList.Replace("*",".*").Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries); + proxy.BypassList = configuration.Proxy.BypassList.Replace("*", ".*").Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries); } proxy.BypassProxyOnLocal = configuration.Proxy.BypassOnLocal; @@ -162,7 +166,10 @@ public static IEnumerable GetRemoteRepositories(ChocolateyConf if (machineSource != null) { bypassProxy = machineSource.BypassProxy; - if (bypassProxy) "chocolatey".Log().Debug("Source '{0}' is configured to bypass proxies.".FormatWith(source)); + if (bypassProxy) + { + "chocolatey".Log().Debug("Source '{0}' is configured to bypass proxies.".FormatWith(source)); + } if (!string.IsNullOrWhiteSpace(machineSource.Certificate)) { @@ -288,7 +295,10 @@ public static void GetLocalPackageDependencies(PackageIdentity package, ISet dependencyInfos ) { - if (dependencyInfos.Contains(package)) return; + if (dependencyInfos.Contains(package)) + { + return; + } var metadata = allLocalPackages .FirstOrDefault(p => p.PackageMetadata.Id.Equals(package.Id, StringComparison.OrdinalIgnoreCase) && p.PackageMetadata.Version.Equals(package.Version)) @@ -338,7 +348,11 @@ ISet dependencyInfos null, null); - if (dependencyInfos.Contains(result)) return; + if (dependencyInfos.Contains(result)) + { + return; + } + dependencyInfos.Add(result); foreach (var dependency in dependencies) @@ -357,18 +371,36 @@ public static async Task GetPackageDependencies(PackageIdentity package, ISet dependencyCache, ChocolateyConfiguration configuration) { - if (availablePackages.Contains(package)) return; + foreach (var resource in resources) + { + var dependencyInfoResource = resource.DependencyInfoResource; - var dependencyInfoResources = resources.DependencyInfoResources(); + if (dependencyInfoResource is null) + { + // We can't lookup any dependencies using this resource. + continue; + } - foreach (var dependencyInfoResource in dependencyInfoResources) - { - SourcePackageDependencyInfo dependencyInfo = null; + var dependencyInfo = availablePackages.FirstOrDefault(p => string.Equals(p.Id, package.Id, StringComparison.OrdinalIgnoreCase) && p.Version == package.Version && p.Source == resource.Source); try { - dependencyInfo = await dependencyInfoResource.ResolvePackage( - package, framework, cacheContext, logger, CancellationToken.None); + if (dependencyInfo is null && !package.HasVersion) + { + var latestPackage = NugetList.FindPackage(package.Id, configuration, logger, cacheContext, new[] { resource }); + + dependencyInfo = availablePackages.FirstOrDefault(p => string.Equals(p.Id, latestPackage.Identity.Id, StringComparison.OrdinalIgnoreCase) && p.Version == latestPackage.Identity.Version && p.Source == resource.Source); + + if (dependencyInfo is null) + { + dependencyInfo = await dependencyInfoResource.ResolvePackage(latestPackage.Identity, framework, cacheContext, logger, CancellationToken.None); + } + } + else if (dependencyInfo is null) + { + dependencyInfo = await dependencyInfoResource.ResolvePackage( + package, framework, cacheContext, logger, CancellationToken.None); + } } catch (AggregateException ex) when (!(ex.InnerException is null)) { @@ -379,20 +411,18 @@ public static async Task GetPackageDependencies(PackageIdentity package, "chocolatey".Log().Warn(ex.InnerException.Message); } - if (dependencyInfo == null) continue; - - availablePackages.Add(dependencyInfo); - foreach (var dependency in dependencyInfo.Dependencies) + if (dependencyInfo == null) { - if (dependencyCache.Contains(dependency)) continue; - dependencyCache.Add(dependency); - await GetPackageDependencies( - dependency.Id, framework, cacheContext, logger, resources, availablePackages, dependencyCache, configuration); + continue; } + + availablePackages.Add(dependencyInfo); + await HandleDependencies(framework, cacheContext, logger, resources, availablePackages, dependencyCache, configuration, dependencyInfo.Dependencies); } } - public static async Task GetPackageDependencies(string packageId, + [Obsolete("Use overload requiring a VersionRange being specified. Will be removed in v3.0.0")] + public static Task GetPackageDependencies(string packageId, NuGetFramework framework, SourceCacheContext cacheContext, ILogger logger, @@ -401,6 +431,24 @@ public static async Task GetPackageDependencies(string packageId, ISet dependencyCache, ChocolateyConfiguration configuration) { + return GetPackageDependencies(packageId, framework, cacheContext, logger, resources, availablePackages, dependencyCache, configuration, VersionRange.All); + } + + public static async Task GetPackageDependencies(string packageId, + NuGetFramework framework, + SourceCacheContext cacheContext, + ILogger logger, + IEnumerable resources, + ISet availablePackages, + ISet dependencyCache, + ChocolateyConfiguration configuration, + VersionRange versionRange) + { + if (versionRange is null) + { + throw new ArgumentNullException(nameof(versionRange)); + } + //if (availablePackages.Contains(packageID)) return; var dependencyInfoResources = resources.DependencyInfoResources(); @@ -423,18 +471,18 @@ public static async Task GetPackageDependencies(string packageId, "chocolatey".Log().Warn(ex.InnerException.Message); } - if (!dependencyInfos.Any()) continue; - - availablePackages.AddRange(dependencyInfos); - foreach (var dependency in dependencyInfos.SelectMany(p => p.Dependencies)) + if (!dependencyInfos.Any()) { - if (dependencyCache.Contains(dependency)) continue; - dependencyCache.Add(dependency); - - // Recursion is fun, kids - await GetPackageDependencies( - dependency.Id, framework, cacheContext, logger, resources, availablePackages, dependencyCache, configuration); + continue; } + + availablePackages.AddRange(dependencyInfos.Except(availablePackages)); + // We call ToList here, otherwise we have the risk of the packages list being + // modified before we are done with the iteration + dependencyInfos = dependencyInfos.Where(di => versionRange.Satisfies(di.Version)).ToList(); + + + await HandleDependencies(framework, cacheContext, logger, resources, availablePackages, dependencyCache, configuration, dependencyInfos.SelectMany(di => di.Dependencies)); } } @@ -444,7 +492,11 @@ public static async Task GetPackageParents(string packageId, { foreach (var package in locallyInstalledPackages.Where(p => !parentPackages.Contains(p))) { - if (parentPackages.Contains(package)) continue; + if (parentPackages.Contains(package)) + { + continue; + } + if (package.Dependencies.Any(p => p.Id.Equals(packageId, StringComparison.OrdinalIgnoreCase))) { parentPackages.Add(package); @@ -452,5 +504,35 @@ public static async Task GetPackageParents(string packageId, } } } + + private static async Task HandleDependencies( + NuGetFramework framework, + SourceCacheContext cacheContext, + ILogger logger, + IEnumerable resources, + ISet availablePackages, + ISet dependencyCache, ChocolateyConfiguration configuration, + IEnumerable dependencies) + { + foreach (var dependency in dependencies) + { + if (dependencyCache.Contains(dependency)) + { + continue; + } + + dependencyCache.Add(dependency); + + if (dependency.VersionRange.HasLowerAndUpperBounds && dependency.VersionRange.MaxVersion == dependency.VersionRange.MinVersion) + { + await GetPackageDependencies(new PackageIdentity(dependency.Id.ToLower(), dependency.VersionRange.MaxVersion), framework, cacheContext, logger, resources, availablePackages, dependencyCache, configuration); + } + else + { + await GetPackageDependencies( + dependency.Id.ToLower(), framework, cacheContext, logger, resources, availablePackages, dependencyCache, configuration, dependency.VersionRange); + } + } + } } } diff --git a/src/chocolatey/infrastructure.app/nuget/NugetEncryptionUtility.cs b/src/chocolatey/infrastructure.app/nuget/NugetEncryptionUtility.cs index f7eb65bc47..6c7e0410a3 100644 --- a/src/chocolatey/infrastructure.app/nuget/NugetEncryptionUtility.cs +++ b/src/chocolatey/infrastructure.app/nuget/NugetEncryptionUtility.cs @@ -14,14 +14,14 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.ComponentModel; +using System.Text; +using chocolatey.infrastructure.adapters; +using chocolatey.infrastructure.cryptography; + namespace chocolatey.infrastructure.app.nuget { - using System; - using System.ComponentModel; - using System.Text; - using adapters; - using cryptography; - public static class NugetEncryptionUtility { private static Lazy _encryptionUtility = new Lazy(() => new DefaultEncryptionUtility()); @@ -52,11 +52,11 @@ public static string GenerateUniqueToken(string caseInsensitiveKey) return EncryptionUtility.GenerateUniqueToken(caseInsensitiveKey); } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] [EditorBrowsable(EditorBrowsableState.Never)] public static void initialize_with(Lazy encryptionUtility) => InitializeWith(encryptionUtility); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/nuget/NugetList.cs b/src/chocolatey/infrastructure.app/nuget/NugetList.cs index 7ea3957df0..6048a023fa 100644 --- a/src/chocolatey/infrastructure.app/nuget/NugetList.cs +++ b/src/chocolatey/infrastructure.app/nuget/NugetList.cs @@ -14,22 +14,22 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using chocolatey.infrastructure.tolerance; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.filesystem; +using NuGet.Common; +using NuGet.Packaging; +using NuGet.Packaging.Core; +using NuGet.Protocol.Core.Types; +using NuGet.Versioning; + namespace chocolatey.infrastructure.app.nuget { - using System; - using System.Collections.Generic; - using System.Linq; - using System.Threading; - using System.Threading.Tasks; - using chocolatey.infrastructure.tolerance; - using configuration; - using filesystem; - using NuGet.Common; - using NuGet.Packaging; - using NuGet.Packaging.Core; - using NuGet.Protocol.Core.Types; - using NuGet.Versioning; - public static class NugetList { public static int LastPackageLimitUsed { get; private set; } @@ -50,13 +50,15 @@ public static int GetCount(ChocolateyConfiguration configuration, ILogger nugetL public static int GetCount(ChocolateyConfiguration configuration, ILogger nugetLogger, IFileSystem filesystem, ChocolateySourceCacheContext cacheContext) { var packageRepositoriesResources = NugetCommon.GetRepositoryResources(configuration, nugetLogger, filesystem, cacheContext); - string searchTermLower = configuration.Input.ToLowerSafe(); + var searchTermLower = configuration.Input.ToLowerSafe(); - SearchFilter searchFilter = new SearchFilter(configuration.Prerelease); - searchFilter.IncludeDelisted = configuration.ListCommand.LocalOnly; - searchFilter.OrderBy = SearchOrderBy.DownloadCount; + var searchFilter = new SearchFilter(configuration.Prerelease) + { + IncludeDelisted = configuration.ListCommand.LocalOnly, + OrderBy = SearchOrderBy.DownloadCount + }; - int totalCount = 0; + var totalCount = 0; foreach (var searchResource in packageRepositoriesResources.SearchResources()) { totalCount += searchResource.SearchCountAsync(searchTermLower, searchFilter, nugetLogger, CancellationToken.None).GetAwaiter().GetResult(); @@ -72,11 +74,13 @@ private async static Task> SearchPackagesAsyn var cacheContext = new ChocolateySourceCacheContext(configuration); var packageRepositoryResources = NugetCommon.GetRepositoryResources(configuration, nugetLogger, filesystem, cacheContext); - string searchTermLower = configuration.Input.ToLowerSafe(); + var searchTermLower = configuration.Input.ToLowerSafe(); - SearchFilter searchFilter = new SearchFilter(configuration.Prerelease); - searchFilter.IncludeDelisted = configuration.ListCommand.LocalOnly; - searchFilter.OrderBy = SearchOrderBy.Id; + var searchFilter = new SearchFilter(configuration.Prerelease) + { + IncludeDelisted = configuration.ListCommand.LocalOnly, + OrderBy = SearchOrderBy.Id + }; if (configuration.ListCommand.OrderByPopularity) { @@ -244,9 +248,12 @@ private async static Task> SearchPackagesAsyn } else { - var exactPackage = FindPackage(searchTermLower, configuration, nugetLogger, cacheContext, packageRepositoryResources, version); + var exactPackage = FindPackage(searchTermLower, configuration, nugetLogger, (SourceCacheContext)cacheContext, packageRepositoryResources, version); - if (exactPackage == null) return new List().AsQueryable(); + if (exactPackage == null) + { + return new List().AsQueryable(); + } return new List() { @@ -345,12 +352,34 @@ public static ISet FindAllPackageVersions(string package /// Version to search for /// Settings for caching of results from sources /// One result or nothing + [Obsolete("Use the overload that uses the base source cache context instead.")] public static IPackageSearchMetadata FindPackage( string packageName, ChocolateyConfiguration config, ILogger nugetLogger, ChocolateySourceCacheContext cacheContext, IEnumerable resources, + NuGetVersion version) + { + return FindPackage(packageName, config, nugetLogger, (SourceCacheContext)cacheContext, resources, version); + } + + /// + /// Searches for packages that are available based on name and other options + /// + /// Name of package to search for + /// Chocolatey configuration used to help supply the search parameters + /// The nuget logger + /// The resources that should be queried + /// Version to search for + /// Settings for caching of results from sources + /// One result or nothing + public static IPackageSearchMetadata FindPackage( + string packageName, + ChocolateyConfiguration config, + ILogger nugetLogger, + SourceCacheContext cacheContext, + IEnumerable resources, NuGetVersion version = null) { var packagesList = new HashSet(); @@ -405,14 +434,14 @@ public static IPackageSearchMetadata FindPackage( return packagesList.OrderByDescending(p => p.Identity.Version).FirstOrDefault(); } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public static ISet find_all_package_versions(string packageName, ChocolateyConfiguration config, ILogger nugetLogger, ChocolateySourceCacheContext cacheContext, IEnumerable resources) => FindAllPackageVersions(packageName, config, nugetLogger, cacheContext, resources); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } - public class ComparePackageSearchMetadataIdOnly: IEqualityComparer + public class ComparePackageSearchMetadataIdOnly : IEqualityComparer { public bool Equals(IPackageSearchMetadata x, IPackageSearchMetadata y) { @@ -421,7 +450,7 @@ public bool Equals(IPackageSearchMetadata x, IPackageSearchMetadata y) return true; } - if (ReferenceEquals(x, null) || ReferenceEquals(y, null)) + if (x is null || y is null) { return false; } @@ -430,7 +459,7 @@ public bool Equals(IPackageSearchMetadata x, IPackageSearchMetadata y) public int GetHashCode(IPackageSearchMetadata obj) { - if (ReferenceEquals(obj, null)) + if (obj is null) { return 0; } @@ -447,7 +476,7 @@ public bool Equals(IPackageSearchMetadata x, IPackageSearchMetadata y) return true; } - if (ReferenceEquals(x, null) || ReferenceEquals(y, null)) + if (x is null || y is null) { return false; } @@ -457,7 +486,7 @@ public bool Equals(IPackageSearchMetadata x, IPackageSearchMetadata y) public int GetHashCode(IPackageSearchMetadata obj) { - if (ReferenceEquals(obj, null)) + if (obj is null) { return 0; } diff --git a/src/chocolatey/infrastructure.app/nuget/NugetPack.cs b/src/chocolatey/infrastructure.app/nuget/NugetPack.cs index 994d58e557..fda053c7c9 100644 --- a/src/chocolatey/infrastructure.app/nuget/NugetPack.cs +++ b/src/chocolatey/infrastructure.app/nuget/NugetPack.cs @@ -14,18 +14,18 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using IFileSystem = chocolatey.infrastructure.filesystem.IFileSystem; +using chocolatey.infrastructure.platforms; +using NuGet.Common; +using NuGet.Configuration; +using NuGet.Packaging; + namespace chocolatey.infrastructure.app.nuget { - using System; - using System.Collections.Generic; - using System.IO; - using System.Linq; - using IFileSystem = filesystem.IFileSystem; - using chocolatey.infrastructure.platforms; - using NuGet.Common; - using NuGet.Configuration; - using NuGet.Packaging; - public sealed class NugetPack { public static bool BuildPackage(PackageBuilder builder, IFileSystem fileSystem, string outputPath) @@ -33,7 +33,7 @@ public static bool BuildPackage(PackageBuilder builder, IFileSystem fileSystem, ExcludeFiles(builder.Files); // Track if the package file was already present on disk - bool isExistingPackage = fileSystem.FileExists(outputPath); + var isExistingPackage = fileSystem.FileExists(outputPath); try { using (Stream stream = fileSystem.CreateFile(outputPath)) diff --git a/src/chocolatey/infrastructure.app/nuget/NugetPush.cs b/src/chocolatey/infrastructure.app/nuget/NugetPush.cs index 7b6cfa84ad..e5bfe6baa9 100644 --- a/src/chocolatey/infrastructure.app/nuget/NugetPush.cs +++ b/src/chocolatey/infrastructure.app/nuget/NugetPush.cs @@ -14,18 +14,18 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.logging; +using System.Collections.Generic; +using System.Linq; +using chocolatey.infrastructure.filesystem; +using NuGet.Common; +using NuGet.Protocol.Core.Types; +using System.Net.Http; + namespace chocolatey.infrastructure.app.nuget { - using System; - using configuration; - using logging; - using System.Collections.Generic; - using System.Linq; - using filesystem; - using NuGet.Common; - using NuGet.Protocol.Core.Types; - using System.Net.Http; - public class NugetPush { [Obsolete("This overload is deprecated and will be removed in v3.")] @@ -91,10 +91,10 @@ public static void PushPackage(ChocolateyConfiguration config, string nupkgFileP "chocolatey".Log().Info(ChocolateyLoggers.Important, () => "{0} was pushed successfully to {1}".FormatWith(nupkgFileName, config.Sources)); } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public static void push_package(ChocolateyConfiguration config, string nupkgFilePath, ILogger nugetLogger, string nupkgFileName, IFileSystem filesystem) => PushPackage(config, nupkgFilePath, nugetLogger, nupkgFileName, filesystem); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/registration/ChocolateyRegistrationModule.cs b/src/chocolatey/infrastructure.app/registration/ChocolateyRegistrationModule.cs index dc48004502..ab559a6af2 100644 --- a/src/chocolatey/infrastructure.app/registration/ChocolateyRegistrationModule.cs +++ b/src/chocolatey/infrastructure.app/registration/ChocolateyRegistrationModule.cs @@ -14,30 +14,30 @@ // See the License for the specific language governing permissions and // limitations under the License. +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.nuget; +using chocolatey.infrastructure.app.services; +using chocolatey.infrastructure.app.tasks; +using chocolatey.infrastructure.app.validations; +using chocolatey.infrastructure.commands; +using chocolatey.infrastructure.configuration; +using chocolatey.infrastructure.services; +using chocolatey.infrastructure.tasks; +using chocolatey.infrastructure.validations; +using CryptoHashProvider = chocolatey.infrastructure.cryptography.CryptoHashProvider; +using IFileSystem = chocolatey.infrastructure.filesystem.IFileSystem; +using IHashProvider = chocolatey.infrastructure.cryptography.IHashProvider; +using NuGet.Common; +using NuGet.PackageManagement; +using NuGet.Packaging; +using chocolatey.infrastructure.rules; +using chocolatey.infrastructure.app.rules; +using System.Linq; +using System; +using System.Security.AccessControl; + namespace chocolatey.infrastructure.app.registration { - using chocolatey.infrastructure.app.configuration; - using chocolatey.infrastructure.app.nuget; - using chocolatey.infrastructure.app.services; - using chocolatey.infrastructure.app.tasks; - using chocolatey.infrastructure.app.validations; - using chocolatey.infrastructure.commands; - using chocolatey.infrastructure.configuration; - using chocolatey.infrastructure.services; - using chocolatey.infrastructure.tasks; - using chocolatey.infrastructure.validations; - using CryptoHashProvider = cryptography.CryptoHashProvider; - using IFileSystem = filesystem.IFileSystem; - using IHashProvider = cryptography.IHashProvider; - using NuGet.Common; - using NuGet.PackageManagement; - using NuGet.Packaging; - using chocolatey.infrastructure.rules; - using chocolatey.infrastructure.app.rules; - using System.Linq; - using System; - using System.Security.AccessControl; - internal class ChocolateyRegistrationModule : IExtensionModule { public void RegisterDependencies(IContainerRegistrator registrator, ChocolateyConfiguration configuration) @@ -96,10 +96,10 @@ public void RegisterDependencies(IContainerRegistrator registrator, ChocolateyCo registrator.RegisterService(availableRules); } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public void register_dependencies(IContainerRegistrator registrator, ChocolateyConfiguration configuration) => RegisterDependencies(registrator, configuration); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/registration/ContainerBinding.cs b/src/chocolatey/infrastructure.app/registration/ContainerBinding.cs index b4e136ea36..9230cf5cff 100644 --- a/src/chocolatey/infrastructure.app/registration/ContainerBinding.cs +++ b/src/chocolatey/infrastructure.app/registration/ContainerBinding.cs @@ -14,29 +14,29 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using chocolatey.infrastructure.app.builders; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.filesystem; +using chocolatey.infrastructure.information; +using chocolatey.infrastructure.licensing; +using chocolatey.infrastructure.logging; +using chocolatey.infrastructure.services; +using chocolatey.infrastructure.configuration; +using SimpleInjector; +using Assembly = chocolatey.infrastructure.adapters.Assembly; +using chocolatey.infrastructure.app.nuget; +using NuGet.Common; +using NuGet.Versioning; +using CryptoHashProvider = chocolatey.infrastructure.cryptography.CryptoHashProvider; +using IFileSystem = chocolatey.infrastructure.filesystem.IFileSystem; +using IHashProvider = chocolatey.infrastructure.cryptography.IHashProvider; + namespace chocolatey.infrastructure.app.registration { - using System; - using System.Collections.Generic; - using System.Linq; - using System.Reflection; - using chocolatey.infrastructure.app.builders; - using chocolatey.infrastructure.app.configuration; - using chocolatey.infrastructure.filesystem; - using chocolatey.infrastructure.information; - using chocolatey.infrastructure.licensing; - using chocolatey.infrastructure.logging; - using chocolatey.infrastructure.services; - using infrastructure.configuration; - using SimpleInjector; - using Assembly = adapters.Assembly; - using nuget; - using NuGet.Common; - using NuGet.Versioning; - using CryptoHashProvider = cryptography.CryptoHashProvider; - using IFileSystem = filesystem.IFileSystem; - using IHashProvider = cryptography.IHashProvider; - // ReSharper disable InconsistentNaming /// @@ -150,7 +150,7 @@ You can override this compatibility check and force loading the extension by pas } this.Log().Debug("Calling registration module '{0}' in extension '{1}'!", registration.GetType().Name, assemblyName); - clonedRegistrator._validationHandlers.Clear(); + clonedRegistrator.ValidationHandlers.Clear(); clonedRegistrator.RegisterValidator((instanceType) => ValidateMinimumChocolateyVersion(instanceType, chocoVersion)); registration.RegisterDependencies(clonedRegistrator, configuration.DeepCopy()); hasRegisteredDependencies = !clonedRegistrator.RegistrationFailed; diff --git a/src/chocolatey/infrastructure.app/registration/IContainerRegistrator.cs b/src/chocolatey/infrastructure.app/registration/IContainerRegistrator.cs index 027c3975b0..d20934e6aa 100644 --- a/src/chocolatey/infrastructure.app/registration/IContainerRegistrator.cs +++ b/src/chocolatey/infrastructure.app/registration/IContainerRegistrator.cs @@ -13,10 +13,10 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +using System; + namespace chocolatey.infrastructure.app.registration { - using System; - public interface IContainerRegistrator { bool RegistrationFailed { get; } @@ -42,7 +42,7 @@ void RegisterInstance(Func instance) void RegisterInstance(Func instance) where TImplementation : class, TService; -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] void register_validator(Func validation_func); @@ -64,6 +64,6 @@ void register_instance(Func instance [Obsolete("This overload is deprecated and will be removed in v3.")] void register_instance(Func instance) where TImplementation : class, TService; -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/registration/IContainerResolver.cs b/src/chocolatey/infrastructure.app/registration/IContainerResolver.cs index 89788e0343..4904c51960 100644 --- a/src/chocolatey/infrastructure.app/registration/IContainerResolver.cs +++ b/src/chocolatey/infrastructure.app/registration/IContainerResolver.cs @@ -14,11 +14,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; + namespace chocolatey.infrastructure.app.registration { - using System; - using System.Collections.Generic; - public interface IContainerResolver { TService Resolve() @@ -27,7 +27,7 @@ TService Resolve() IEnumerable ResolveAll() where TService : class; -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] TService resolve() where TService : class; @@ -35,6 +35,6 @@ TService resolve() [Obsolete("This overload is deprecated and will be removed in v3.")] IEnumerable resolve_all() where TService : class; -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/registration/IExtensionConfiguration.cs b/src/chocolatey/infrastructure.app/registration/IExtensionConfiguration.cs index e36bdc73bc..6f36788e85 100644 --- a/src/chocolatey/infrastructure.app/registration/IExtensionConfiguration.cs +++ b/src/chocolatey/infrastructure.app/registration/IExtensionConfiguration.cs @@ -14,13 +14,13 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + namespace chocolatey.infrastructure.app.registration { - using System; - using System.Collections.Generic; - using System.Linq; - using System.Text; - /// /// Placeholder for the future to prevent the need to do a breaking release of /// Chocolatey Licensed Extension. @@ -36,9 +36,9 @@ public interface IExtensionConfiguration /// This is not used, and is only a placeholder for the future. object CreateInitialExtensionConfiguration(); -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] object create_initial_extension_configuration(); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/registration/IExtensionEnvironment.cs b/src/chocolatey/infrastructure.app/registration/IExtensionEnvironment.cs index 4984b9abe1..efe52e316a 100644 --- a/src/chocolatey/infrastructure.app/registration/IExtensionEnvironment.cs +++ b/src/chocolatey/infrastructure.app/registration/IExtensionEnvironment.cs @@ -14,12 +14,12 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using chocolatey.infrastructure.app.configuration; + namespace chocolatey.infrastructure.app.registration { - using System; - using System.Collections.Generic; - using chocolatey.infrastructure.app.configuration; - /// /// Placeholder for the future to prevent the need for a breaking release of Chocolatey Licensed Extension. /// @@ -33,9 +33,9 @@ public interface IExtensionEnvironment /// This is not used, and is only a placeholder for the future. IDictionary GetEnvironmentConfiguration(ChocolateyConfiguration config); -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] IDictionary get_environment_configuration(ChocolateyConfiguration config); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/registration/IExtensionModule.cs b/src/chocolatey/infrastructure.app/registration/IExtensionModule.cs index c11116ca26..f861cef26d 100644 --- a/src/chocolatey/infrastructure.app/registration/IExtensionModule.cs +++ b/src/chocolatey/infrastructure.app/registration/IExtensionModule.cs @@ -14,18 +14,18 @@ // See the License for the specific language governing permissions and // limitations under the License. +using chocolatey.infrastructure.app.configuration; +using System; + namespace chocolatey.infrastructure.app.registration { - using chocolatey.infrastructure.app.configuration; - using System; - public interface IExtensionModule { void RegisterDependencies(IContainerRegistrator registrator, ChocolateyConfiguration configuration); -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] void register_dependencies(IContainerRegistrator registrator, ChocolateyConfiguration configuration); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/registration/SimpleInjectorContainerRegistrator.cs b/src/chocolatey/infrastructure.app/registration/SimpleInjectorContainerRegistrator.cs index 3c2e5dd824..6929d3285c 100644 --- a/src/chocolatey/infrastructure.app/registration/SimpleInjectorContainerRegistrator.cs +++ b/src/chocolatey/infrastructure.app/registration/SimpleInjectorContainerRegistrator.cs @@ -14,26 +14,26 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using chocolatey.infrastructure.adapters; +using chocolatey.infrastructure.app.attributes; +using chocolatey.infrastructure.app.services; +using chocolatey.infrastructure.commands; +using chocolatey.infrastructure.events; +using chocolatey.infrastructure.services; +using NuGet.Packaging; +using SimpleInjector; +using Assembly = chocolatey.infrastructure.adapters.Assembly; + namespace chocolatey.infrastructure.app.registration { - using System; - using System.Collections.Concurrent; - using System.Collections.Generic; - using System.Linq; - using System.Reflection; - using chocolatey.infrastructure.adapters; - using chocolatey.infrastructure.app.attributes; - using chocolatey.infrastructure.app.services; - using infrastructure.commands; - using infrastructure.events; - using infrastructure.services; - using NuGet.Packaging; - using SimpleInjector; - using Assembly = adapters.Assembly; - internal sealed class SimpleInjectorContainerRegistrator : IContainerRegistrator, ICloneable { - internal List> _validationHandlers = new List>(); + internal List> ValidationHandlers = new List>(); // We need to store the aliases for the commands to prevent them from // being overridden when the original class implementing these hasn't been removed. @@ -76,7 +76,7 @@ public object Clone() cloned._registeredCommands = _registeredCommands.DeepCopy(); cloned._singletonServices = _singletonServices.DeepCopy(); cloned._transientServices = _transientServices.DeepCopy(); - cloned._validationHandlers = new List>(); + cloned.ValidationHandlers = new List>(); return cloned; } @@ -221,7 +221,7 @@ public void RegisterService(bool transient = false) public void RegisterValidator(Func validation_func) { - _validationHandlers.Add(validation_func); + ValidationHandlers.Add(validation_func); } public void RegisterSourceRunner() where TService : class @@ -356,7 +356,7 @@ private void AddToMultiServices(Type interfaceType, Type serviceType) private bool CanRegisterService(Type serviceType) { - foreach (var validator in _validationHandlers) + foreach (var validator in ValidationHandlers) { if (!validator(serviceType)) { @@ -544,7 +544,7 @@ private void ValidateServiceRegistrations(Type interfaceType, Type serviceType, } } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public void register_assembly_commands(IAssembly assembly) => RegisterAssemblyCommands(assembly); @@ -580,6 +580,6 @@ public void register_service(bool transient = false) [Obsolete("This overload is deprecated and will be removed in v3.")] public void register_validator(Func validation_func) => RegisterValidator(validation_func); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/registration/SimpleInjectorContainerResolver.cs b/src/chocolatey/infrastructure.app/registration/SimpleInjectorContainerResolver.cs index c36b010fa4..aff38355cf 100644 --- a/src/chocolatey/infrastructure.app/registration/SimpleInjectorContainerResolver.cs +++ b/src/chocolatey/infrastructure.app/registration/SimpleInjectorContainerResolver.cs @@ -14,12 +14,12 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using SimpleInjector; + namespace chocolatey.infrastructure.app.registration { - using System; - using System.Collections.Generic; - using SimpleInjector; - internal class SimpleInjectorContainerResolver : IContainerResolver { private readonly Container _container; @@ -41,7 +41,7 @@ public IEnumerable ResolveAll() return _container.GetAllInstances(); } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public TService resolve() where TService : class @@ -51,6 +51,6 @@ public TService resolve() public IEnumerable resolve_all() where TService : class => ResolveAll(); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/rules/EmptyOrInvalidUrlMetadataRule.cs b/src/chocolatey/infrastructure.app/rules/EmptyOrInvalidUrlMetadataRule.cs index 89662fedba..5233d0127f 100644 --- a/src/chocolatey/infrastructure.app/rules/EmptyOrInvalidUrlMetadataRule.cs +++ b/src/chocolatey/infrastructure.app/rules/EmptyOrInvalidUrlMetadataRule.cs @@ -13,13 +13,13 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using chocolatey.infrastructure.rules; +using NuGet.Packaging; + namespace chocolatey.infrastructure.app.rules { - using System; - using System.Collections.Generic; - using chocolatey.infrastructure.rules; - using NuGet.Packaging; - internal sealed class EmptyOrInvalidUrlMetadataRule : MetadataRuleBase { public override IEnumerable Validate(NuspecReader reader) diff --git a/src/chocolatey/infrastructure.app/rules/FrameWorkReferencesMetadataRule.cs b/src/chocolatey/infrastructure.app/rules/FrameWorkReferencesMetadataRule.cs index 671aa41dae..afe11ebd03 100644 --- a/src/chocolatey/infrastructure.app/rules/FrameWorkReferencesMetadataRule.cs +++ b/src/chocolatey/infrastructure.app/rules/FrameWorkReferencesMetadataRule.cs @@ -13,12 +13,12 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System.Collections.Generic; +using chocolatey.infrastructure.rules; +using NuGet.Packaging; + namespace chocolatey.infrastructure.app.rules { - using System.Collections.Generic; - using chocolatey.infrastructure.rules; - using NuGet.Packaging; - internal class FrameWorkReferencesMetadataRule : MetadataRuleBase { public override IEnumerable Validate(NuspecReader reader) diff --git a/src/chocolatey/infrastructure.app/rules/IconMetadataRule.cs b/src/chocolatey/infrastructure.app/rules/IconMetadataRule.cs index 25e3e46031..6d97eeb366 100644 --- a/src/chocolatey/infrastructure.app/rules/IconMetadataRule.cs +++ b/src/chocolatey/infrastructure.app/rules/IconMetadataRule.cs @@ -13,12 +13,12 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System.Collections.Generic; +using chocolatey.infrastructure.rules; +using NuGet.Packaging; + namespace chocolatey.infrastructure.app.rules { - using System.Collections.Generic; - using chocolatey.infrastructure.rules; - using NuGet.Packaging; - internal sealed class IconMetadataRule : FrameWorkReferencesMetadataRule { public override IEnumerable Validate(NuspecReader reader) diff --git a/src/chocolatey/infrastructure.app/rules/LicenseMetadataRule.cs b/src/chocolatey/infrastructure.app/rules/LicenseMetadataRule.cs index ff86b3818f..d395be909c 100644 --- a/src/chocolatey/infrastructure.app/rules/LicenseMetadataRule.cs +++ b/src/chocolatey/infrastructure.app/rules/LicenseMetadataRule.cs @@ -13,12 +13,12 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System.Collections.Generic; +using chocolatey.infrastructure.rules; +using NuGet.Packaging; + namespace chocolatey.infrastructure.app.rules { - using System.Collections.Generic; - using chocolatey.infrastructure.rules; - using NuGet.Packaging; - internal sealed class LicenseMetadataRule : FrameWorkReferencesMetadataRule { public override IEnumerable Validate(NuspecReader reader) diff --git a/src/chocolatey/infrastructure.app/rules/MetadataRuleBase.cs b/src/chocolatey/infrastructure.app/rules/MetadataRuleBase.cs index c02517f966..60130fc604 100644 --- a/src/chocolatey/infrastructure.app/rules/MetadataRuleBase.cs +++ b/src/chocolatey/infrastructure.app/rules/MetadataRuleBase.cs @@ -13,15 +13,15 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Linq; +using System.Xml.Linq; +using chocolatey.infrastructure.rules; +using NuGet.Packaging; + namespace chocolatey.infrastructure.app.rules { - using System; - using System.Collections.Generic; - using System.Linq; - using System.Xml.Linq; - using chocolatey.infrastructure.rules; - using NuGet.Packaging; - public abstract class MetadataRuleBase : IMetadataRule { private IDictionary _cachedRules; @@ -82,7 +82,7 @@ protected static string GetElementValue(NuspecReader reader, string name) protected abstract IEnumerable GetRules(); -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public virtual IEnumerable validate(NuspecReader reader) => Validate(reader); @@ -94,6 +94,6 @@ protected static bool has_element(NuspecReader reader, string name) [Obsolete("This overload is deprecated and will be removed in v3.")] protected static string get_element_value(NuspecReader reader, string name) => GetElementValue(reader, name); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } \ No newline at end of file diff --git a/src/chocolatey/infrastructure.app/rules/PackageTypesMetadataRule.cs b/src/chocolatey/infrastructure.app/rules/PackageTypesMetadataRule.cs index d7de9f58e4..dacf665eea 100644 --- a/src/chocolatey/infrastructure.app/rules/PackageTypesMetadataRule.cs +++ b/src/chocolatey/infrastructure.app/rules/PackageTypesMetadataRule.cs @@ -13,12 +13,12 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System.Collections.Generic; +using chocolatey.infrastructure.rules; +using NuGet.Packaging; + namespace chocolatey.infrastructure.app.rules { - using System.Collections.Generic; - using chocolatey.infrastructure.rules; - using NuGet.Packaging; - internal sealed class PackageTypesMetadataRule : FrameWorkReferencesMetadataRule { public override IEnumerable Validate(NuspecReader reader) diff --git a/src/chocolatey/infrastructure.app/rules/ReadmeMetadataRule.cs b/src/chocolatey/infrastructure.app/rules/ReadmeMetadataRule.cs index b96713d4c4..837304f099 100644 --- a/src/chocolatey/infrastructure.app/rules/ReadmeMetadataRule.cs +++ b/src/chocolatey/infrastructure.app/rules/ReadmeMetadataRule.cs @@ -13,12 +13,12 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System.Collections.Generic; +using chocolatey.infrastructure.rules; +using NuGet.Packaging; + namespace chocolatey.infrastructure.app.rules { - using System.Collections.Generic; - using chocolatey.infrastructure.rules; - using NuGet.Packaging; - internal sealed class ReadmeMetadataRule : FrameWorkReferencesMetadataRule { public override IEnumerable Validate(NuspecReader reader) diff --git a/src/chocolatey/infrastructure.app/rules/RepositoryMetadataRule.cs b/src/chocolatey/infrastructure.app/rules/RepositoryMetadataRule.cs index f85bea00ae..6d3d0da979 100644 --- a/src/chocolatey/infrastructure.app/rules/RepositoryMetadataRule.cs +++ b/src/chocolatey/infrastructure.app/rules/RepositoryMetadataRule.cs @@ -13,14 +13,14 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Linq; +using chocolatey.infrastructure.rules; +using NuGet.Packaging; + namespace chocolatey.infrastructure.app.rules { - using System; - using System.Collections.Generic; - using System.Linq; - using chocolatey.infrastructure.rules; - using NuGet.Packaging; - internal sealed class RepositoryMetadataRule : FrameWorkReferencesMetadataRule { public override IEnumerable Validate(NuspecReader reader) diff --git a/src/chocolatey/infrastructure.app/rules/RequireLicenseAcceptanceMetadataRule.cs b/src/chocolatey/infrastructure.app/rules/RequireLicenseAcceptanceMetadataRule.cs index 6db956d85f..e198e3fce4 100644 --- a/src/chocolatey/infrastructure.app/rules/RequireLicenseAcceptanceMetadataRule.cs +++ b/src/chocolatey/infrastructure.app/rules/RequireLicenseAcceptanceMetadataRule.cs @@ -13,12 +13,12 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System.Collections.Generic; +using chocolatey.infrastructure.rules; +using NuGet.Packaging; + namespace chocolatey.infrastructure.app.rules { - using System.Collections.Generic; - using chocolatey.infrastructure.rules; - using NuGet.Packaging; - internal sealed class RequireLicenseAcceptanceMetadataRule : MetadataRuleBase { public override IEnumerable Validate(NuspecReader reader) diff --git a/src/chocolatey/infrastructure.app/rules/RequiredMetadataRule.cs b/src/chocolatey/infrastructure.app/rules/RequiredMetadataRule.cs index 9402e4b214..0025587e88 100644 --- a/src/chocolatey/infrastructure.app/rules/RequiredMetadataRule.cs +++ b/src/chocolatey/infrastructure.app/rules/RequiredMetadataRule.cs @@ -13,12 +13,12 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System.Collections.Generic; +using chocolatey.infrastructure.rules; +using NuGet.Packaging; + namespace chocolatey.infrastructure.app.rules { - using System.Collections.Generic; - using chocolatey.infrastructure.rules; - using NuGet.Packaging; - internal sealed class RequiredMetadataRule : MetadataRuleBase { public override IEnumerable Validate(NuspecReader reader) diff --git a/src/chocolatey/infrastructure.app/rules/ServicableMetadataRule.cs b/src/chocolatey/infrastructure.app/rules/ServicableMetadataRule.cs index 61f0b0187f..d93ba4405c 100644 --- a/src/chocolatey/infrastructure.app/rules/ServicableMetadataRule.cs +++ b/src/chocolatey/infrastructure.app/rules/ServicableMetadataRule.cs @@ -13,12 +13,12 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System.Collections.Generic; +using chocolatey.infrastructure.rules; +using NuGet.Packaging; + namespace chocolatey.infrastructure.app.rules { - using System.Collections.Generic; - using chocolatey.infrastructure.rules; - using NuGet.Packaging; - internal sealed class ServicableMetadataRule : FrameWorkReferencesMetadataRule { public override IEnumerable Validate(NuspecReader reader) diff --git a/src/chocolatey/infrastructure.app/rules/VersionMetadataRule.cs b/src/chocolatey/infrastructure.app/rules/VersionMetadataRule.cs index 2cd0576267..41eab57c86 100644 --- a/src/chocolatey/infrastructure.app/rules/VersionMetadataRule.cs +++ b/src/chocolatey/infrastructure.app/rules/VersionMetadataRule.cs @@ -13,13 +13,13 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System.Collections.Generic; +using chocolatey.infrastructure.rules; +using NuGet.Packaging; +using NuGet.Versioning; + namespace chocolatey.infrastructure.app.rules { - using System.Collections.Generic; - using chocolatey.infrastructure.rules; - using NuGet.Packaging; - using NuGet.Versioning; - internal sealed class VersionMetadataRule : MetadataRuleBase { public override IEnumerable Validate(NuspecReader reader) diff --git a/src/chocolatey/infrastructure.app/runners/ConsoleApplication.cs b/src/chocolatey/infrastructure.app/runners/ConsoleApplication.cs index afa9dde90b..c8701f14f6 100644 --- a/src/chocolatey/infrastructure.app/runners/ConsoleApplication.cs +++ b/src/chocolatey/infrastructure.app/runners/ConsoleApplication.cs @@ -14,18 +14,18 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Linq; +using SimpleInjector; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.validations; +using chocolatey.infrastructure.logging; +using chocolatey.infrastructure.app.utility; +using chocolatey.infrastructure.app.validations; + namespace chocolatey.infrastructure.app.runners { - using System; - using System.Collections.Generic; - using System.Linq; - using SimpleInjector; - using configuration; - using infrastructure.validations; - using logging; - using utility; - using validations; - /// /// Console application responsible for running chocolatey /// @@ -47,7 +47,7 @@ public void Run(string[] args, ChocolateyConfiguration config, Container contain IList commandArgs = new List(); //shift the first arg off - int count = 0; + var count = 0; foreach (var arg in args) { if (count == 0) @@ -66,11 +66,15 @@ public void Run(string[] args, ChocolateyConfiguration config, Container contain commandArgs, config, (optionSet) => command.ConfigureArgumentParser(optionSet, config), - (unparsedArgs) => { + (unparsedArgs) => + { // if debug is bundled with local options, it may not get picked up when global // options are parsed. Attempt to set it again once local options are set. // This does mean some output from debug will be missed (but not much) - if (config.Debug) Log4NetAppenderConfiguration.EnableDebugLoggingIf(config.Debug, "{0}LoggingColoredConsoleAppender".FormatWith(ChocolateyLoggers.Verbose.ToStringSafe()), "{0}LoggingColoredConsoleAppender".FormatWith(ChocolateyLoggers.Trace.ToStringSafe())); + if (config.Debug) + { + Log4NetAppenderConfiguration.EnableDebugLoggingIf(config.Debug, "{0}LoggingColoredConsoleAppender".FormatWith(ChocolateyLoggers.Verbose.ToStringSafe()), "{0}LoggingColoredConsoleAppender".FormatWith(ChocolateyLoggers.Trace.ToStringSafe())); + } command.ParseAdditionalArguments(unparsedArgs, config); @@ -88,7 +92,8 @@ public void Run(string[] args, ChocolateyConfiguration config, Container contain } } }, - () => { + () => + { this.Log().Debug(() => "Performing validation checks."); command.Validate(config); @@ -153,10 +158,10 @@ private int ReportValidationSummary(IList validationResults, C return errors; } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public void run(string[] args, ChocolateyConfiguration config, Container container) => Run(args, config, container); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/runners/GenericRunner.cs b/src/chocolatey/infrastructure.app/runners/GenericRunner.cs index f4f34cd0a9..23c636969f 100644 --- a/src/chocolatey/infrastructure.app/runners/GenericRunner.cs +++ b/src/chocolatey/infrastructure.app/runners/GenericRunner.cs @@ -14,29 +14,29 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Linq; +using System.Collections.Generic; +using chocolatey.infrastructure.app.services; +using chocolatey.infrastructure.app.events; +using chocolatey.infrastructure.filesystem; +using chocolatey.infrastructure.events; +using chocolatey.infrastructure.registration; +using chocolatey.infrastructure.tasks; +using SimpleInjector; +using chocolatey.infrastructure.adapters; +using chocolatey.infrastructure.app.attributes; +using chocolatey.infrastructure.commandline; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.domain; +using chocolatey.infrastructure.commands; +using chocolatey.infrastructure.configuration; +using chocolatey.infrastructure.logging; +using Console = System.Console; +using Environment = System.Environment; + namespace chocolatey.infrastructure.app.runners { - using System; - using System.Linq; - using System.Collections.Generic; - using chocolatey.infrastructure.app.services; - using events; - using filesystem; - using infrastructure.events; - using infrastructure.registration; - using infrastructure.tasks; - using SimpleInjector; - using adapters; - using attributes; - using commandline; - using configuration; - using domain; - using infrastructure.commands; - using infrastructure.configuration; - using logging; - using Console = System.Console; - using Environment = System.Environment; - public sealed class GenericRunner { private ICommand FindCommand(ChocolateyConfiguration config, Container container, bool isConsole, Action parseArgs) @@ -57,7 +57,10 @@ private ICommand FindCommand(ChocolateyConfiguration config, Container container Try choco -? for command reference/help.".FormatWith(config.CommandName)); } - if (isConsole) Environment.ExitCode = 1; + if (isConsole) + { + Environment.ExitCode = 1; + } } else { @@ -72,6 +75,8 @@ private ICommand FindCommand(ChocolateyConfiguration config, Container container } SetSourceType(config, container); + IncludeConfiguredSources(config); + // guaranteed that all settings are set. EnvironmentSettings.SetEnvironmentVariables(config); @@ -127,14 +132,43 @@ private void SetSourceType(ChocolateyConfiguration config, Container container) this.Log().Debug(() => "The source '{0}' evaluated to a '{1}' source type".FormatWith(config.Sources, sourceType)); } + private void IncludeConfiguredSources(ChocolateyConfiguration config) + { + if (config.IncludeConfiguredSources) + { + if (config.SourceType != SourceTypes.Normal) + { + this.Log().Warn("Not including sources from chocolatey.config file because '{0}' is an alternative source.".FormatWith(config.Sources)); + } + else + { + foreach (var machineSource in config.MachineSources.OrEmpty()) + { + if (!config.Sources.ContainsSafe(machineSource.Key)) + { + config.Sources += ";" + machineSource.Key; + } + } + + this.Log().Debug("Including sources from chocolatey.config file."); + } + } + } + public void FailOnMissingOrInvalidLicenseIfFeatureSet(ChocolateyConfiguration config) { if (!config.Features.FailOnInvalidOrMissingLicense || config.CommandName.TrimSafe().IsEqualTo("feature") || config.CommandName.TrimSafe().IsEqualTo("features") - ) return; + ) + { + return; + } - if (!config.Information.IsLicensedVersion) throw new ApplicationException("License is missing or invalid."); + if (!config.Information.IsLicensedVersion) + { + throw new ApplicationException("License is missing or invalid."); + } } public void Run(ChocolateyConfiguration config, Container container, bool isConsole, Action parseArgs) @@ -286,10 +320,16 @@ public int Count(ChocolateyConfiguration config, Container container, bool isCon public void WarnIfAdminAndNeedsElevation(ChocolateyConfiguration config) { - if (config.HelpRequested) return; + if (config.HelpRequested) + { + return; + } // skip when commands will set or for background mode - if (!config.Features.ShowNonElevatedWarnings) return; + if (!config.Features.ShowNonElevatedWarnings) + { + return; + } var shouldWarn = (!config.Information.IsProcessElevated && config.Information.IsUserAdministrator) || (!config.Information.IsUserAdministrator && ApplicationParameters.InstallLocation.IsEqualTo(ApplicationParameters.CommonAppDataChocolatey)); @@ -332,7 +372,7 @@ location. See } } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public void fail_when_license_is_missing_or_invalid_if_requested(ChocolateyConfiguration config) => FailOnMissingOrInvalidLicenseIfFeatureSet(config); @@ -352,6 +392,6 @@ public int count(ChocolateyConfiguration config, Container container, bool isCon [Obsolete("This overload is deprecated and will be removed in v3.")] public void warn_when_admin_needs_elevation(ChocolateyConfiguration config) => WarnIfAdminAndNeedsElevation(config); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/services/AutomaticUninstallerService.cs b/src/chocolatey/infrastructure.app/services/AutomaticUninstallerService.cs index 84c28b402a..ae929065f8 100644 --- a/src/chocolatey/infrastructure.app/services/AutomaticUninstallerService.cs +++ b/src/chocolatey/infrastructure.app/services/AutomaticUninstallerService.cs @@ -14,24 +14,24 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text.RegularExpressions; +using System.Threading; +using chocolatey.infrastructure.commandline; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.domain; +using chocolatey.infrastructure.app.domain.installers; +using chocolatey.infrastructure.filesystem; +using chocolatey.infrastructure.commands; +using chocolatey.infrastructure.logging; +using chocolatey.infrastructure.results; +using chocolatey.infrastructure.app.utility; + namespace chocolatey.infrastructure.app.services { - using System; - using System.Collections.Generic; - using System.IO; - using System.Linq; - using System.Text.RegularExpressions; - using System.Threading; - using commandline; - using configuration; - using domain; - using domain.installers; - using filesystem; - using infrastructure.commands; - using logging; - using results; - using utility; - public class AutomaticUninstallerService : IAutomaticUninstallerService { private readonly IChocolateyPackageInformationService _packageInfoService; @@ -119,7 +119,10 @@ public void Remove(RegistryApplicationKey key, ChocolateyConfiguration config, P userProvidedUninstallArguments = config.InstallArguments; userOverrideUninstallArguments = config.OverrideArguments; - if (!string.IsNullOrWhiteSpace(userProvidedUninstallArguments)) this.Log().Debug(ChocolateyLoggers.Verbose, " Using user passed {2}uninstaller args for {0}:'{1}'".FormatWith(package.Id, userProvidedUninstallArguments.EscapeCurlyBraces(), userOverrideUninstallArguments ? "overriding " : string.Empty)); + if (!string.IsNullOrWhiteSpace(userProvidedUninstallArguments)) + { + this.Log().Debug(ChocolateyLoggers.Verbose, " Using user passed {2}uninstaller args for {0}:'{1}'".FormatWith(package.Id, userProvidedUninstallArguments.EscapeCurlyBraces(), userOverrideUninstallArguments ? "overriding " : string.Empty)); + } } } @@ -141,23 +144,23 @@ public void Remove(RegistryApplicationKey key, ChocolateyConfiguration config, P } // split on " /" and " -" for quite a bit more accuracy - IList uninstallArgsSplit = key.UninstallString.ToStringSafe().Replace(""","\"").Replace("'","'").Split(new[] { " /", " -" }, StringSplitOptions.RemoveEmptyEntries).ToList(); + IList uninstallArgsSplit = key.UninstallString.ToStringSafe().Replace(""", "\"").Replace("'", "'").Split(new[] { " /", " -" }, StringSplitOptions.RemoveEmptyEntries).ToList(); var uninstallExe = uninstallArgsSplit.DefaultIfEmpty(string.Empty).FirstOrDefault().TrimSafe(); if (uninstallExe.Count(u => u == '"') > 2) { - uninstallExe = uninstallExe.Split(new []{" \""}, StringSplitOptions.RemoveEmptyEntries).First(); + uninstallExe = uninstallExe.Split(new[] { " \"" }, StringSplitOptions.RemoveEmptyEntries).First(); } if (uninstallExe.Count(u => u == ':') > 1) { try { - var firstMatch = Regex.Match(uninstallExe, @"\s+\w\:",RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); + var firstMatch = Regex.Match(uninstallExe, @"\s+\w\:", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); uninstallExe = uninstallExe.Substring(0, firstMatch.Index); } catch (Exception ex) { - this.Log().Debug("Error splitting the uninstall string:{0} {1}".FormatWith(Environment.NewLine,ex.ToStringSafe())); + this.Log().Debug("Error splitting the uninstall string:{0} {1}".FormatWith(Environment.NewLine, ex.ToStringSafe())); } } var uninstallArgs = key.UninstallString.ToStringSafe().Replace(""", "\"").Replace("'", "'").Replace(uninstallExe.ToStringSafe(), string.Empty).TrimSafe(); @@ -196,7 +199,7 @@ public void Remove(RegistryApplicationKey key, ChocolateyConfiguration config, P { if (userOverrideUninstallArguments) { - this.Log().Debug(() => " Replacing original uninstall arguments of '{0}' with '{1}'".FormatWith(uninstallArgs.EscapeCurlyBraces(),userProvidedUninstallArguments.EscapeCurlyBraces())); + this.Log().Debug(() => " Replacing original uninstall arguments of '{0}' with '{1}'".FormatWith(uninstallArgs.EscapeCurlyBraces(), userProvidedUninstallArguments.EscapeCurlyBraces())); uninstallArgs = userProvidedUninstallArguments; } else @@ -237,7 +240,10 @@ Automatic Uninstaller due to licensed enhancements and Package shortPrompt: true, timeoutInSeconds: timeout ); - if (selection.IsEqualTo("yes")) skipUninstaller = false; + if (selection.IsEqualTo("yes")) + { + skipUninstaller = false; + } if (skipUninstaller) { @@ -253,12 +259,20 @@ Automatic Uninstaller due to licensed enhancements and Package config.CommandExecutionTimeoutSeconds, (s, e) => { - if (e == null || string.IsNullOrWhiteSpace(e.Data)) return; + if (e == null || string.IsNullOrWhiteSpace(e.Data)) + { + return; + } + this.Log().Info(() => " [AutoUninstaller] {0}".FormatWith(e.Data.EscapeCurlyBraces())); }, (s, e) => { - if (e == null || string.IsNullOrWhiteSpace(e.Data)) return; + if (e == null || string.IsNullOrWhiteSpace(e.Data)) + { + return; + } + this.Log().Error(() => " [AutoUninstaller] {0}".FormatWith(e.Data.EscapeCurlyBraces())); }, updateProcessPath: false); @@ -266,7 +280,7 @@ Automatic Uninstaller due to licensed enhancements and Package if (!installer.ValidUninstallExitCodes.Contains(exitCode)) { Environment.ExitCode = exitCode; - string logMessage = " Auto uninstaller failed. Please remove machine installation manually.{0} Exit code was {1}".FormatWith(Environment.NewLine, exitCode); + var logMessage = " Auto uninstaller failed. Please remove machine installation manually.{0} Exit code was {1}".FormatWith(Environment.NewLine, exitCode); this.Log().Error(() => logMessage.EscapeCurlyBraces()); packageResult.Messages.Add(new ResultMessage(config.Features.FailOnAutoUninstaller ? ResultType.Error : ResultType.Warn, logMessage)); } @@ -299,7 +313,7 @@ public virtual IInstaller GetInstallerType(RegistryApplicationKey key, string un return installer; } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public void run(PackageResult packageResult, ChocolateyConfiguration config) => Run(packageResult, config); @@ -311,6 +325,6 @@ public void remove(RegistryApplicationKey key, ChocolateyConfiguration config, P [Obsolete("This overload is deprecated and will be removed in v3.")] public virtual IInstaller get_installer_type(RegistryApplicationKey key, string uninstallExe, string uninstallArgs) => GetInstallerType(key, uninstallExe, uninstallArgs); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/services/ChocolateyConfigSettingsService.cs b/src/chocolatey/infrastructure.app/services/ChocolateyConfigSettingsService.cs index 3cc63103d1..a54391a4f2 100644 --- a/src/chocolatey/infrastructure.app/services/ChocolateyConfigSettingsService.cs +++ b/src/chocolatey/infrastructure.app/services/ChocolateyConfigSettingsService.cs @@ -14,18 +14,18 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using chocolatey.infrastructure.app.commands; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.services; +using chocolatey.infrastructure.logging; +using chocolatey.infrastructure.app.nuget; + namespace chocolatey.infrastructure.app.services { - using System; - using System.Collections.Generic; - using System.Linq; - using System.Reflection; - using chocolatey.infrastructure.app.commands; - using configuration; - using infrastructure.services; - using logging; - using nuget; - public class ChocolateyConfigSettingsService : IChocolateyConfigSettingsService { private readonly HashSet _knownFeatures = new HashSet(); @@ -65,7 +65,10 @@ public virtual IEnumerable ListSources(ChocolateyConfiguration var list = new List(); foreach (var source in ConfigFileSettings.Sources.OrEmpty().OrderBy(s => s.Id)) { - if (SkipSource(source, configuration)) continue; + if (SkipSource(source, configuration)) + { + continue; + } if (!configuration.QuietOutput) { @@ -133,7 +136,10 @@ public void AddSource(ChocolateyConfiguration configuration) ConfigFileSettings.Sources.Add(source); _xmlService.Serialize(ConfigFileSettings, ApplicationParameters.GlobalConfigFileLocation); - if (!configuration.QuietOutput) this.Log().Warn(() => "Added {0} - {1} (Priority {2})".FormatWith(source.Id, source.Value, source.Priority)); + if (!configuration.QuietOutput) + { + this.Log().Warn(() => "Added {0} - {1} (Priority {2})".FormatWith(source.Id, source.Value, source.Priority)); + } } else { @@ -150,7 +156,15 @@ public void AddSource(ChocolateyConfiguration configuration) configuration.SourceCommand.VisibleToAdminsOnly == source.VisibleToAdminsOnly ) { - if (!configuration.QuietOutput) this.Log().Warn(NoChangeMessage); + if (!configuration.QuietOutput) + { + this.Log().Warn(NoChangeMessage); + } + + if (configuration.Features.UseEnhancedExitCodes && Environment.ExitCode == 0) + { + Environment.ExitCode = 2; + } } else { @@ -165,7 +179,10 @@ public void AddSource(ChocolateyConfiguration configuration) source.VisibleToAdminsOnly = configuration.SourceCommand.VisibleToAdminsOnly; _xmlService.Serialize(ConfigFileSettings, ApplicationParameters.GlobalConfigFileLocation); - if (!configuration.QuietOutput) this.Log().Warn(() => "Updated {0} - {1} (Priority {2})".FormatWith(source.Id, source.Value, source.Priority)); + if (!configuration.QuietOutput) + { + this.Log().Warn(() => "Updated {0} - {1} (Priority {2})".FormatWith(source.Id, source.Value, source.Priority)); + } } } } @@ -178,11 +195,22 @@ public void RemoveSource(ChocolateyConfiguration configuration) ConfigFileSettings.Sources.Remove(source); _xmlService.Serialize(ConfigFileSettings, ApplicationParameters.GlobalConfigFileLocation); - if (!configuration.QuietOutput) this.Log().Warn(() => "Removed {0}".FormatWith(source.Id)); + if (!configuration.QuietOutput) + { + this.Log().Warn(() => "Removed {0}".FormatWith(source.Id)); + } } else { - if (!configuration.QuietOutput) this.Log().Warn(NoChangeMessage); + if (!configuration.QuietOutput) + { + this.Log().Warn(NoChangeMessage); + } + + if (configuration.Features.UseEnhancedExitCodes && Environment.ExitCode == 0) + { + Environment.ExitCode = 2; + } } } @@ -193,11 +221,22 @@ public void DisableSource(ChocolateyConfiguration configuration) { source.Disabled = true; _xmlService.Serialize(ConfigFileSettings, ApplicationParameters.GlobalConfigFileLocation); - if (!configuration.QuietOutput) this.Log().Warn(() => "Disabled {0}".FormatWith(source.Id)); + if (!configuration.QuietOutput) + { + this.Log().Warn(() => "Disabled {0}".FormatWith(source.Id)); + } } else { - if (!configuration.QuietOutput) this.Log().Warn(NoChangeMessage); + if (!configuration.QuietOutput) + { + this.Log().Warn(NoChangeMessage); + } + + if (configuration.Features.UseEnhancedExitCodes && Environment.ExitCode == 0) + { + Environment.ExitCode = 2; + } } } @@ -208,11 +247,22 @@ public void EnableSource(ChocolateyConfiguration configuration) { source.Disabled = false; _xmlService.Serialize(ConfigFileSettings, ApplicationParameters.GlobalConfigFileLocation); - if (!configuration.QuietOutput) this.Log().Warn(() => "Enabled {0}".FormatWith(source.Id)); + if (!configuration.QuietOutput) + { + this.Log().Warn(() => "Enabled {0}".FormatWith(source.Id)); + } } else { - if (!configuration.QuietOutput) this.Log().Warn(NoChangeMessage); + if (!configuration.QuietOutput) + { + this.Log().Warn(NoChangeMessage); + } + + if (configuration.Features.UseEnhancedExitCodes && Environment.ExitCode == 0) + { + Environment.ExitCode = 2; + } } } @@ -277,6 +327,11 @@ public void DisableFeature(ChocolateyConfiguration configuration) else { this.Log().Warn(NoChangeMessage); + + if (configuration.Features.UseEnhancedExitCodes && Environment.ExitCode == 0) + { + Environment.ExitCode = 2; + } } } @@ -305,6 +360,11 @@ public void EnableFeature(ChocolateyConfiguration configuration) else { this.Log().Warn(NoChangeMessage); + + if (configuration.Features.UseEnhancedExitCodes && Environment.ExitCode == 0) + { + Environment.ExitCode = 2; + } } } @@ -363,7 +423,15 @@ public void SetApiKey(ChocolateyConfiguration configuration) _xmlService.Serialize(ConfigFileSettings, ApplicationParameters.GlobalConfigFileLocation); this.Log().Info(() => "Updated API key for {0}".FormatWith(configuration.Sources)); } - else this.Log().Warn(NoChangeMessage); + else + { + this.Log().Warn(NoChangeMessage); + + if (configuration.Features.UseEnhancedExitCodes && Environment.ExitCode == 0) + { + Environment.ExitCode = 2; + } + } } } @@ -404,14 +472,21 @@ public void ListConfig(ChocolateyConfiguration configuration) public void GetConfig(ChocolateyConfiguration configuration) { var config = GetConfigValue(configuration.ConfigCommand.Name); - if (config == null) throw new ApplicationException("No configuration value by the name '{0}'".FormatWith(configuration.ConfigCommand.Name)); + if (config == null) + { + throw new ApplicationException("No configuration value by the name '{0}'".FormatWith(configuration.ConfigCommand.Name)); + } + this.Log().Info("{0}".FormatWith(config.Value)); } public ConfigFileConfigSetting GetConfigValue(string configKeyName) { var config = ConfigFileSettings.ConfigSettings.FirstOrDefault(p => p.Key.IsEqualTo(configKeyName)); - if (config == null) return null; + if (config == null) + { + return null; + } return config; } @@ -447,6 +522,11 @@ public void SetConfig(ChocolateyConfiguration configuration) if (configuration.ConfigCommand.ConfigValue.IsEqualTo(currentValue.ToStringSafe())) { this.Log().Warn(NoChangeMessage); + + if (configuration.Features.UseEnhancedExitCodes && Environment.ExitCode == 0) + { + Environment.ExitCode = 2; + } } else { @@ -464,6 +544,11 @@ public void UnsetConfig(ChocolateyConfiguration configuration) if (config == null || string.IsNullOrEmpty(config.Value)) { this.Log().Warn(NoChangeMessage); + + if (configuration.Features.UseEnhancedExitCodes && Environment.ExitCode == 0) + { + Environment.ExitCode = 2; + } } else { @@ -511,7 +596,7 @@ protected void ValidateSupportedFeature(ConfigFileFeatureSetting feature) } } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public void noop(ChocolateyConfiguration configuration) => DryRun(configuration); @@ -595,6 +680,6 @@ protected void add_known_feature(string name) [Obsolete("This overload is deprecated and will be removed in v3.")] protected void validate_supported_feature(ConfigFileFeatureSetting feature) => ValidateSupportedFeature(feature); -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/services/ChocolateyPackageInformationService.cs b/src/chocolatey/infrastructure.app/services/ChocolateyPackageInformationService.cs index 37eaeee373..4eaab3b165 100644 --- a/src/chocolatey/infrastructure.app/services/ChocolateyPackageInformationService.cs +++ b/src/chocolatey/infrastructure.app/services/ChocolateyPackageInformationService.cs @@ -14,21 +14,21 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.domain; +using chocolatey.infrastructure.configuration; +using NuGet.Packaging; +using NuGet.Versioning; +using chocolatey.infrastructure.results; +using chocolatey.infrastructure.tolerance; +using IFileSystem = chocolatey.infrastructure.filesystem.IFileSystem; + namespace chocolatey.infrastructure.app.services { - using System; - using System.Collections.Generic; - using System.IO; - using System.Text; - using configuration; - using domain; - using infrastructure.configuration; - using NuGet.Packaging; - using NuGet.Versioning; - using results; - using tolerance; - using IFileSystem = filesystem.IFileSystem; - public class ChocolateyPackageInformationService : IChocolateyPackageInformationService { private readonly IFileSystem _fileSystem; @@ -44,6 +44,7 @@ public class ChocolateyPackageInformationService : IChocolateyPackageInformation private const string ArgsFile = ".arguments"; private const string ExtraFile = ".extra"; private const string VersionOverrideFile = ".version"; + private const string DeploymentLocationFile = ".deploymentLocation"; // We need to store the package identifiers we have warned about // to prevent duplicated outputs. @@ -100,7 +101,10 @@ focus exclusively in the string values not surrounded by CData. Once { if (_fileSystem.FileExists(_fileSystem.CombinePaths(pkgStorePath, RegistrySnapshotBadFile))) { - if (_config.RegularOutput) this.Log().Warn(deserializationErrorMessage); + if (_config.RegularOutput) + { + this.Log().Warn(deserializationErrorMessage); + } } else { @@ -109,16 +113,22 @@ focus exclusively in the string values not surrounded by CData. Once } catch (Exception e) { - if (_config.RegularOutput) this.Log().Warn(@"A .registry file at '{0}' + if (_config.RegularOutput) + { + this.Log().Warn(@"A .registry file at '{0}' has errored attempting to read it. This file will be renamed to '{1}' The error: {2} ".FormatWith(_fileSystem.CombinePaths(pkgStorePath, RegistrySnapshotFile), _fileSystem.CombinePaths(pkgStorePath, RegistrySnapshotBadFile), e.ToString())); + } FaultTolerance.TryCatchWithLoggingException( () => { - if (_config.RegularOutput) this.Log().Warn(deserializationErrorMessage); + if (_config.RegularOutput) + { + this.Log().Warn(deserializationErrorMessage); + } // rename the bad registry file so that it isn't processed again _fileSystem.MoveFile(_fileSystem.CombinePaths(pkgStorePath, RegistrySnapshotFile), _fileSystem.CombinePaths(pkgStorePath, RegistrySnapshotBadFile)); @@ -138,15 +148,22 @@ has errored attempting to read it. This file will be renamed to "Unable to read files snapshot file", throwError: false, logWarningInsteadOfError: true, - isSilent:true + isSilent: true ); packageInformation.HasSilentUninstall = _fileSystem.FileExists(_fileSystem.CombinePaths(pkgStorePath, SilentUninstallerFile)); packageInformation.IsPinned = _fileSystem.FileExists(_fileSystem.CombinePaths(pkgStorePath, PinFile)); var argsFile = _fileSystem.CombinePaths(pkgStorePath, ArgsFile); - if (_fileSystem.FileExists(argsFile)) packageInformation.Arguments = _fileSystem.ReadFile(argsFile); + if (_fileSystem.FileExists(argsFile)) + { + packageInformation.Arguments = _fileSystem.ReadFile(argsFile); + } + var extraInfoFile = _fileSystem.CombinePaths(pkgStorePath, ExtraFile); - if (_fileSystem.FileExists(extraInfoFile)) packageInformation.ExtraInformation = _fileSystem.ReadFile(extraInfoFile); + if (_fileSystem.FileExists(extraInfoFile)) + { + packageInformation.ExtraInformation = _fileSystem.ReadFile(extraInfoFile); + } var versionOverrideFile = _fileSystem.CombinePaths(pkgStorePath, VersionOverrideFile); if (_fileSystem.FileExists(versionOverrideFile)) @@ -163,6 +180,20 @@ has errored attempting to read it. This file will be renamed to ); } + var locationFile = _fileSystem.CombinePaths(pkgStorePath, DeploymentLocationFile); + if (_fileSystem.FileExists(locationFile)) + { + FaultTolerance.TryCatchWithLoggingException( + () => + { + packageInformation.DeploymentLocation = _fileSystem.ReadFile(locationFile); + }, + "Unable to read deployment location file", + throwError: false, + logWarningInsteadOfError: true + ); + } + return packageInformation; } @@ -173,7 +204,11 @@ public void Save(ChocolateyPackageInformation packageInformation) if (packageInformation.Package == null) { - if (_config.RegularOutput) this.Log().Debug("No package information to save as package is null."); + if (_config.RegularOutput) + { + this.Log().Debug("No package information to save as package is null."); + } + return; } @@ -202,7 +237,11 @@ public void Save(ChocolateyPackageInformation packageInformation) if (!string.IsNullOrWhiteSpace(packageInformation.Arguments)) { var argsFile = _fileSystem.CombinePaths(pkgStorePath, ArgsFile); - if (_fileSystem.FileExists(argsFile)) _fileSystem.DeleteFile(argsFile); + if (_fileSystem.FileExists(argsFile)) + { + _fileSystem.DeleteFile(argsFile); + } + _fileSystem.WriteFile(argsFile, packageInformation.Arguments); } else @@ -213,7 +252,11 @@ public void Save(ChocolateyPackageInformation packageInformation) if (!string.IsNullOrWhiteSpace(packageInformation.ExtraInformation)) { var extraFile = _fileSystem.CombinePaths(pkgStorePath, ExtraFile); - if (_fileSystem.FileExists(extraFile)) _fileSystem.DeleteFile(extraFile); + if (_fileSystem.FileExists(extraFile)) + { + _fileSystem.DeleteFile(extraFile); + } + _fileSystem.WriteFile(extraFile, packageInformation.ExtraInformation); } else @@ -224,7 +267,11 @@ public void Save(ChocolateyPackageInformation packageInformation) if (packageInformation.VersionOverride != null) { var versionOverrideFile = _fileSystem.CombinePaths(pkgStorePath, VersionOverrideFile); - if (_fileSystem.FileExists(versionOverrideFile)) _fileSystem.DeleteFile(versionOverrideFile); + if (_fileSystem.FileExists(versionOverrideFile)) + { + _fileSystem.DeleteFile(versionOverrideFile); + } + _fileSystem.WriteFile(versionOverrideFile, packageInformation.VersionOverride.ToNormalizedStringChecked()); } else @@ -248,12 +295,31 @@ public void Save(ChocolateyPackageInformation packageInformation) { _fileSystem.DeleteFile(_fileSystem.CombinePaths(pkgStorePath, PinFile)); } + + if (!string.IsNullOrWhiteSpace(packageInformation.DeploymentLocation)) + { + var locationFile = _fileSystem.CombinePaths(pkgStorePath, DeploymentLocationFile); + if (_fileSystem.FileExists(locationFile)) + { + _fileSystem.DeleteFile(locationFile); + } + + _fileSystem.WriteFile(locationFile, packageInformation.DeploymentLocation); + } + else + { + _fileSystem.DeleteFile(_fileSystem.CombinePaths(pkgStorePath, DeploymentLocationFile)); + } } public void Remove(IPackageMetadata package) { var pkgStorePath = GetStorePath(_fileSystem, package.Id, package.Version); - if (_config.RegularOutput) this.Log().Info("Removing Package Information for {0}".FormatWith(pkgStorePath)); + if (_config.RegularOutput) + { + this.Log().Info("Removing Package Information for {0}".FormatWith(pkgStorePath)); + } + _fileSystem.DeleteDirectoryChecked(pkgStorePath, recursive: true); } @@ -306,7 +372,7 @@ private static string GetStorePath(IFileSystem fileSystem, string id, NuGetVersi return preferredStorePath; } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public ChocolateyPackageInformation get_package_information(IPackageMetadata package) => Get(package); @@ -318,6 +384,6 @@ public void save_package_information(ChocolateyPackageInformation packageInforma [Obsolete("This overload is deprecated and will be removed in v3.")] public void remove_package_information(IPackageMetadata package) => Remove(package); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/services/ChocolateyPackageService.cs b/src/chocolatey/infrastructure.app/services/ChocolateyPackageService.cs index e79199659d..fc9b292606 100644 --- a/src/chocolatey/infrastructure.app/services/ChocolateyPackageService.cs +++ b/src/chocolatey/infrastructure.app/services/ChocolateyPackageService.cs @@ -14,35 +14,35 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.ComponentModel.Design; +using System.IO; +using System.Linq; +using System.Text; +using chocolatey.infrastructure.app.registration; +using chocolatey.infrastructure.commandline; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.domain; +using chocolatey.infrastructure.app.events; +using chocolatey.infrastructure.commands; +using chocolatey.infrastructure.events; +using chocolatey.infrastructure.services; +using chocolatey.infrastructure.logging; +using chocolatey.infrastructure.app.nuget; +using NuGet.Configuration; +using NuGet.Packaging; +using NuGet.Protocol.Core.Types; +using NuGet.Versioning; +using chocolatey.infrastructure.platforms; +using chocolatey.infrastructure.results; +using SimpleInjector; +using chocolatey.infrastructure.tolerance; +using IFileSystem = chocolatey.infrastructure.filesystem.IFileSystem; + namespace chocolatey.infrastructure.app.services { - using System; - using System.Collections.Concurrent; - using System.Collections.Generic; - using System.ComponentModel.Design; - using System.IO; - using System.Linq; - using System.Text; - using chocolatey.infrastructure.app.registration; - using commandline; - using configuration; - using domain; - using events; - using infrastructure.commands; - using infrastructure.events; - using infrastructure.services; - using logging; - using nuget; - using NuGet.Configuration; - using NuGet.Packaging; - using NuGet.Protocol.Core.Types; - using NuGet.Versioning; - using platforms; - using results; - using SimpleInjector; - using tolerance; - using IFileSystem = filesystem.IFileSystem; - public class ChocolateyPackageService : IChocolateyPackageService { private readonly INugetService _nugetService; @@ -255,7 +255,10 @@ public virtual IEnumerable List(ChocolateyConfiguration config) yield break; } - if (config.RegularOutput) this.Log().Debug(() => "Searching for package information"); + if (config.RegularOutput) + { + this.Log().Debug(() => "Searching for package information"); + } var packages = new List(); @@ -326,7 +329,10 @@ private IEnumerable ReportRegistryPrograms(ChocolateyConfiguratio if (config.RegularOutput) { this.Log().Info("{0}|{1}".FormatWith(key.DisplayName, key.DisplayVersion)); - if (config.Verbose) this.Log().Info(" InstallLocation: {0}{1} Uninstall:{2}".FormatWith(key.InstallLocation.ToStringSafe().EscapeCurlyBraces(), Environment.NewLine, key.UninstallString.ToStringSafe().EscapeCurlyBraces())); + if (config.Verbose) + { + this.Log().Info(" InstallLocation: {0}{1} Uninstall:{2}".FormatWith(key.InstallLocation.ToStringSafe().EscapeCurlyBraces(), Environment.NewLine, key.UninstallString.ToStringSafe().EscapeCurlyBraces())); + } } count++; @@ -432,7 +438,11 @@ public void RandomlyNotifyAboutLicensedFeatures(ChocolateyConfiguration config, // doesn't like to grab the max value. var messageCount = _proBusinessMessages.Count; var chosenMessage = new Random().Next(0, messageCount); - if (chosenMessage >= messageCount) chosenMessage = messageCount - 1; + if (chosenMessage >= messageCount) + { + chosenMessage = messageCount - 1; + } + message = _proBusinessMessages[chosenMessage]; } @@ -453,7 +463,7 @@ public virtual void HandlePackageResult(PackageResult packageResult, ChocolateyC var pkgInfo = GetPackageInformation(packageResult, config); // initialize this here so it can be used for the install location later - bool powerShellRan = false; + var powerShellRan = false; if (packageResult.Success && config.Information.PlatformType == PlatformType.Windows) { @@ -466,7 +476,10 @@ public virtual void HandlePackageResult(PackageResult packageResult, ChocolateyC if (powerShellRan) { // we don't care about the exit code - if (config.Information.PlatformType == PlatformType.Windows) CommandExecutor.ExecuteStatic(_shutdownExe, "/a", config.CommandExecutionTimeoutSeconds, _fileSystem.GetCurrentDirectory(), (s, e) => { }, (s, e) => { }, false, false); + if (config.Information.PlatformType == PlatformType.Windows) + { + CommandExecutor.ExecuteStatic(_shutdownExe, "/a", config.CommandExecutionTimeoutSeconds, _fileSystem.GetCurrentDirectory(), (s, e) => { }, (s, e) => { }, false, false); + } } var installersDifferences = _registryService.GetInstallerKeysChanged(installersBefore, _registryService.GetInstallerKeys()); @@ -501,11 +514,18 @@ public virtual void HandlePackageResult(PackageResult packageResult, ChocolateyC var is32Bit = !config.Information.Is64BitProcess || config.ForceX86; CreateExecutableIgnoreFiles(packageResult.InstallLocation, !is32Bit); - if (packageResult.Success) _shimgenService.Install(config, packageResult); + if (packageResult.Success) + { + _shimgenService.Install(config, packageResult); + } } else { - if (config.Information.PlatformType != PlatformType.Windows) this.Log().Info(ChocolateyLoggers.Important, () => " Skipping PowerShell and shimgen portions of the install due to non-Windows."); + if (config.Information.PlatformType != PlatformType.Windows) + { + this.Log().Info(ChocolateyLoggers.Important, () => " Skipping PowerShell and shimgen portions of the install due to non-Windows."); + } + if (packageResult.Success) { _configTransformService.Run(packageResult, config); @@ -518,7 +538,7 @@ public virtual void HandlePackageResult(PackageResult packageResult, ChocolateyC HandleExtensionPackages(config, packageResult); HandleTemplatePackages(config, packageResult); HandleHookPackages(config, packageResult); - pkgInfo.Arguments = CaptureArguments(config, packageResult); + pkgInfo.Arguments = CaptureArguments(config); pkgInfo.IsPinned = config.PinPackage; } @@ -540,11 +560,16 @@ public virtual void HandlePackageResult(PackageResult packageResult, ChocolateyC if (pkgInfo.RegistrySnapshot != null && pkgInfo.RegistrySnapshot.RegistryKeys.Any(k => !string.IsNullOrWhiteSpace(k.InstallLocation))) { var key = pkgInfo.RegistrySnapshot.RegistryKeys.FirstOrDefault(k => !string.IsNullOrWhiteSpace(k.InstallLocation)); - if (key != null) Environment.SetEnvironmentVariable(ApplicationParameters.Environment.ChocolateyPackageInstallLocation, key.InstallLocation, EnvironmentVariableTarget.Process); + if (key != null) + { + Environment.SetEnvironmentVariable(ApplicationParameters.Environment.ChocolateyPackageInstallLocation, key.InstallLocation, EnvironmentVariableTarget.Process); + } } + pkgInfo.DeploymentLocation = Environment.GetEnvironmentVariable(ApplicationParameters.Environment.ChocolateyPackageInstallLocation); + UpdatePackageInformation(pkgInfo); - EnsureBadPackagesPathIsClean(config, packageResult); + EnsureBadPackagesPathIsClean(packageResult); EventManager.Publish(new HandlePackageResultCompletedMessage(packageResult, config, commandName)); UnmarkPackagePending(packageResult, config); @@ -578,11 +603,10 @@ public virtual void HandlePackageResult(PackageResult packageResult, ChocolateyC this.Log().Info(ChocolateyLoggers.Important, " The {0} of {1} was successful.".FormatWith(commandName.ToStringSafe(), packageResult.Name)); - var installLocation = Environment.GetEnvironmentVariable(ApplicationParameters.Environment.ChocolateyPackageInstallLocation); var installerDetected = Environment.GetEnvironmentVariable(ApplicationParameters.Environment.ChocolateyPackageInstallerType); - if (!string.IsNullOrWhiteSpace(installLocation)) + if (!string.IsNullOrWhiteSpace(pkgInfo.DeploymentLocation)) { - this.Log().Info(ChocolateyLoggers.Important, " Software installed to '{0}'".FormatWith(installLocation.EscapeCurlyBraces())); + this.Log().Info(ChocolateyLoggers.Important, " Deployed to '{0}'".FormatWith(pkgInfo.DeploymentLocation.EscapeCurlyBraces())); } else if (!string.IsNullOrWhiteSpace(installerDetected)) { @@ -627,36 +651,83 @@ protected virtual void UpdatePackageInformation(ChocolateyPackageInformation pkg _packageInfoService.Save(pkgInfo); } - private string CaptureArguments(ChocolateyConfiguration config, PackageResult packageResult) + private string CaptureArguments(ChocolateyConfiguration config) { var arguments = new StringBuilder(); // use the config to reconstruct //bug:sources are unable to be used - it's late in the process when a package is known - //arguments.Append(" --source=\"'{0}'\"".format_with(config.Sources)); + //arguments.Append(" --source=\"'{0}'\"".FormatWith(config.Sources)); + + if (config.Prerelease) + { + arguments.Append(" --prerelease"); + } + + if (config.IgnoreDependencies) + { + arguments.Append(" --ignore-dependencies"); + } + + if (config.ForceX86) + { + arguments.Append(" --forcex86"); + } + + if (!string.IsNullOrWhiteSpace(config.InstallArguments)) + { + arguments.Append(" --install-arguments=\"'{0}'\"".FormatWith(config.InstallArguments)); + } + + if (config.OverrideArguments) + { + arguments.Append(" --override-arguments"); + } - if (config.Prerelease) arguments.Append(" --prerelease"); - if (config.IgnoreDependencies) arguments.Append(" --ignore-dependencies"); - if (config.ForceX86) arguments.Append(" --forcex86"); + if (config.ApplyInstallArgumentsToDependencies) + { + arguments.Append(" --apply-install-arguments-to-dependencies"); + } - if (!string.IsNullOrWhiteSpace(config.InstallArguments)) arguments.Append(" --install-arguments=\"'{0}'\"".FormatWith(config.InstallArguments)); - if (config.OverrideArguments) arguments.Append(" --override-arguments"); - if (config.ApplyInstallArgumentsToDependencies) arguments.Append(" --apply-install-arguments-to-dependencies"); + if (!string.IsNullOrWhiteSpace(config.PackageParameters)) + { + arguments.Append(" --package-parameters=\"'{0}'\"".FormatWith(config.PackageParameters)); + } - if (!string.IsNullOrWhiteSpace(config.PackageParameters)) arguments.Append(" --package-parameters=\"'{0}'\"".FormatWith(config.PackageParameters)); - if (config.ApplyPackageParametersToDependencies) arguments.Append(" --apply-package-parameters-to-dependencies"); + if (config.ApplyPackageParametersToDependencies) + { + arguments.Append(" --apply-package-parameters-to-dependencies"); + } - if (config.AllowDowngrade) arguments.Append(" --allow-downgrade"); + if (config.AllowDowngrade) + { + arguments.Append(" --allow-downgrade"); + } // most times folks won't want to skip automation scripts on upgrade //if (config.SkipPackageInstallProvider) arguments.Append(" --skip-automation-scripts"); //if (config.UpgradeCommand.FailOnUnfound) arguments.Append(" --fail-on-unfound"); - if (!string.IsNullOrWhiteSpace(config.SourceCommand.Username)) arguments.Append(" --user=\"'{0}'\"".FormatWith(config.SourceCommand.Username)); - if (!string.IsNullOrWhiteSpace(config.SourceCommand.Password)) arguments.Append(" --password=\"'{0}'\"".FormatWith(config.SourceCommand.Password)); - if (!string.IsNullOrWhiteSpace(config.SourceCommand.Certificate)) arguments.Append(" --cert=\"'{0}'\"".FormatWith(config.SourceCommand.Certificate)); - if (!string.IsNullOrWhiteSpace(config.SourceCommand.CertificatePassword)) arguments.Append(" --certpassword=\"'{0}'\"".FormatWith(config.SourceCommand.CertificatePassword)); + if (!string.IsNullOrWhiteSpace(config.SourceCommand.Username)) + { + arguments.Append(" --user=\"'{0}'\"".FormatWith(config.SourceCommand.Username)); + } + + if (!string.IsNullOrWhiteSpace(config.SourceCommand.Password)) + { + arguments.Append(" --password=\"'{0}'\"".FormatWith(config.SourceCommand.Password)); + } + + if (!string.IsNullOrWhiteSpace(config.SourceCommand.Certificate)) + { + arguments.Append(" --cert=\"'{0}'\"".FormatWith(config.SourceCommand.Certificate)); + } + + if (!string.IsNullOrWhiteSpace(config.SourceCommand.CertificatePassword)) + { + arguments.Append(" --certpassword=\"'{0}'\"".FormatWith(config.SourceCommand.CertificatePassword)); + } // this should likely be limited //if (!config.Features.ChecksumFiles) arguments.Append(" --ignore-checksums"); @@ -670,9 +741,20 @@ private string CaptureArguments(ChocolateyConfiguration config, PackageResult pa arguments.Append(" --execution-timeout=\"'{0}'\"".FormatWith(config.CommandExecutionTimeoutSeconds)); } - if (!string.IsNullOrWhiteSpace(config.CacheLocation)) arguments.Append(" --cache-location=\"'{0}'\"".FormatWith(config.CacheLocation)); - if (config.Features.FailOnStandardError) arguments.Append(" --fail-on-standard-error"); - if (!config.Features.UsePowerShellHost) arguments.Append(" --use-system-powershell"); + if (!string.IsNullOrWhiteSpace(config.CacheLocation)) + { + arguments.Append(" --cache-location=\"'{0}'\"".FormatWith(config.CacheLocation)); + } + + if (config.Features.FailOnStandardError) + { + arguments.Append(" --fail-on-standard-error"); + } + + if (!config.Features.UsePowerShellHost) + { + arguments.Append(" --use-system-powershell"); + } return NugetEncryptionUtility.EncryptString(arguments.ToStringSafe()); } @@ -731,8 +813,8 @@ public virtual ConcurrentDictionary Install(ChocolateyCon } finally { - var installFailures = ReportActionSummary(packageInstalls, "installed"); - if (installFailures != 0 && Environment.ExitCode == 0) + var actionSummaryResult = ReportActionSummary(packageInstalls, "installed"); + if (actionSummaryResult.Failures != 0 && Environment.ExitCode == 0) { Environment.ExitCode = 1; } @@ -758,9 +840,12 @@ public virtual void Outdated(ChocolateyConfiguration config) return; } - if (config.RegularOutput) this.Log().Info(ChocolateyLoggers.Important, @"Outdated Packages + if (config.RegularOutput) + { + this.Log().Info(ChocolateyLoggers.Important, @"Outdated Packages Output is package name | current version | available version | pinned? "); + } config.PackageNames = ApplicationParameters.AllPackages; config.UpgradeCommand.NotifyOnlyAvailableUpgrades = true; @@ -847,32 +932,91 @@ private IEnumerable GetPackagesFromConfigFile(string pa packageConfig.Version = pkgSettings.Version; packageConfig.InstallArguments = string.IsNullOrWhiteSpace(pkgSettings.InstallArguments) ? packageConfig.InstallArguments : pkgSettings.InstallArguments; packageConfig.PackageParameters = string.IsNullOrWhiteSpace(pkgSettings.PackageParameters) ? packageConfig.PackageParameters : pkgSettings.PackageParameters; - if (pkgSettings.ForceX86) packageConfig.ForceX86 = true; - if (pkgSettings.IgnoreDependencies) packageConfig.IgnoreDependencies = true; - if (pkgSettings.ApplyInstallArgumentsToDependencies) packageConfig.ApplyInstallArgumentsToDependencies = true; - if (pkgSettings.ApplyPackageParametersToDependencies) packageConfig.ApplyPackageParametersToDependencies = true; + if (pkgSettings.ForceX86) + { + packageConfig.ForceX86 = true; + } + + if (pkgSettings.IgnoreDependencies) + { + packageConfig.IgnoreDependencies = true; + } + + if (pkgSettings.ApplyInstallArgumentsToDependencies) + { + packageConfig.ApplyInstallArgumentsToDependencies = true; + } + + if (pkgSettings.ApplyPackageParametersToDependencies) + { + packageConfig.ApplyPackageParametersToDependencies = true; + } if (!string.IsNullOrWhiteSpace(pkgSettings.Source) && HasSourceType(pkgSettings.Source, alternativeSourceRunners)) { packageConfig.SourceType = pkgSettings.Source; } - if (pkgSettings.PinPackage) packageConfig.PinPackage = true; - if (pkgSettings.Force) packageConfig.Force = true; + if (pkgSettings.PinPackage) + { + packageConfig.PinPackage = true; + } + + if (pkgSettings.Force) + { + packageConfig.Force = true; + } + packageConfig.CommandExecutionTimeoutSeconds = pkgSettings.ExecutionTimeout == -1 ? packageConfig.CommandExecutionTimeoutSeconds : pkgSettings.ExecutionTimeout; - if (pkgSettings.Prerelease) packageConfig.Prerelease = true; - if (pkgSettings.OverrideArguments) packageConfig.OverrideArguments = true; - if (pkgSettings.NotSilent) packageConfig.NotSilent = true; - if (pkgSettings.AllowDowngrade) packageConfig.AllowDowngrade = true; - if (pkgSettings.ForceDependencies) packageConfig.ForceDependencies = true; - if (pkgSettings.SkipAutomationScripts) packageConfig.SkipPackageInstallProvider = true; + if (pkgSettings.Prerelease) + { + packageConfig.Prerelease = true; + } + + if (pkgSettings.OverrideArguments) + { + packageConfig.OverrideArguments = true; + } + + if (pkgSettings.NotSilent) + { + packageConfig.NotSilent = true; + } + + if (pkgSettings.AllowDowngrade) + { + packageConfig.AllowDowngrade = true; + } + + if (pkgSettings.ForceDependencies) + { + packageConfig.ForceDependencies = true; + } + + if (pkgSettings.SkipAutomationScripts) + { + packageConfig.SkipPackageInstallProvider = true; + } + packageConfig.SourceCommand.Username = string.IsNullOrWhiteSpace(pkgSettings.User) ? packageConfig.SourceCommand.Username : pkgSettings.User; packageConfig.SourceCommand.Password = string.IsNullOrWhiteSpace(pkgSettings.Password) ? packageConfig.SourceCommand.Password : pkgSettings.Password; packageConfig.SourceCommand.Certificate = string.IsNullOrWhiteSpace(pkgSettings.Cert) ? packageConfig.SourceCommand.Certificate : pkgSettings.Cert; packageConfig.SourceCommand.CertificatePassword = string.IsNullOrWhiteSpace(pkgSettings.CertPassword) ? packageConfig.SourceCommand.CertificatePassword : pkgSettings.CertPassword; - if (pkgSettings.IgnoreChecksums) packageConfig.Features.ChecksumFiles = false; - if (pkgSettings.AllowEmptyChecksums) packageConfig.Features.AllowEmptyChecksums = true; - if (pkgSettings.AllowEmptyChecksumsSecure) packageConfig.Features.AllowEmptyChecksumsSecure = true; + if (pkgSettings.IgnoreChecksums) + { + packageConfig.Features.ChecksumFiles = false; + } + + if (pkgSettings.AllowEmptyChecksums) + { + packageConfig.Features.AllowEmptyChecksums = true; + } + + if (pkgSettings.AllowEmptyChecksumsSecure) + { + packageConfig.Features.AllowEmptyChecksumsSecure = true; + } + if (pkgSettings.RequireChecksums) { packageConfig.Features.AllowEmptyChecksums = false; @@ -882,23 +1026,66 @@ private IEnumerable GetPackagesFromConfigFile(string pa packageConfig.DownloadChecksum64 = string.IsNullOrWhiteSpace(pkgSettings.DownloadChecksum64) ? packageConfig.DownloadChecksum64 : pkgSettings.DownloadChecksum64; packageConfig.DownloadChecksumType = string.IsNullOrWhiteSpace(pkgSettings.DownloadChecksumType) ? packageConfig.DownloadChecksumType : pkgSettings.DownloadChecksumType; packageConfig.DownloadChecksumType64 = string.IsNullOrWhiteSpace(pkgSettings.DownloadChecksumType64) ? packageConfig.DownloadChecksumType : pkgSettings.DownloadChecksumType64; - if (pkgSettings.IgnorePackageExitCodes) packageConfig.Features.UsePackageExitCodes = false; - if (pkgSettings.UsePackageExitCodes) packageConfig.Features.UsePackageExitCodes = true; - if (pkgSettings.StopOnFirstFailure) packageConfig.Features.StopOnFirstPackageFailure = true; - if (pkgSettings.ExitWhenRebootDetected) packageConfig.Features.ExitOnRebootDetected = true; - if (pkgSettings.IgnoreDetectedReboot) packageConfig.Features.ExitOnRebootDetected = false; - if (pkgSettings.DisableRepositoryOptimizations) packageConfig.Features.UsePackageRepositoryOptimizations = false; - if (pkgSettings.AcceptLicense) packageConfig.AcceptLicense = true; + if (pkgSettings.IgnorePackageExitCodes) + { + packageConfig.Features.UsePackageExitCodes = false; + } + + if (pkgSettings.UsePackageExitCodes) + { + packageConfig.Features.UsePackageExitCodes = true; + } + + if (pkgSettings.StopOnFirstFailure) + { + packageConfig.Features.StopOnFirstPackageFailure = true; + } + + if (pkgSettings.ExitWhenRebootDetected) + { + packageConfig.Features.ExitOnRebootDetected = true; + } + + if (pkgSettings.IgnoreDetectedReboot) + { + packageConfig.Features.ExitOnRebootDetected = false; + } + + if (pkgSettings.DisableRepositoryOptimizations) + { + packageConfig.Features.UsePackageRepositoryOptimizations = false; + } + + if (pkgSettings.AcceptLicense) + { + packageConfig.AcceptLicense = true; + } + if (pkgSettings.Confirm) { packageConfig.PromptForConfirmation = false; packageConfig.AcceptLicense = true; } - if (pkgSettings.LimitOutput) packageConfig.RegularOutput = false; + if (pkgSettings.LimitOutput) + { + packageConfig.RegularOutput = false; + } + packageConfig.CacheLocation = string.IsNullOrWhiteSpace(pkgSettings.CacheLocation) ? packageConfig.CacheLocation : pkgSettings.CacheLocation; - if (pkgSettings.FailOnStderr) packageConfig.Features.FailOnStandardError = true; - if (pkgSettings.UseSystemPowershell) packageConfig.Features.UsePowerShellHost = false; - if (pkgSettings.NoProgress) packageConfig.Features.ShowDownloadProgress = false; + if (pkgSettings.FailOnStderr) + { + packageConfig.Features.FailOnStandardError = true; + } + + if (pkgSettings.UseSystemPowershell) + { + packageConfig.Features.UsePowerShellHost = false; + } + + if (pkgSettings.NoProgress) + { + packageConfig.Features.ShowDownloadProgress = false; + } this.Log().Info(ChocolateyLoggers.Important, @"{0}".FormatWith(packageConfig.PackageNames)); packageConfigs.Add(packageConfig); @@ -931,7 +1118,7 @@ public void UpgradeDryRun(ChocolateyConfiguration config) if (config.RegularOutput) { - var noopFailures = ReportActionSummary(noopUpgrades, "can upgrade"); + var actionSummaryResult = ReportActionSummary(noopUpgrades, "can upgrade"); } RandomlyNotifyAboutLicensedFeatures(config); @@ -991,12 +1178,17 @@ public virtual ConcurrentDictionary Upgrade(ChocolateyCon } finally { - var upgradeFailures = ReportActionSummary(packageUpgrades, "upgraded"); - if (upgradeFailures != 0 && Environment.ExitCode == 0) + var actionSummaryResult = ReportActionSummary(packageUpgrades, "upgraded"); + if (actionSummaryResult.Failures != 0 && Environment.ExitCode == 0) { Environment.ExitCode = 1; } + if (config.Features.UseEnhancedExitCodes && (actionSummaryResult.Successes + actionSummaryResult.Failures == 0) && Environment.ExitCode == 0) + { + Environment.ExitCode = 2; + } + RandomlyNotifyAboutLicensedFeatures(config); } @@ -1011,7 +1203,10 @@ private void BeforeModifyAction(PackageResult packageResult, ChocolateyConfigura } else { - if (config.Information.PlatformType != PlatformType.Windows) this.Log().Info(ChocolateyLoggers.Important, () => " Skipping beforemodify PowerShell script due to non-Windows."); + if (config.Information.PlatformType != PlatformType.Windows) + { + this.Log().Info(ChocolateyLoggers.Important, () => " Skipping beforemodify PowerShell script due to non-Windows."); + } } } @@ -1085,13 +1280,13 @@ public virtual ConcurrentDictionary Uninstall(ChocolateyC } finally { - var uninstallFailures = ReportActionSummary(packageUninstalls, "uninstalled"); - if (uninstallFailures != 0 && Environment.ExitCode == 0) + var actionSummaryResult = ReportActionSummary(packageUninstalls, "uninstalled"); + if (actionSummaryResult.Failures != 0 && Environment.ExitCode == 0) { Environment.ExitCode = 1; } - if (uninstallFailures != 0) + if (actionSummaryResult.Failures != 0) { this.Log().Warn(@" If a package uninstall is failing and/or you've already uninstalled the @@ -1239,7 +1434,7 @@ private void BuildInstallExample(string packageName, StringBuilder sb, string co } } - private int ReportActionSummary(ConcurrentDictionary packageResults, string actionName) + private (int Successes, int Failures, int Warnings, int RebootPackages) ReportActionSummary(ConcurrentDictionary packageResults, string actionName) { var successes = packageResults.OrEmpty().Where(p => p.Value.Success && !p.Value.Inconclusive).OrderBy(p => p.Value.Name); var failures = packageResults.Count(p => !p.Value.Success); @@ -1307,7 +1502,7 @@ The recent package changes indicate a reboot is necessary. } } - return failures; + return (successes.Count(), failures, warnings, rebootPackages); } public virtual void HandlePackageUninstall(PackageResult packageResult, ChocolateyConfiguration config) @@ -1369,9 +1564,12 @@ public virtual void HandlePackageUninstall(PackageResult packageResult, Chocolat private void UninstallCleanup(ChocolateyConfiguration config, PackageResult packageResult) { - if (config.Features.RemovePackageInformationOnUninstall) _packageInfoService.Remove(packageResult.PackageMetadata); + if (config.Features.RemovePackageInformationOnUninstall) + { + _packageInfoService.Remove(packageResult.PackageMetadata); + } - EnsureBadPackagesPathIsClean(config, packageResult); + EnsureBadPackagesPathIsClean(packageResult); RemoveBackupIfExists(packageResult); HandleExtensionPackages(config, packageResult); HandleTemplatePackages(config, packageResult); @@ -1381,7 +1579,10 @@ private void UninstallCleanup(ChocolateyConfiguration config, PackageResult pack { var packageDirectory = packageResult.InstallLocation; - if (string.IsNullOrWhiteSpace(packageDirectory) || !_fileSystem.DirectoryExists(packageDirectory)) return; + if (string.IsNullOrWhiteSpace(packageDirectory) || !_fileSystem.DirectoryExists(packageDirectory)) + { + return; + } if (packageDirectory.IsEqualTo(ApplicationParameters.InstallLocation) || packageDirectory.IsEqualTo(ApplicationParameters.PackagesLocation)) { @@ -1404,8 +1605,15 @@ private void UninstallCleanup(ChocolateyConfiguration config, PackageResult pack // This should probably be split into install(/upgrade)/uninstall methods with shared logic placed in helper method(s). private void HandleExtensionPackages(ChocolateyConfiguration config, PackageResult packageResult) { - if (packageResult == null) return; - if (!packageResult.Name.ToLowerSafe().EndsWith(".extension") && !packageResult.Name.ToLowerSafe().EndsWith(".extensions")) return; + if (packageResult == null) + { + return; + } + + if (!packageResult.Name.ToLowerSafe().EndsWith(".extension") && !packageResult.Name.ToLowerSafe().EndsWith(".extensions")) + { + return; + } _fileSystem.EnsureDirectoryExists(ApplicationParameters.ExtensionsLocation); var extensionsFolderName = packageResult.Name.ToLowerSafe().Replace(".extensions", string.Empty).Replace(".extension", string.Empty); @@ -1418,7 +1626,10 @@ private void HandleExtensionPackages(ChocolateyConfiguration config, PackageResu if (!config.CommandName.IsEqualTo(CommandNameType.Uninstall.ToStringSafe())) { - if (packageResult.InstallLocation == null) return; + if (packageResult.InstallLocation == null) + { + return; + } _fileSystem.EnsureDirectoryExists(packageExtensionsInstallDirectory); var extensionsFolder = _fileSystem.CombinePaths(packageResult.InstallLocation, "extensions"); @@ -1428,7 +1639,7 @@ private void HandleExtensionPackages(ChocolateyConfiguration config, PackageResu () => _fileSystem.CopyDirectory(extensionFolderToCopy, packageExtensionsInstallDirectory, overwriteExisting: true), "Attempted to copy{0} '{1}'{0} to '{2}'{0} but had an error".FormatWith(Environment.NewLine, extensionFolderToCopy, packageExtensionsInstallDirectory)); - string logMessage = " Installed/updated {0} extensions.".FormatWith(extensionsFolderName); + var logMessage = " Installed/updated {0} extensions.".FormatWith(extensionsFolderName); this.Log().Warn(logMessage); packageResult.Messages.Add(new ResultMessage(ResultType.Note, logMessage)); @@ -1436,7 +1647,7 @@ private void HandleExtensionPackages(ChocolateyConfiguration config, PackageResu } else { - string logMessage = " Uninstalled {0} extensions.".FormatWith(extensionsFolderName); + var logMessage = " Uninstalled {0} extensions.".FormatWith(extensionsFolderName); this.Log().Warn(logMessage); packageResult.Messages.Add(new ResultMessage(ResultType.Note, logMessage)); } @@ -1444,7 +1655,10 @@ private void HandleExtensionPackages(ChocolateyConfiguration config, PackageResu private void RemoveExtensionFolder(string packageExtensionsDirectory) { - if (!_fileSystem.DirectoryExists(packageExtensionsDirectory)) return; + if (!_fileSystem.DirectoryExists(packageExtensionsDirectory)) + { + return; + } // remove old dll files files foreach (var oldDllFile in _fileSystem.GetFiles(packageExtensionsDirectory, "*.dll.old", SearchOption.AllDirectories).OrEmpty()) @@ -1484,8 +1698,15 @@ private void RemoveExtensionFolder(string packageExtensionsDirectory) // This should probably be split into install(/upgrade)/uninstall methods with shared logic placed in helper method(s). private void HandleTemplatePackages(ChocolateyConfiguration config, PackageResult packageResult) { - if (packageResult == null) return; - if (!packageResult.Name.ToLowerSafe().EndsWith(".template")) return; + if (packageResult == null) + { + return; + } + + if (!packageResult.Name.ToLowerSafe().EndsWith(".template")) + { + return; + } _fileSystem.EnsureDirectoryExists(ApplicationParameters.TemplatesLocation); var templateFolderName = packageResult.Name.ToLowerSafe().Replace(".template", string.Empty); @@ -1497,7 +1718,10 @@ private void HandleTemplatePackages(ChocolateyConfiguration config, PackageResul if (!config.CommandName.IsEqualTo(CommandNameType.Uninstall.ToStringSafe())) { - if (packageResult.InstallLocation == null) return; + if (packageResult.InstallLocation == null) + { + return; + } _fileSystem.EnsureDirectoryExists(installTemplatePath); var templatesPath = _fileSystem.CombinePaths(packageResult.InstallLocation, "templates"); @@ -1514,7 +1738,7 @@ private void HandleTemplatePackages(ChocolateyConfiguration config, PackageResul }, "Attempted to copy{0} '{1}'{0} to '{2}'{0} but had an error".FormatWith(Environment.NewLine, templatesFolderToCopy, installTemplatePath)); - string logMessage = " Installed/updated {0} template.".FormatWith(templateFolderName); + var logMessage = " Installed/updated {0} template.".FormatWith(templateFolderName); this.Log().Warn(logMessage); packageResult.Messages.Add(new ResultMessage(ResultType.Note, logMessage)); @@ -1522,20 +1746,23 @@ private void HandleTemplatePackages(ChocolateyConfiguration config, PackageResul } else { - string logMessage = " Uninstalled {0} template.".FormatWith(templateFolderName); + var logMessage = " Uninstalled {0} template.".FormatWith(templateFolderName); this.Log().Warn(logMessage); packageResult.Messages.Add(new ResultMessage(ResultType.Note, logMessage)); } } - private void EnsureBadPackagesPathIsClean(ChocolateyConfiguration config, PackageResult packageResult) + private void EnsureBadPackagesPathIsClean(PackageResult packageResult) { - if (packageResult.InstallLocation == null) return; + if (packageResult.InstallLocation == null) + { + return; + } FaultTolerance.TryCatchWithLoggingException( () => { - string badPackageInstallPath = packageResult.InstallLocation.Replace(ApplicationParameters.PackagesLocation, ApplicationParameters.PackageFailuresLocation); + var badPackageInstallPath = packageResult.InstallLocation.Replace(ApplicationParameters.PackagesLocation, ApplicationParameters.PackageFailuresLocation); if (_fileSystem.DirectoryExists(badPackageInstallPath)) { _fileSystem.DeleteDirectory(badPackageInstallPath, recursive: true); @@ -1546,7 +1773,10 @@ private void EnsureBadPackagesPathIsClean(ChocolateyConfiguration config, Packag private void HandleFailedOperation(ChocolateyConfiguration config, PackageResult packageResult, bool movePackageToFailureLocation, bool attemptRollback) { - if (Environment.ExitCode == 0) Environment.ExitCode = 1; + if (Environment.ExitCode == 0) + { + Environment.ExitCode = 1; + } foreach (var message in packageResult.Messages.Where(m => m.MessageType == ResultType.Error)) { @@ -1570,9 +1800,15 @@ rollback the previous version. Erroneous install location captured as } else { - if (movePackageToFailureLocation) MovePackageToFailedPackagesLocation(packageResult); + if (movePackageToFailureLocation) + { + MovePackageToFailedPackagesLocation(packageResult); + } - if (attemptRollback) RestorePreviousPackageVersion(config, packageResult); + if (attemptRollback) + { + RestorePreviousPackageVersion(config, packageResult); + } } } } @@ -1600,7 +1836,10 @@ private void MovePackageToFailedPackagesLocation(PackageResult packageResult) private void RestorePreviousPackageVersion(ChocolateyConfiguration config, PackageResult packageResult) { - if (packageResult.InstallLocation == null) return; + if (packageResult.InstallLocation == null) + { + return; + } var normalizedVersion = new NuGetVersion(packageResult.Version).ToNormalizedStringChecked(); @@ -1625,8 +1864,15 @@ private void RestorePreviousPackageVersion(ChocolateyConfiguration config, Packa rollbackDirectory = _fileSystem.GetFullPath(rollbackDirectory); - if (string.IsNullOrWhiteSpace(rollbackDirectory) || !_fileSystem.DirectoryExists(rollbackDirectory)) return; - if (!rollbackDirectory.StartsWith(ApplicationParameters.PackageBackupLocation) || rollbackDirectory.IsEqualTo(ApplicationParameters.PackageBackupLocation)) return; + if (string.IsNullOrWhiteSpace(rollbackDirectory) || !_fileSystem.DirectoryExists(rollbackDirectory)) + { + return; + } + + if (!rollbackDirectory.StartsWith(ApplicationParameters.PackageBackupLocation) || rollbackDirectory.IsEqualTo(ApplicationParameters.PackageBackupLocation)) + { + return; + } this.Log().Debug("Attempting rollback"); @@ -1651,12 +1897,15 @@ private void RestorePreviousPackageVersion(ChocolateyConfiguration config, Packa allowShortAnswer: true, shortPrompt: true ); - if (selection.IsEqualTo("no")) rollback = false; + if (selection.IsEqualTo("no")) + { + rollback = false; + } } if (rollback) { - var destination = _fileSystem.CombinePaths(ApplicationParameters.PackagesLocation, packageResult.Identity.Id); + var destination = _fileSystem.CombinePaths(ApplicationParameters.PackagesLocation, packageResult.Identity.Id); _filesService.MovePackageUsingBackupStrategy(rollbackDirectory, destination, restoreSource: false); } @@ -1671,7 +1920,11 @@ private void RemoveBackupIfExists(PackageResult packageResult) public virtual void MarkPackagePending(PackageResult packageResult, ChocolateyConfiguration config) { var packageDirectory = packageResult.InstallLocation; - if (string.IsNullOrWhiteSpace(packageDirectory)) return; + if (string.IsNullOrWhiteSpace(packageDirectory)) + { + return; + } + if (packageDirectory.IsEqualTo(ApplicationParameters.InstallLocation) || packageDirectory.IsEqualTo(ApplicationParameters.PackagesLocation)) { packageResult.Messages.Add( @@ -1695,7 +1948,11 @@ public virtual void MarkPackagePending(PackageResult packageResult, ChocolateyCo public virtual void UnmarkPackagePending(PackageResult packageResult, ChocolateyConfiguration config) { var packageDirectory = packageResult.InstallLocation; - if (string.IsNullOrWhiteSpace(packageDirectory)) return; + if (string.IsNullOrWhiteSpace(packageDirectory)) + { + return; + } + if (packageDirectory.IsEqualTo(ApplicationParameters.InstallLocation) || packageDirectory.IsEqualTo(ApplicationParameters.PackagesLocation)) { packageResult.Messages.Add( @@ -1718,12 +1975,19 @@ public virtual void UnmarkPackagePending(PackageResult packageResult, Chocolatey fileLock.Dispose(); } - if (packageResult.Success && _fileSystem.FileExists(pendingFile)) _fileSystem.DeleteFile(pendingFile); + if (packageResult.Success && _fileSystem.FileExists(pendingFile)) + { + _fileSystem.DeleteFile(pendingFile); + } } private IEnumerable GetInitialEnvironment(ChocolateyConfiguration config, bool allowLogging = true) { - if (config.Information.PlatformType != PlatformType.Windows) return Enumerable.Empty(); + if (config.Information.PlatformType != PlatformType.Windows) + { + return Enumerable.Empty(); + } + var environmentBefore = _registryService.GetEnvironmentValues(); if (allowLogging && config.Features.LogEnvironmentValues) @@ -1804,8 +2068,15 @@ private TSourceRunner GetSourceRunner(string sourceType, IEnumera // This should probably be split into install(/upgrade)/uninstall methods with shared logic placed in helper method(s). private void HandleHookPackages(ChocolateyConfiguration config, PackageResult packageResult) { - if (packageResult == null) return; - if (!packageResult.Name.ToLowerSafe().EndsWith(ApplicationParameters.HookPackageIdExtension)) return; + if (packageResult == null) + { + return; + } + + if (!packageResult.Name.ToLowerSafe().EndsWith(ApplicationParameters.HookPackageIdExtension)) + { + return; + } _fileSystem.EnsureDirectoryExists(ApplicationParameters.HooksLocation); var hookFolderName = packageResult.Name.ToLowerSafe().Replace(ApplicationParameters.HookPackageIdExtension, string.Empty); @@ -1820,7 +2091,10 @@ private void HandleHookPackages(ChocolateyConfiguration config, PackageResult pa if (!config.CommandName.IsEqualTo(CommandNameType.Uninstall.ToStringSafe())) { - if (packageResult.InstallLocation == null) return; + if (packageResult.InstallLocation == null) + { + return; + } _fileSystem.EnsureDirectoryExists(installHookPath); var hookPath = _fileSystem.CombinePaths(packageResult.InstallLocation, "hook"); @@ -1833,7 +2107,7 @@ private void HandleHookPackages(ChocolateyConfiguration config, PackageResult pa }, "Attempted to copy{0} '{1}'{0} to '{2}'{0} but had an error".FormatWith(Environment.NewLine, hookFolderToCopy, installHookPath)); - string logMessage = " Installed/updated {0} hook.".FormatWith(hookFolderName); + var logMessage = " Installed/updated {0} hook.".FormatWith(hookFolderName); this.Log().Warn(logMessage); packageResult.Messages.Add(new ResultMessage(ResultType.Note, logMessage)); @@ -1841,13 +2115,13 @@ private void HandleHookPackages(ChocolateyConfiguration config, PackageResult pa } else { - string logMessage = " Uninstalled {0} hook.".FormatWith(hookFolderName); + var logMessage = " Uninstalled {0} hook.".FormatWith(hookFolderName); this.Log().Warn(logMessage); packageResult.Messages.Add(new ResultMessage(ResultType.Note, logMessage)); } } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public virtual int count_run(ChocolateyConfiguration config) => Count(config); @@ -1935,6 +2209,6 @@ public virtual void set_pending(PackageResult packageResult, ChocolateyConfigura [Obsolete("This overload is deprecated and will be removed in v3.")] public virtual void remove_pending(PackageResult packageResult, ChocolateyConfiguration config) => UnmarkPackagePending(packageResult, config); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/services/ConfigTransformService.cs b/src/chocolatey/infrastructure.app/services/ConfigTransformService.cs index 7dc4d3f05a..3e8d283ff4 100644 --- a/src/chocolatey/infrastructure.app/services/ConfigTransformService.cs +++ b/src/chocolatey/infrastructure.app/services/ConfigTransformService.cs @@ -14,19 +14,19 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using Microsoft.Web.XmlTransform; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.filesystem; +using chocolatey.infrastructure.results; +using chocolatey.infrastructure.synchronization; +using chocolatey.infrastructure.tolerance; + namespace chocolatey.infrastructure.app.services { - using System; - using System.Collections.Generic; - using System.IO; - using System.Linq; - using Microsoft.Web.XmlTransform; - using configuration; - using filesystem; - using results; - using synchronization; - using tolerance; - public class ConfigTransformService : IConfigTransformService { private readonly IFileSystem _fileSystem; @@ -43,7 +43,11 @@ public void Run(PackageResult packageResult, ChocolateyConfiguration config) if (string.IsNullOrWhiteSpace(installDirectory) || installDirectory.IsEqualTo(ApplicationParameters.InstallLocation) || installDirectory.IsEqualTo(ApplicationParameters.PackagesLocation)) { var logMessage = "Install location is not specific enough, cannot capture files:{0} Erroneous install location captured as '{1}'".FormatWith(Environment.NewLine, installDirectory); - if (packageResult != null) packageResult.Messages.Add(new ResultMessage(ResultType.Warn, logMessage)); + if (packageResult != null) + { + packageResult.Messages.Add(new ResultMessage(ResultType.Warn, logMessage)); + } + this.Log().Error(logMessage); return; } @@ -59,7 +63,7 @@ public void Run(PackageResult packageResult, ChocolateyConfiguration config) var targetFilesTest = targetFiles as IList ?? targetFiles.ToList(); if (!targetFilesTest.Any()) { - targetFiles = new[] {transformFile.Replace(ApplicationParameters.ConfigFileTransformExtension, string.Empty)}; + targetFiles = new[] { transformFile.Replace(ApplicationParameters.ConfigFileTransformExtension, string.Empty) }; this.Log().Debug(() => "No matching files found for transform {0}.{1} Creating '{2}'".FormatWith(_fileSystem.GetFileName(transformFile), Environment.NewLine, targetFiles.FirstOrDefault())); } @@ -85,7 +89,7 @@ public void Run(PackageResult packageResult, ChocolateyConfiguration config) // backup and let the transform to its thing instead. if (_fileSystem.FileExists(backupTargetFile)) { - this.Log().Debug(()=> "Restoring backup configuration file for '{0}'.".FormatWith(targetFile)); + this.Log().Debug(() => "Restoring backup configuration file for '{0}'.".FormatWith(targetFile)); _fileSystem.CopyFile(backupTargetFile, targetFile, overwriteExisting: true); } }, @@ -99,7 +103,7 @@ public void Run(PackageResult packageResult, ChocolateyConfiguration config) using (var transformation = new XmlTransformation(_fileSystem.ReadFile(transformFile), isTransformAFile: false, logger: null)) { - using (var document = new XmlTransformableDocument {PreserveWhitespace = true}) + using (var document = new XmlTransformableDocument { PreserveWhitespace = true }) { using (var inputStream = _fileSystem.OpenFileReadonly(targetFile)) { @@ -112,7 +116,7 @@ public void Run(PackageResult packageResult, ChocolateyConfiguration config) this.Log().Debug(() => "Creating backup configuration file for '{0}'.".FormatWith(targetFile)); _fileSystem.CopyFile(targetFile, backupTargetFile, overwriteExisting: true); - bool succeeded = transformation.Apply(document); + var succeeded = transformation.Apply(document); if (succeeded) { this.Log().Debug(() => "Transform applied successfully for '{0}'".FormatWith(targetFile)); @@ -193,10 +197,10 @@ private string FindBackupTargetFile(string targetFile, string installDirectory, return targetFile.Replace(installDirectory, backupDirectory); } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public void run(PackageResult packageResult, ChocolateyConfiguration config) => Run(packageResult, config); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/services/CygwinService.cs b/src/chocolatey/infrastructure.app/services/CygwinService.cs index 252d24cc0d..66d4dc9736 100644 --- a/src/chocolatey/infrastructure.app/services/CygwinService.cs +++ b/src/chocolatey/infrastructure.app/services/CygwinService.cs @@ -14,22 +14,22 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Linq; +using System.Text.RegularExpressions; +using Microsoft.Win32; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.domain; +using chocolatey.infrastructure.filesystem; +using chocolatey.infrastructure.commands; +using chocolatey.infrastructure.logging; +using chocolatey.infrastructure.results; +using chocolatey.infrastructure.platforms; + namespace chocolatey.infrastructure.app.services { - using System; - using System.Collections.Concurrent; - using System.Collections.Generic; - using System.Linq; - using System.Text.RegularExpressions; - using Microsoft.Win32; - using configuration; - using domain; - using filesystem; - using infrastructure.commands; - using logging; - using results; - using platforms; - /// /// Alternative Source for Cygwin /// @@ -140,7 +140,10 @@ public string SourceType public void EnsureSourceAppInstalled(ChocolateyConfiguration config, Action ensureAction) { - if (Platform.GetPlatform() != PlatformType.Windows) throw new NotImplementedException("This source is not supported on non-Windows systems"); + if (Platform.GetPlatform() != PlatformType.Windows) + { + throw new NotImplementedException("This source is not supported on non-Windows systems"); + } var runnerConfig = new ChocolateyConfiguration { @@ -180,7 +183,10 @@ private string GetRootDirectory() } var binRoot = Environment.GetEnvironmentVariable("ChocolateyBinRoot"); - if (string.IsNullOrWhiteSpace(binRoot)) binRoot = "c:\\tools"; + if (string.IsNullOrWhiteSpace(binRoot)) + { + binRoot = "c:\\tools"; + } return _fileSystem.CombinePaths(binRoot, "cygwin"); } @@ -212,6 +218,11 @@ public ConcurrentDictionary Install(ChocolateyConfigurati public ConcurrentDictionary Install(ChocolateyConfiguration config, Action continueAction, Action beforeModifyAction) { + if (config.PackageNames.IsEqualTo(ApplicationParameters.AllPackages)) + { + throw new NotImplementedException("Alternative sources do not allow the use of the 'all' package name/keyword."); + } + var args = BuildArgs(config, _installArguments); var packageResults = new ConcurrentDictionary(StringComparer.InvariantCultureIgnoreCase); @@ -227,7 +238,11 @@ public ConcurrentDictionary Install(ChocolateyConfigurati (s, e) => { var logMessage = e.Data; - if (string.IsNullOrWhiteSpace(logMessage)) return; + if (string.IsNullOrWhiteSpace(logMessage)) + { + return; + } + this.Log().Info(() => " [{0}] {1}".FormatWith(AppName, logMessage.EscapeCurlyBraces())); if (_installedRegex.IsMatch(logMessage)) @@ -241,7 +256,11 @@ public ConcurrentDictionary Install(ChocolateyConfigurati (s, e) => { var logMessage = e.Data; - if (string.IsNullOrWhiteSpace(logMessage)) return; + if (string.IsNullOrWhiteSpace(logMessage)) + { + return; + } + this.Log().Error("[{0}] {1}".FormatWith(AppName, logMessage.EscapeCurlyBraces())); }, updateProcessPath: false, @@ -275,7 +294,7 @@ private static string GetValueFromOutput(string output, Regex regex, string grou return string.Empty; } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public const string CYGWIN_PACKAGE = CygwinPackage; @@ -300,6 +319,6 @@ public ConcurrentDictionary install_run(ChocolateyConfigu [Obsolete("This overload is deprecated and will be removed in v3.")] public ConcurrentDictionary install_run(ChocolateyConfiguration config, Action continueAction, Action beforeModifyAction) => Install(config, continueAction, beforeModifyAction); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/services/FilesService.cs b/src/chocolatey/infrastructure.app/services/FilesService.cs index da5f278937..386749efc4 100644 --- a/src/chocolatey/infrastructure.app/services/FilesService.cs +++ b/src/chocolatey/infrastructure.app/services/FilesService.cs @@ -14,20 +14,20 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.IO; +using System.Linq; +using System.Runtime.ConstrainedExecution; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.cryptography; +using chocolatey.infrastructure.app.domain; +using chocolatey.infrastructure.filesystem; +using chocolatey.infrastructure.services; +using chocolatey.infrastructure.logging; +using chocolatey.infrastructure.results; + namespace chocolatey.infrastructure.app.services { - using System; - using System.IO; - using System.Linq; - using System.Runtime.ConstrainedExecution; - using configuration; - using cryptography; - using domain; - using filesystem; - using infrastructure.services; - using logging; - using results; - public sealed class FilesService : IFilesService { private readonly IXmlService _xmlService; @@ -43,14 +43,20 @@ public FilesService(IXmlService xmlService, IFileSystem fileSystem, IHashProvide public PackageFiles ReadPackageSnapshot(string filePath) { - if (!_fileSystem.FileExists(filePath)) return null; + if (!_fileSystem.FileExists(filePath)) + { + return null; + } return _xmlService.Deserialize(filePath); } private string GetPackageInstallDirectory(PackageResult packageResult) { - if (packageResult == null) return null; + if (packageResult == null) + { + return null; + } var installDirectory = packageResult.InstallLocation; return PackageInstallDirectoryIsCorrect(installDirectory, logMessage => packageResult.Messages.Add(new ResultMessage(ResultType.Warn, logMessage))) ? installDirectory : null; @@ -58,12 +64,19 @@ private string GetPackageInstallDirectory(PackageResult packageResult) private bool PackageInstallDirectoryIsCorrect(string directory, Action errorAction = null) { - if (directory.ToStringSafe().IsEqualTo(string.Empty)) return false; + if (directory.ToStringSafe().IsEqualTo(string.Empty)) + { + return false; + } if (directory.IsEqualTo(ApplicationParameters.InstallLocation) || directory.IsEqualTo(ApplicationParameters.PackagesLocation)) { var logMessage = "Install location is not specific enough:{0} Erroneous install location captured as '{1}'".FormatWith(Environment.NewLine, directory); - if (errorAction != null) errorAction.Invoke(logMessage); + if (errorAction != null) + { + errorAction.Invoke(logMessage); + } + this.Log().Error(logMessage); return false; } @@ -73,40 +86,71 @@ private bool PackageInstallDirectoryIsCorrect(string directory, Action e public void SavePackageSnapshot(PackageFiles snapshot, string filePath) { - if (snapshot == null) return; + if (snapshot == null) + { + return; + } _xmlService.Serialize(snapshot, filePath); } public void EnsureCompatibleFileAttributes(PackageResult packageResult, ChocolateyConfiguration config) { - if (packageResult == null) return; + if (packageResult == null) + { + return; + } + var installDirectory = GetPackageInstallDirectory(packageResult); - if (installDirectory == null) return; + if (installDirectory == null) + { + return; + } EnsureCompatibleFileAttributes(installDirectory, config); } public void EnsureCompatibleFileAttributes(string directory, ChocolateyConfiguration config) { - if (!PackageInstallDirectoryIsCorrect(directory)) return; + if (!PackageInstallDirectoryIsCorrect(directory)) + { + return; + } foreach (var file in _fileSystem.GetFiles(directory, "*.*", SearchOption.AllDirectories)) { var filePath = _fileSystem.GetFullPath(file); var fileInfo = _fileSystem.GetFileInfoFor(filePath); - if (_fileSystem.IsSystemFile(fileInfo)) _fileSystem.EnsureFileAttributeRemoved(filePath, FileAttributes.System); - if (_fileSystem.IsReadOnlyFile(fileInfo)) _fileSystem.EnsureFileAttributeRemoved(filePath, FileAttributes.ReadOnly); - if (_fileSystem.IsHiddenFile(fileInfo)) _fileSystem.EnsureFileAttributeRemoved(filePath, FileAttributes.Hidden); + if (_fileSystem.IsSystemFile(fileInfo)) + { + _fileSystem.EnsureFileAttributeRemoved(filePath, FileAttributes.System); + } + + if (_fileSystem.IsReadOnlyFile(fileInfo)) + { + _fileSystem.EnsureFileAttributeRemoved(filePath, FileAttributes.ReadOnly); + } + + if (_fileSystem.IsHiddenFile(fileInfo)) + { + _fileSystem.EnsureFileAttributeRemoved(filePath, FileAttributes.Hidden); + } } } public PackageFiles CaptureSnapshot(PackageResult packageResult, ChocolateyConfiguration config) { - if (packageResult == null) return new PackageFiles(); + if (packageResult == null) + { + return new PackageFiles(); + } + var installDirectory = GetPackageInstallDirectory(packageResult); - if (installDirectory == null) return null; + if (installDirectory == null) + { + return null; + } return CaptureSnapshot(installDirectory, config); } @@ -115,12 +159,15 @@ public PackageFiles CaptureSnapshot(string directory, ChocolateyConfiguration co { var packageFiles = new PackageFiles(); - if (!PackageInstallDirectoryIsCorrect(directory)) return packageFiles; + if (!PackageInstallDirectoryIsCorrect(directory)) + { + return packageFiles; + } this.Log().Debug(() => "Capturing package files in '{0}'".FormatWith(directory)); //gather all files in the folder var files = _fileSystem.GetFiles(directory, pattern: "*.*", option: SearchOption.AllDirectories); - foreach (string file in files.OrEmpty().Where(f => !f.EndsWith(ApplicationParameters.PackagePendingFileName))) + foreach (var file in files.OrEmpty().Where(f => !f.EndsWith(ApplicationParameters.PackagePendingFileName))) { packageFiles.Files.Add(GetPackageFile(file)); } @@ -230,7 +277,7 @@ public bool MovePackageUsingBackupStrategy(string sourceFolder, string destinati return errored; } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public PackageFiles read_from_file(string filePath) => ReadPackageSnapshot(filePath); @@ -258,6 +305,6 @@ public PackageFiles capture_package_files(string directory, ChocolateyConfigurat [Obsolete("This overload is deprecated and will be removed in v3.")] public PackageFile get_package_file(string file) => GetPackageFile(file); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/services/IAutomaticUninstallerService.cs b/src/chocolatey/infrastructure.app/services/IAutomaticUninstallerService.cs index 32478d7698..36124216f7 100644 --- a/src/chocolatey/infrastructure.app/services/IAutomaticUninstallerService.cs +++ b/src/chocolatey/infrastructure.app/services/IAutomaticUninstallerService.cs @@ -14,13 +14,13 @@ // See the License for the specific language governing permissions and // limitations under the License. +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.domain; +using chocolatey.infrastructure.results; +using System; + namespace chocolatey.infrastructure.app.services { - using configuration; - using domain; - using results; - using System; - /// /// The automagic uninstaller service /// @@ -42,12 +42,12 @@ public interface IAutomaticUninstallerService /// The package cache location. void Remove(RegistryApplicationKey key, ChocolateyConfiguration config, PackageResult packageResult, string packageCacheLocation); -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] void run(PackageResult packageResult, ChocolateyConfiguration config); [Obsolete("This overload is deprecated and will be removed in v3.")] void remove(RegistryApplicationKey key, ChocolateyConfiguration config, PackageResult packageResult, string packageCacheLocation); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/services/IChocolateyConfigSettingsService.cs b/src/chocolatey/infrastructure.app/services/IChocolateyConfigSettingsService.cs index 0a844bd9ce..71b811787e 100644 --- a/src/chocolatey/infrastructure.app/services/IChocolateyConfigSettingsService.cs +++ b/src/chocolatey/infrastructure.app/services/IChocolateyConfigSettingsService.cs @@ -14,12 +14,12 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using chocolatey.infrastructure.app.configuration; + namespace chocolatey.infrastructure.app.services { - using System; - using System.Collections.Generic; - using configuration; - public interface IChocolateyConfigSettingsService { void DryRun(ChocolateyConfiguration configuration); @@ -40,7 +40,7 @@ public interface IChocolateyConfigSettingsService void SetConfig(ChocolateyConfiguration configuration); void UnsetConfig(ChocolateyConfiguration configuration); -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] void noop(ChocolateyConfiguration configuration); [Obsolete("This overload is deprecated and will be removed in v3.")] @@ -73,6 +73,6 @@ public interface IChocolateyConfigSettingsService void config_set(ChocolateyConfiguration configuration); [Obsolete("This overload is deprecated and will be removed in v3.")] void config_unset(ChocolateyConfiguration configuration); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/services/IChocolateyPackageInformationService.cs b/src/chocolatey/infrastructure.app/services/IChocolateyPackageInformationService.cs index 2e51aa0612..ebef4a9369 100644 --- a/src/chocolatey/infrastructure.app/services/IChocolateyPackageInformationService.cs +++ b/src/chocolatey/infrastructure.app/services/IChocolateyPackageInformationService.cs @@ -14,25 +14,25 @@ // See the License for the specific language governing permissions and // limitations under the License. +using chocolatey.infrastructure.app.domain; +using NuGet.Packaging; +using System; + namespace chocolatey.infrastructure.app.services { - using domain; - using NuGet.Packaging; - using System; - public interface IChocolateyPackageInformationService { ChocolateyPackageInformation Get(IPackageMetadata package); void Save(ChocolateyPackageInformation packageInformation); void Remove(IPackageMetadata package); -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] ChocolateyPackageInformation get_package_information(IPackageMetadata package); [Obsolete("This overload is deprecated and will be removed in v3.")] void save_package_information(ChocolateyPackageInformation packageInformation); [Obsolete("This overload is deprecated and will be removed in v3.")] void remove_package_information(IPackageMetadata package); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/services/IChocolateyPackageService.cs b/src/chocolatey/infrastructure.app/services/IChocolateyPackageService.cs index fbb84d7902..8465a044dc 100644 --- a/src/chocolatey/infrastructure.app/services/IChocolateyPackageService.cs +++ b/src/chocolatey/infrastructure.app/services/IChocolateyPackageService.cs @@ -14,14 +14,14 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.results; + namespace chocolatey.infrastructure.app.services { - using System; - using System.Collections.Concurrent; - using System.Collections.Generic; - using configuration; - using results; - /// /// The packaging service /// @@ -123,7 +123,7 @@ public interface IChocolateyPackageService ConcurrentDictionary Uninstall(ChocolateyConfiguration config); -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] int count_run(ChocolateyConfiguration config); [Obsolete("This overload is deprecated and will be removed in v3.")] @@ -152,6 +152,6 @@ public interface IChocolateyPackageService void uninstall_noop(ChocolateyConfiguration config); [Obsolete("This overload is deprecated and will be removed in v3.")] ConcurrentDictionary uninstall_run(ChocolateyConfiguration config); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/services/IConfigTransformService.cs b/src/chocolatey/infrastructure.app/services/IConfigTransformService.cs index e877c23f11..5249793103 100644 --- a/src/chocolatey/infrastructure.app/services/IConfigTransformService.cs +++ b/src/chocolatey/infrastructure.app/services/IConfigTransformService.cs @@ -14,12 +14,12 @@ // See the License for the specific language governing permissions and // limitations under the License. +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.results; +using System; + namespace chocolatey.infrastructure.app.services { - using configuration; - using results; - using System; - public interface IConfigTransformService { /// @@ -29,9 +29,9 @@ public interface IConfigTransformService /// The configuration. void Run(PackageResult packageResult, ChocolateyConfiguration config); -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] void run(PackageResult packageResult, ChocolateyConfiguration config); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/services/IFilesService.cs b/src/chocolatey/infrastructure.app/services/IFilesService.cs index 1d25ff6b87..153b491d2b 100644 --- a/src/chocolatey/infrastructure.app/services/IFilesService.cs +++ b/src/chocolatey/infrastructure.app/services/IFilesService.cs @@ -14,13 +14,13 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.domain; +using chocolatey.infrastructure.results; + namespace chocolatey.infrastructure.app.services { - using System; - using configuration; - using domain; - using results; - /// /// The files service for capturing and handling file snapshots. /// @@ -79,7 +79,7 @@ public interface IFilesService bool MovePackageUsingBackupStrategy(string sourceFolder, string destinationFolder, bool restoreSource); -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] PackageFiles read_from_file(string filepath); [Obsolete("This overload is deprecated and will be removed in v3.")] @@ -94,6 +94,6 @@ public interface IFilesService PackageFiles capture_package_files(string directory, ChocolateyConfiguration config); [Obsolete("This overload is deprecated and will be removed in v3.")] PackageFile get_package_file(string file); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/services/INugetService.cs b/src/chocolatey/infrastructure.app/services/INugetService.cs index a11e5571ef..a7a3a30f35 100644 --- a/src/chocolatey/infrastructure.app/services/INugetService.cs +++ b/src/chocolatey/infrastructure.app/services/INugetService.cs @@ -14,14 +14,14 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.results; + namespace chocolatey.infrastructure.app.services { - using System; - using System.Collections.Concurrent; - using System.Collections.Generic; - using configuration; - using results; - public interface INugetService : ISourceRunner { /// @@ -67,7 +67,7 @@ public interface INugetService : ISourceRunner /// The configuration IEnumerable GetInstalledPackages(ChocolateyConfiguration config); -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] ConcurrentDictionary get_outdated(ChocolateyConfiguration config); [Obsolete("This overload is deprecated and will be removed in v3.")] @@ -82,6 +82,6 @@ public interface INugetService : ISourceRunner void remove_rollback_directory_if_exists(string packageName); [Obsolete("This overload is deprecated and will be removed in v3.")] IEnumerable get_all_installed_packages(ChocolateyConfiguration config); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/services/IPendingRebootService.cs b/src/chocolatey/infrastructure.app/services/IPendingRebootService.cs index 61ef8a2576..56d84bcb33 100644 --- a/src/chocolatey/infrastructure.app/services/IPendingRebootService.cs +++ b/src/chocolatey/infrastructure.app/services/IPendingRebootService.cs @@ -14,11 +14,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +using chocolatey.infrastructure.app.configuration; +using System; + namespace chocolatey.infrastructure.app.services { - using configuration; - using System; - /// /// Test to see if there are any known situations that require /// a System reboot. @@ -28,9 +28,9 @@ public interface IPendingRebootService { bool IsRebootPending(ChocolateyConfiguration config); -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] bool is_pending_reboot(ChocolateyConfiguration config); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/services/IPowershellService.cs b/src/chocolatey/infrastructure.app/services/IPowershellService.cs index 320e1f91f8..cd92079a9f 100644 --- a/src/chocolatey/infrastructure.app/services/IPowershellService.cs +++ b/src/chocolatey/infrastructure.app/services/IPowershellService.cs @@ -14,16 +14,16 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Management.Automation.Runspaces; +using chocolatey.infrastructure.app.configuration; +using NuGet.Packaging; +using NuGet.Protocol.Core.Types; +using chocolatey.infrastructure.results; + namespace chocolatey.infrastructure.app.services { - using System; - using System.Collections.Generic; - using System.Management.Automation.Runspaces; - using configuration; - using NuGet.Packaging; - using NuGet.Protocol.Core.Types; - using results; - public interface IPowershellService { /// @@ -72,7 +72,7 @@ public interface IPowershellService PowerShellExecutionResults RunHost(ChocolateyConfiguration config, string chocoPowerShellScript, Action additionalActionsBeforeScript, IEnumerable hookPreScriptPathList, IEnumerable hookPostScriptPathList); -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] void install_noop(PackageResult packageResult); [Obsolete("This overload is deprecated and will be removed in v3.")] @@ -89,6 +89,6 @@ public interface IPowershellService void prepare_powershell_environment(IPackageSearchMetadata package, ChocolateyConfiguration configuration, string packageDirectory); [Obsolete("This overload is deprecated and will be removed in v3.")] PowerShellExecutionResults run_host(ChocolateyConfiguration config, string chocoPowerShellScript, Action additionalActionsBeforeScript, IEnumerable hookPreScriptPathList, IEnumerable hookPostScriptPathList); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/services/IRegistryService.cs b/src/chocolatey/infrastructure.app/services/IRegistryService.cs index 3439979bc9..daf144afa5 100644 --- a/src/chocolatey/infrastructure.app/services/IRegistryService.cs +++ b/src/chocolatey/infrastructure.app/services/IRegistryService.cs @@ -14,14 +14,14 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using chocolatey.infrastructure.app.domain; +using Microsoft.Win32; +using Registry = chocolatey.infrastructure.app.domain.Registry; + namespace chocolatey.infrastructure.app.services { - using System; - using System.Collections.Generic; - using domain; - using Microsoft.Win32; - using Registry = domain.Registry; - public interface IRegistryService { Registry GetInstallerKeys(); @@ -34,7 +34,7 @@ public interface IRegistryService bool InstallerKeyExists(string keyPath); RegistryKey GetKey(RegistryHive hive, string subKeyPath); -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] Registry get_installer_keys(); [Obsolete("This overload is deprecated and will be removed in v3.")] @@ -53,6 +53,6 @@ public interface IRegistryService bool installer_value_exists(string keyPath, string value); [Obsolete("This overload is deprecated and will be removed in v3.")] RegistryKey get_key(RegistryHive hive, string subKeyPath); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/services/IShimGenerationService.cs b/src/chocolatey/infrastructure.app/services/IShimGenerationService.cs index b14ccc8840..bbaa17509e 100644 --- a/src/chocolatey/infrastructure.app/services/IShimGenerationService.cs +++ b/src/chocolatey/infrastructure.app/services/IShimGenerationService.cs @@ -14,12 +14,12 @@ // See the License for the specific language governing permissions and // limitations under the License. +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.results; +using System; + namespace chocolatey.infrastructure.app.services { - using configuration; - using results; - using System; - public interface IShimGenerationService { /// @@ -36,11 +36,11 @@ public interface IShimGenerationService /// The package result. void Uninstall(ChocolateyConfiguration configuration, PackageResult packageResult); -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] void install(ChocolateyConfiguration configuration, PackageResult packageResult); [Obsolete("This overload is deprecated and will be removed in v3.")] void uninstall(ChocolateyConfiguration configuration, PackageResult packageResult); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/services/ISourceRunner.cs b/src/chocolatey/infrastructure.app/services/ISourceRunner.cs index 44fb09014e..ec4bbc3411 100644 --- a/src/chocolatey/infrastructure.app/services/ISourceRunner.cs +++ b/src/chocolatey/infrastructure.app/services/ISourceRunner.cs @@ -14,21 +14,21 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using chocolatey.infrastructure.app.attributes; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.domain; +using chocolatey.infrastructure.results; + namespace chocolatey.infrastructure.app.services { - using System; - using System.Collections.Concurrent; - using System.Collections.Generic; - using chocolatey.infrastructure.app.attributes; - using configuration; - using domain; - using results; - [MultiService] [Obsolete("This interface is deprecated and will be removed in v3.")] public interface ISourceRunner : IBootstrappableSourceRunner, ICountSourceRunner, IListSourceRunner, IInstallSourceRunner, IUpgradeSourceRunner, IUninstallSourceRunner { -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] void ensure_source_app_installed(ChocolateyConfiguration config, Action ensureAction); [Obsolete("This overload is deprecated and will be removed in v3.")] @@ -51,7 +51,7 @@ public interface ISourceRunner : IBootstrappableSourceRunner, ICountSourceRunner void uninstall_noop(ChocolateyConfiguration config, Action continueAction); [Obsolete("This overload is deprecated and will be removed in v3.")] ConcurrentDictionary uninstall_run(ChocolateyConfiguration config, Action continueAction, Action beforeUninstallAction = null); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } public interface IAlternativeSourceRunner diff --git a/src/chocolatey/infrastructure.app/services/ITemplateService.cs b/src/chocolatey/infrastructure.app/services/ITemplateService.cs index 3f8400cd15..41df9c5f60 100644 --- a/src/chocolatey/infrastructure.app/services/ITemplateService.cs +++ b/src/chocolatey/infrastructure.app/services/ITemplateService.cs @@ -14,11 +14,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +using chocolatey.infrastructure.app.configuration; +using System; + namespace chocolatey.infrastructure.app.services { - using configuration; - using System; - public interface ITemplateService { void GenerateDryRun(ChocolateyConfiguration configuration); @@ -26,7 +26,7 @@ public interface ITemplateService void ListDryRun(ChocolateyConfiguration configuration); void List(ChocolateyConfiguration configuration); -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] void generate_noop(ChocolateyConfiguration configuration); [Obsolete("This overload is deprecated and will be removed in v3.")] @@ -35,6 +35,6 @@ public interface ITemplateService void list_noop(ChocolateyConfiguration configuration); [Obsolete("This overload is deprecated and will be removed in v3.")] void list(ChocolateyConfiguration configuration); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/services/NugetService.cs b/src/chocolatey/infrastructure.app/services/NugetService.cs index 354fa6ca6e..15cbbe8c6a 100644 --- a/src/chocolatey/infrastructure.app/services/NugetService.cs +++ b/src/chocolatey/infrastructure.app/services/NugetService.cs @@ -14,43 +14,44 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net; +using System.Text.RegularExpressions; +using System.Threading; +using Chocolatey.NuGet.Frameworks; +using chocolatey.infrastructure.adapters; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.domain; +using chocolatey.infrastructure.app.nuget; +using chocolatey.infrastructure.app.utility; +using chocolatey.infrastructure.commandline; +using chocolatey.infrastructure.cryptography; +using chocolatey.infrastructure.guards; +using chocolatey.infrastructure.logging; +using chocolatey.infrastructure.platforms; +using chocolatey.infrastructure.results; +using chocolatey.infrastructure.services; +using chocolatey.infrastructure.tolerance; +using DateTime = chocolatey.infrastructure.adapters.DateTime; +using Environment = System.Environment; +using IFileSystem = chocolatey.infrastructure.filesystem.IFileSystem; +using NuGet.Common; +using NuGet.Configuration; +using NuGet.PackageManagement; +using NuGet.Packaging; +using NuGet.Packaging.Core; +using NuGet.Protocol; +using NuGet.ProjectManagement; +using NuGet.Protocol.Core.Types; +using NuGet.Resolver; +using NuGet.Versioning; + namespace chocolatey.infrastructure.app.services { - using System; - using System.Collections.Concurrent; - using System.Collections.Generic; - using System.IO; - using System.Linq; - using System.Net; - using System.Text.RegularExpressions; - using System.Threading; - using Chocolatey.NuGet.Frameworks; - using adapters; - using chocolatey.infrastructure.app.utility; - using commandline; - using configuration; - using domain; - using guards; - using logging; - using nuget; - using platforms; - using results; - using tolerance; - using DateTime = adapters.DateTime; - using Environment = System.Environment; - using IFileSystem = filesystem.IFileSystem; - using NuGet.Common; - using NuGet.Configuration; - using NuGet.PackageManagement; - using NuGet.Packaging; - using NuGet.Packaging.Core; - using NuGet.Protocol; - using NuGet.ProjectManagement; - using NuGet.Protocol.Core.Types; - using NuGet.Resolver; - using NuGet.Versioning; - using chocolatey.infrastructure.services; - //todo: #2575 - this monolith is too large. Refactor once test coverage is up. public class NugetService : INugetService @@ -121,7 +122,7 @@ public virtual int Count(ChocolateyConfiguration config) } } - int? pageValue = config.ListCommand.Page; + var pageValue = config.ListCommand.Page; try { var sourceCacheContext = new ChocolateySourceCacheContext(config); @@ -144,7 +145,7 @@ public virtual void ListDryRun(ChocolateyConfiguration config) public virtual IEnumerable List(ChocolateyConfiguration config) { - int count = 0; + var count = 0; var sources = config.Sources; var prerelease = config.Prerelease; @@ -178,11 +179,20 @@ it is possible that incomplete package lists are returned from a command that uses these options."); } - if (config.RegularOutput) this.Log().Debug(() => "Running list with the following filter = '{0}'".FormatWith(config.Input)); - if (config.RegularOutput) this.Log().Debug(ChocolateyLoggers.Verbose, () => "--- Start of List ---"); + if (config.RegularOutput) + { + this.Log().Debug(() => "Running list with the following filter = '{0}'".FormatWith(config.Input)); + } + + if (config.RegularOutput) + { + this.Log().Debug(ChocolateyLoggers.Verbose, () => "--- Start of List ---"); + } + foreach (var pkg in NugetList.GetPackages(config, _nugetLogger, _fileSystem)) { var package = pkg; // for lamda access + string packageArgumentsUnencrypted = null; ChocolateyPackageMetadata packageLocalMetadata; string packageInstallLocation = null; @@ -207,6 +217,12 @@ it is possible that incomplete package lists are returned from a command } } + if (!string.IsNullOrWhiteSpace(packageInfo.Arguments)) + { + var decryptedArguments = ArgumentsUtility.DecryptPackageArgumentsFile(_fileSystem, packageInfo.Package.Id, packageInfo.Package.Version.ToNormalizedStringChecked()); + + packageArgumentsUnencrypted = "\n Remembered Package Arguments: \n {0}".FormatWith(string.Join(Environment.NewLine + " ", decryptedArguments)); + } } if (!config.QuietOutput) @@ -223,7 +239,9 @@ it is possible that incomplete package lists are returned from a command )) ); - if (config.Verbose && !config.ListCommand.IdOnly) this.Log().Info(() => + if (config.Verbose && !config.ListCommand.IdOnly) + { + this.Log().Info(() => @" Title: {0} | Published: {1}{2}{3} Number of Downloads: {4} | Downloads for this version: {5} Package url{6} @@ -231,7 +249,7 @@ Package url{6} Tags: {9} Software Site: {10} Software License: {11}{12}{13}{14}{15}{16} - Description: {17}{18} + Description: {17}{18}{19} ".FormatWith( package.Title.EscapeCurlyBraces(), package.Published.GetValueOrDefault().UtcDateTime.ToShortDateString(), @@ -245,7 +263,7 @@ Package url{6} package.PackageTestResultStatus, package.PackageValidationResultDate.GetValueOrDefault().ToString("MMM dd yyyy HH:mm:ss") ), - (package.DownloadCount == null || package.DownloadCount <= 0) ? "n/a" : package.DownloadCount.ToStringSafe(), + (package.DownloadCount == null || package.DownloadCount <= 0) ? "n/a" : package.DownloadCount.ToStringSafe(), (package.VersionDownloadCount == null || package.VersionDownloadCount <= 0) ? "n/a" : package.VersionDownloadCount.ToStringSafe(), package.PackageDetailsUrl == null || string.IsNullOrWhiteSpace(package.PackageDetailsUrl.AbsoluteUri) ? string.Empty : " " + package.PackageDetailsUrl.AbsoluteUri, !string.IsNullOrWhiteSpace(package.PackageSourceUrl.ToStringSafe()) @@ -265,10 +283,10 @@ Package url{6} !string.IsNullOrWhiteSpace(package.BugTrackerUrl.ToStringSafe()) ? "{0} Issues: {1}".FormatWith(Environment.NewLine, package.BugTrackerUrl.ToStringSafe()) : string.Empty, package.Summary != null && !string.IsNullOrWhiteSpace(package.Summary.ToStringSafe()) ? "\r\n Summary: {0}".FormatWith(package.Summary.EscapeCurlyBraces().ToStringSafe()) : string.Empty, package.Description.EscapeCurlyBraces().Replace("\n ", "\n").Replace("\n", "\n "), - !string.IsNullOrWhiteSpace(package.ReleaseNotes.ToStringSafe()) ? "{0} Release Notes: {1}".FormatWith(Environment.NewLine, package.ReleaseNotes.EscapeCurlyBraces().Replace("\n ", "\n").Replace("\n", "\n ")) : string.Empty + !string.IsNullOrWhiteSpace(package.ReleaseNotes.ToStringSafe()) ? "{0} Release Notes: {1}".FormatWith(Environment.NewLine, package.ReleaseNotes.EscapeCurlyBraces().Replace("\n ", "\n").Replace("\n", "\n ")) : string.Empty, + packageArgumentsUnencrypted != null ? packageArgumentsUnencrypted : string.Empty )); - - + } } else { @@ -291,7 +309,11 @@ Package url{6} } } - if (config.RegularOutput) this.Log().Debug(ChocolateyLoggers.Verbose, () => "--- End of List ---"); + if (config.RegularOutput) + { + this.Log().Debug(ChocolateyLoggers.Verbose, () => "--- End of List ---"); + } + if (config.RegularOutput && !config.QuietOutput) { this.Log().Warn(() => @"{0} packages {1}.".FormatWith(count, config.ListCommand.LocalOnly ? "installed" : "found")); @@ -336,7 +358,7 @@ public virtual string GetPackageFileOrThrow(ChocolateyConfiguration config, stri return filesFound.FirstOrDefault(); }; - string filePath = !string.IsNullOrWhiteSpace(config.Input) ? config.Input : getLocalFiles.Invoke(_fileSystem); + var filePath = !string.IsNullOrWhiteSpace(config.Input) ? config.Input : getLocalFiles.Invoke(_fileSystem); Ensure.That(() => filePath).Meets((file) => _fileSystem.GetFileExtension(file).IsEqualTo(extension) && _fileSystem.FileExists(file), (name, value) => { throw new ArgumentException("File specified is either not found or not a {0} file. '{1}'".FormatWith(extension, value)); }); @@ -349,7 +371,10 @@ public virtual void Pack(ChocolateyConfiguration config) ValidateNuspec(nuspecFilePath, config); var nuspecDirectory = _fileSystem.GetFullPath(_fileSystem.GetDirectoryName(nuspecFilePath)); - if (string.IsNullOrWhiteSpace(nuspecDirectory)) nuspecDirectory = _fileSystem.GetCurrentDirectory(); + if (string.IsNullOrWhiteSpace(nuspecDirectory)) + { + nuspecDirectory = _fileSystem.GetCurrentDirectory(); + } // Use case-insensitive properties like "nuget pack". var properties = new Dictionary(StringComparer.OrdinalIgnoreCase); @@ -377,18 +402,18 @@ public virtual void Pack(ChocolateyConfiguration config) var propertyProvider = new DictionaryPropertyProvider(properties); //Allows empty directories to be distributed in templates via .template packages, issue #1003 - bool includeEmptyDirectories = true; + var includeEmptyDirectories = true; //No need to be deterministic, it's ok to include timestamps - bool deterministic = false; + var deterministic = false; var builder = new PackageBuilder(nuspecFilePath, nuspecDirectory, propertyProvider.GetPropertyValue, includeEmptyDirectories, deterministic, _nugetLogger); if (!string.IsNullOrWhiteSpace(config.Version)) { builder.Version = new NuGetVersion(config.Version); } - string outputFile = builder.Id + "." + builder.Version.ToNormalizedStringChecked() + NuGetConstants.PackageExtension; - string outputFolder = config.OutputDirectory ?? _fileSystem.GetCurrentDirectory(); - string outputPath = _fileSystem.CombinePaths(outputFolder, outputFile); + var outputFile = builder.Id + "." + builder.Version.ToNormalizedStringChecked() + NuGetConstants.PackageExtension; + var outputFolder = config.OutputDirectory ?? _fileSystem.GetCurrentDirectory(); + var outputPath = _fileSystem.CombinePaths(outputFolder, outputFile); config.Sources = outputFolder; @@ -412,15 +437,18 @@ public virtual void Pack(ChocolateyConfiguration config) public void PushDryRun(ChocolateyConfiguration config) { - string nupkgFilePath = GetPackageFileOrThrow(config, NuGetConstants.PackageExtension); + var nupkgFilePath = GetPackageFileOrThrow(config, NuGetConstants.PackageExtension); this.Log().Info(() => "Would have attempted to push '{0}' to source '{1}'.".FormatWith(_fileSystem.GetFileName(nupkgFilePath), config.Sources)); } public virtual void Push(ChocolateyConfiguration config) { - string nupkgFilePath = GetPackageFileOrThrow(config, NuGetConstants.PackageExtension); - string nupkgFileName = _fileSystem.GetFileName(nupkgFilePath); - if (config.RegularOutput) this.Log().Info(() => "Attempting to push {0} to {1}".FormatWith(nupkgFileName, config.Sources)); + var nupkgFilePath = GetPackageFileOrThrow(config, NuGetConstants.PackageExtension); + var nupkgFileName = _fileSystem.GetFileName(nupkgFilePath); + if (config.RegularOutput) + { + this.Log().Info(() => "Attempting to push {0} to {1}".FormatWith(nupkgFileName, config.Sources)); + } var sourceCacheContext = new ChocolateySourceCacheContext(config); NugetPush.PushPackage(config, _fileSystem.GetFullPath(nupkgFilePath), _nugetLogger, nupkgFileName, _fileSystem, sourceCacheContext); @@ -482,13 +510,22 @@ public virtual ConcurrentDictionary Install(ChocolateyCon _fileSystem.EnsureDirectoryExists(ApplicationParameters.PackagesLocation); var packageResultsToReturn = new ConcurrentDictionary(StringComparer.InvariantCultureIgnoreCase); - //todo: #23 handle all - NuGetVersion version = !string.IsNullOrWhiteSpace(config.Version) ? NuGetVersion.Parse(config.Version) : null; - if (config.Force) config.AllowDowngrade = true; + if (config.Force) + { + config.AllowDowngrade = true; + } var sourceCacheContext = new ChocolateySourceCacheContext(config); var remoteRepositories = NugetCommon.GetRemoteRepositories(config, _nugetLogger, _fileSystem); + + // The following method HAS to be called AFTER the call to GetRemoteRepositories. + // In that method, the Sources on the configuration object are expanded to be the full source URL's, rather than the named + // sources from the chocolatey.config file, i.e. https://community.chocolatey.org/api/v2/ rather than simply "chocolatey". + // This is important, since the full URL is what is used to ensure that a "choco install all" is not being attempted against + // one of the configured public sources in the following method. + SetRemotePackageNamesIfAllSpecified(config, () => { }); + var remoteEndpoints = NugetCommon.GetRepositoryResources(remoteRepositories, sourceCacheContext); var localRepositorySource = NugetCommon.GetLocalRepository(); var pathResolver = NugetCommon.GetPathResolver(_fileSystem); @@ -539,7 +576,7 @@ public virtual ConcurrentDictionary Install(ChocolateyCon config.CreateBackup(); - foreach (string packageName in packageNames.OrEmpty()) + foreach (var packageName in packageNames.OrEmpty()) { // We need to ensure we are using a clean configuration file // before we start reading it. @@ -555,13 +592,13 @@ public virtual ConcurrentDictionary Install(ChocolateyCon if (Platform.GetPlatform() != PlatformType.Windows && !packageName.EndsWith(".template")) { - string logMessage = "{0} is not a supported package on non-Windows systems.{1}Only template packages are currently supported.".FormatWith(packageName, Environment.NewLine); + var logMessage = "{0} is not a supported package on non-Windows systems.{1}Only template packages are currently supported.".FormatWith(packageName, Environment.NewLine); this.Log().Warn(ChocolateyLoggers.Important, logMessage); } if (installedPackage != null && (version == null || version == installedPackage.PackageMetadata.Version) && !config.Force) { - string logMessage = "{0} v{1} already installed.{2} Use --force to reinstall, specify a version to install, or try upgrade.".FormatWith(installedPackage.Name, installedPackage.Version, Environment.NewLine); + var logMessage = "{0} v{1} already installed.{2} Use --force to reinstall, specify a version to install, or try upgrade.".FormatWith(installedPackage.Name, installedPackage.Version, Environment.NewLine); var nullResult = packageResultsToReturn.GetOrAdd(packageName, installedPackage); nullResult.Messages.Add(new ResultMessage(ResultType.Warn, logMessage)); nullResult.Messages.Add(new ResultMessage(ResultType.Inconclusive, logMessage)); @@ -582,7 +619,7 @@ public virtual ConcurrentDictionary Install(ChocolateyCon if (installedPackage != null && version != null && version < installedPackage.PackageMetadata.Version && !config.AllowDowngrade) { - string logMessage = "A newer version of {0} (v{1}) is already installed.{2} Use --allow-downgrade or --force to attempt to install older versions.".FormatWith(installedPackage.Name, installedPackage.Version, Environment.NewLine); + var logMessage = "A newer version of {0} (v{1}) is already installed.{2} Use --allow-downgrade or --force to attempt to install older versions.".FormatWith(installedPackage.Name, installedPackage.Version, Environment.NewLine); var nullResult = packageResultsToReturn.GetOrAdd(packageName, installedPackage); nullResult.Messages.Add(new ResultMessage(ResultType.Error, logMessage)); this.Log().Error(ChocolateyLoggers.Important, logMessage); @@ -594,7 +631,7 @@ public virtual ConcurrentDictionary Install(ChocolateyCon latestPackageVersion = version; } - var availablePackage = NugetList.FindPackage(packageName, config, _nugetLogger, sourceCacheContext, remoteEndpoints, latestPackageVersion); + var availablePackage = NugetList.FindPackage(packageName, config, _nugetLogger, (SourceCacheContext)sourceCacheContext, remoteEndpoints, latestPackageVersion); if (availablePackage == null) { @@ -603,7 +640,7 @@ public virtual ConcurrentDictionary Install(ChocolateyCon NOTE: When you specify explicit sources, it overrides default sources. If the package version is a prerelease and you didn't specify `--pre`, the package may not be found.{2}{3}".FormatWith(packageName, config.Sources, string.IsNullOrWhiteSpace(config.Version) - ? String.Empty + ? string.Empty : @" Version was specified as '{0}'. It is possible that version does not exist for '{1}' at the source specified.".FormatWith(config.Version, packageName), @@ -616,7 +653,10 @@ Version was specified as '{0}'. It is possible that version continue; } + var oldPrerelease = config.Prerelease; + config.Prerelease = config.Prerelease || availablePackage.Identity.Version.IsPrerelease; NugetCommon.GetPackageDependencies(availablePackage.Identity, NuGetFramework.AnyFramework, sourceCacheContext, _nugetLogger, remoteEndpoints, sourcePackageDependencyInfos, new HashSet(), config).GetAwaiter().GetResult(); + config.Prerelease = oldPrerelease; if (installedPackage != null && (installedPackage.PackageMetadata.Version == availablePackage.Identity.Version) && config.Force) { @@ -708,7 +748,7 @@ Version was specified as '{0}'. It is possible that version { var forcedResult = packageResultsToReturn.GetOrAdd(packageToUninstall.Identity.Id, packageToUninstall); forcedResult.Messages.Add(new ResultMessage(ResultType.Note, "Removing old version")); - string logMessage = "{0}:{1} {2}".FormatWith("Unable to remove existing package", Environment.NewLine, ex.Message); + var logMessage = "{0}:{1} {2}".FormatWith("Unable to remove existing package", Environment.NewLine, ex.Message); this.Log().Warn(logMessage); forcedResult.Messages.Add(new ResultMessage(ResultType.Inconclusive, logMessage)); } @@ -738,6 +778,7 @@ Version was specified as '{0}'. It is possible that version this.Log().Error(ChocolateyLoggers.Important, logMessage); foreach (var pkgMetadata in packagesToInstall) + { var errorResult = packageResultsToReturn.GetOrAdd(pkgMetadata.Identity.Id, new PackageResult(pkgMetadata, pathResolver.GetInstallPath(pkgMetadata.Identity))); errorResult.Messages.Add(new ResultMessage(ResultType.Error, logMessage)); @@ -763,7 +804,7 @@ Version was specified as '{0}'. It is possible that version .GetAwaiter().GetResult(); } - bool shouldAddForcedResultMessage = false; + var shouldAddForcedResultMessage = false; var packageToUninstall = packagesToUninstall.FirstOrDefault(p => p.PackageMetadata.Id.Equals(packageDependencyInfo.Id, StringComparison.OrdinalIgnoreCase)); if (packageToUninstall != null) @@ -784,11 +825,14 @@ Version was specified as '{0}'. It is possible that version { var forcedResult = packageResultsToReturn.GetOrAdd(packageToUninstall.Name, packageToUninstall); forcedResult.Messages.Add(new ResultMessage(ResultType.Note, "Backing up and removing old version")); - string logMessage = "{0}:{1} {2}".FormatWith("Unable to remove existing package prior to forced reinstall", Environment.NewLine, ex.Message); + var logMessage = "{0}:{1} {2}".FormatWith("Unable to remove existing package prior to forced reinstall", Environment.NewLine, ex.Message); this.Log().Warn(logMessage); forcedResult.Messages.Add(new ResultMessage(ResultType.Inconclusive, logMessage)); forcedResult.Messages.Add(new ResultMessage(ResultType.Error, logMessage)); - if (continueAction != null) continueAction.Invoke(forcedResult, config); + if (continueAction != null) + { + continueAction.Invoke(forcedResult, config); + } continue; } @@ -803,6 +847,9 @@ Version was specified as '{0}'. It is possible that version _fileSystem.DeleteFile(pathResolver.GetInstalledPackageFilePath(packageDependencyInfo)); + this.Log().Info("Downloading package from source '{0}'".FormatWith(packageDependencyInfo.Source)); + this.Log().Debug("Package download location '{0}'".FormatWith(packageDependencyInfo.DownloadUri)); + ChocolateyProgressInfo.ShouldDisplayDownloadProgress = config.Features.ShowDownloadProgress; using (var downloadResult = downloadResource.GetDownloadResourceResultAsync( @@ -811,7 +858,7 @@ Version was specified as '{0}'. It is possible that version NuGetEnvironment.GetFolderPath(NuGetFolderPath.Temp), _nugetLogger, CancellationToken.None).GetAwaiter().GetResult()) { - //TODO, do check on downloadResult + ValidatePackageHash(config, packageDependencyInfo, downloadResult); nugetProject.InstallPackageAsync( packageDependencyInfo, @@ -839,7 +886,11 @@ Version was specified as '{0}'. It is possible that version )); var packageResult = packageResultsToReturn.GetOrAdd(packageDependencyInfo.Id.ToLowerSafe(), new PackageResult(packageMetadata, packageRemoteMetadata, installedPath)); - if (shouldAddForcedResultMessage) packageResult.Messages.Add(new ResultMessage(ResultType.Note, "Backing up and removing old version")); + if (shouldAddForcedResultMessage) + { + packageResult.Messages.Add(new ResultMessage(ResultType.Note, "Backing up and removing old version")); + } + packageResult.InstallLocation = installedPath; packageResult.Messages.Add(new ResultMessage(ResultType.Debug, ApplicationParameters.Messages.ContinueChocolateyAction)); @@ -855,8 +906,10 @@ Version was specified as '{0}'. It is possible that version packageResult.Messages.Add(new ResultMessage(ResultType.Warn, message)); } - if (continueAction != null) continueAction.Invoke(packageResult, config); - + if (continueAction != null) + { + continueAction.Invoke(packageResult, config); + } } catch (Exception ex) { @@ -865,15 +918,25 @@ Version was specified as '{0}'. It is possible that version if (webException != null) { var response = webException.Response as HttpWebResponse; - if (response != null && !string.IsNullOrWhiteSpace(response.StatusDescription)) message += " {0}".FormatWith(response.StatusDescription); + if (response != null && !string.IsNullOrWhiteSpace(response.StatusDescription)) + { + message += " {0}".FormatWith(response.StatusDescription); + } } var logMessage = "{0} not installed. An error occurred during installation:{1} {2}".FormatWith(packageDependencyInfo.Id, Environment.NewLine, message); this.Log().Error(ChocolateyLoggers.Important, logMessage); var errorResult = packageResultsToReturn.GetOrAdd(packageDependencyInfo.Id, new PackageResult(packageDependencyInfo.Id, version.ToFullStringChecked(), null)); errorResult.Messages.Add(new ResultMessage(ResultType.Error, logMessage)); - if (errorResult.ExitCode == 0) errorResult.ExitCode = 1; - if (continueAction != null) continueAction.Invoke(errorResult, config); + if (errorResult.ExitCode == 0) + { + errorResult.ExitCode = 1; + } + + if (continueAction != null) + { + continueAction.Invoke(errorResult, config); + } } } } @@ -934,8 +997,15 @@ public virtual void EnsureBackupDirectoryRemoved(string packageName) rollbackDirectory = _fileSystem.GetFullPath(rollbackDirectory); } - if (string.IsNullOrWhiteSpace(rollbackDirectory) || !_fileSystem.DirectoryExists(rollbackDirectory)) return; - if (!rollbackDirectory.StartsWith(ApplicationParameters.PackageBackupLocation) || rollbackDirectory.IsEqualTo(ApplicationParameters.PackageBackupLocation)) return; + if (string.IsNullOrWhiteSpace(rollbackDirectory) || !_fileSystem.DirectoryExists(rollbackDirectory)) + { + return; + } + + if (!rollbackDirectory.StartsWith(ApplicationParameters.PackageBackupLocation) || rollbackDirectory.IsEqualTo(ApplicationParameters.PackageBackupLocation)) + { + return; + } FaultTolerance.TryCatchWithLoggingException( () => _fileSystem.DeleteDirectoryChecked(rollbackDirectory, recursive: true), @@ -961,7 +1031,10 @@ public virtual ConcurrentDictionary Upgrade(ChocolateyCon NuGetVersion version = !string.IsNullOrWhiteSpace(config.Version) ? NuGetVersion.Parse(config.Version) : null; - if (config.Force) config.AllowDowngrade = true; + if (config.Force) + { + config.AllowDowngrade = true; + } var sourceCacheContext = new ChocolateySourceCacheContext(config); var remoteRepositories = NugetCommon.GetRemoteRepositories(config, _nugetLogger, _fileSystem); @@ -970,13 +1043,13 @@ public virtual ConcurrentDictionary Upgrade(ChocolateyCon var projectContext = new ChocolateyNuGetProjectContext(config, _nugetLogger); var configIgnoreDependencies = config.IgnoreDependencies; - var allLocalPackages = SetPackageNamesIfAllSpecified(config, () => { config.IgnoreDependencies = true; }).ToList(); + var allLocalPackages = SetLocalPackageNamesIfAllSpecified(config, () => { config.IgnoreDependencies = true; }).ToList(); config.IgnoreDependencies = configIgnoreDependencies; var localPackageListValid = true; config.CreateBackup(); - foreach (string packageName in config.PackageNames.Split(new[] { ApplicationParameters.PackageNamesSeparator }, StringSplitOptions.RemoveEmptyEntries).OrEmpty()) + foreach (var packageName in config.PackageNames.Split(new[] { ApplicationParameters.PackageNamesSeparator }, StringSplitOptions.RemoveEmptyEntries).OrEmpty()) { // We need to ensure we are using a clean configuration file // before we start reading it. @@ -1000,28 +1073,37 @@ public virtual ConcurrentDictionary Upgrade(ChocolateyCon { if (config.UpgradeCommand.FailOnNotInstalled) { - string failLogMessage = "{0} is not installed. Cannot upgrade a non-existent package.".FormatWith(packageName); + var failLogMessage = "{0} is not installed. Cannot upgrade a non-existent package.".FormatWith(packageName); var result = packageResultsToReturn.GetOrAdd(packageName, new PackageResult(packageName, null, null)); result.Messages.Add(new ResultMessage(ResultType.Error, failLogMessage)); - if (config.RegularOutput) this.Log().Error(ChocolateyLoggers.Important, failLogMessage); + if (config.RegularOutput) + { + this.Log().Error(ChocolateyLoggers.Important, failLogMessage); + } continue; } if (config.Features.SkipPackageUpgradesWhenNotInstalled) { - string warnLogMessage = "{0} is not installed and skip non-installed option selected. Skipping...".FormatWith(packageName); + var warnLogMessage = "{0} is not installed and skip non-installed option selected. Skipping...".FormatWith(packageName); var result = packageResultsToReturn.GetOrAdd(packageName, new PackageResult(packageName, null, null)); result.Messages.Add(new ResultMessage(ResultType.Warn, warnLogMessage)); - if (config.RegularOutput) this.Log().Warn(ChocolateyLoggers.Important, warnLogMessage); + if (config.RegularOutput) + { + this.Log().Warn(ChocolateyLoggers.Important, warnLogMessage); + } continue; } - string logMessage = @"{0} is not installed. Installing...".FormatWith(packageName); + var logMessage = @"{0} is not installed. Installing...".FormatWith(packageName); localPackageListValid = false; - if (config.RegularOutput) this.Log().Warn(ChocolateyLoggers.Important, logMessage); + if (config.RegularOutput) + { + this.Log().Warn(ChocolateyLoggers.Important, logMessage); + } var packageNames = config.PackageNames; config.PackageNames = packageName; @@ -1043,9 +1125,9 @@ public virtual ConcurrentDictionary Upgrade(ChocolateyCon } var pkgInfo = _packageInfoService.Get(installedPackage.PackageMetadata); - bool isPinned = pkgInfo != null && pkgInfo.IsPinned; + var isPinned = pkgInfo != null && pkgInfo.IsPinned; - if (isPinned && config.OutdatedCommand.IgnorePinned) + if (isPinned && config.OutdatedCommand.IgnorePinned && !config.UpgradeCommand.IgnorePinned) { continue; } @@ -1056,7 +1138,7 @@ public virtual ConcurrentDictionary Upgrade(ChocolateyCon if (version != null && version < installedPackage.PackageMetadata.Version && !config.AllowDowngrade) { - string logMessage = "A newer version of {0} (v{1}) is already installed.{2} Use --allow-downgrade or --force to attempt to upgrade to older versions.".FormatWith(installedPackage.PackageMetadata.Id, installedPackage.Version, Environment.NewLine); + var logMessage = "A newer version of {0} (v{1}) is already installed.{2} Use --allow-downgrade or --force to attempt to upgrade to older versions.".FormatWith(installedPackage.PackageMetadata.Id, installedPackage.Version, Environment.NewLine); var nullResult = packageResultsToReturn.GetOrAdd(packageName, new PackageResult(installedPackage.PackageMetadata, pathResolver.GetInstallPath(installedPackage.PackageMetadata.Id))); nullResult.Messages.Add(new ResultMessage(ResultType.Error, logMessage)); this.Log().Error(ChocolateyLoggers.Important, logMessage); @@ -1070,21 +1152,27 @@ public virtual ConcurrentDictionary Upgrade(ChocolateyCon // this is a prerelease - opt in for newer prereleases. config.Prerelease = true; } - var availablePackage = NugetList.FindPackage(packageName, config, _nugetLogger, sourceCacheContext, remoteEndpoints, version); + var availablePackage = NugetList.FindPackage(packageName, config, _nugetLogger, (SourceCacheContext)sourceCacheContext, remoteEndpoints, version); config.Prerelease = originalPrerelease; if (availablePackage == null) { - if (config.Features.IgnoreUnfoundPackagesOnUpgradeOutdated) continue; + if (config.Features.IgnoreUnfoundPackagesOnUpgradeOutdated) + { + continue; + } - string logMessage = "{0} was not found with the source(s) listed.{1} If you specified a particular version and are receiving this message, it is possible that the package name exists but the version does not.{1} Version: \"{2}\"; Source(s): \"{3}\"".FormatWith(packageName, Environment.NewLine, config.Version, config.Sources); + var logMessage = "{0} was not found with the source(s) listed.{1} If you specified a particular version and are receiving this message, it is possible that the package name exists but the version does not.{1} Version: \"{2}\"; Source(s): \"{3}\"".FormatWith(packageName, Environment.NewLine, config.Version, config.Sources); var unfoundResult = packageResultsToReturn.GetOrAdd(packageName, new PackageResult(packageName, version.ToFullStringChecked(), null)); if (config.UpgradeCommand.FailOnUnfound) { unfoundResult.Messages.Add(new ResultMessage(ResultType.Error, logMessage)); - if (config.RegularOutput) this.Log().Error(ChocolateyLoggers.Important, "{0}{1}".FormatWith(Environment.NewLine, logMessage)); + if (config.RegularOutput) + { + this.Log().Error(ChocolateyLoggers.Important, "{0}{1}".FormatWith(Environment.NewLine, logMessage)); + } } else { @@ -1107,7 +1195,7 @@ public virtual ConcurrentDictionary Upgrade(ChocolateyCon var packageResult = packageResultsToReturn.GetOrAdd(packageName, new PackageResult(availablePackage, pathResolver.GetInstallPath(availablePackage.Identity))); if (installedPackage.PackageMetadata.Version > availablePackage.Identity.Version && (!config.AllowDowngrade || (config.AllowDowngrade && version == null))) { - string logMessage = "{0} v{1} is newer than the most recent.".FormatWith(installedPackage.PackageMetadata.Id, installedPackage.Version); + var logMessage = "{0} v{1} is newer than the most recent.".FormatWith(installedPackage.PackageMetadata.Id, installedPackage.Version); packageResult.Messages.Add(new ResultMessage(ResultType.Inconclusive, logMessage)); if (!config.UpgradeCommand.NotifyOnlyAvailableUpgrades) @@ -1127,7 +1215,7 @@ public virtual ConcurrentDictionary Upgrade(ChocolateyCon if (installedPackage.PackageMetadata.Version == availablePackage.Identity.Version) { - string logMessage = "{0} v{1} is the latest version available based on your source(s).".FormatWith(installedPackage.PackageMetadata.Id, installedPackage.Version); + var logMessage = "{0} v{1} is the latest version available based on your source(s).".FormatWith(installedPackage.PackageMetadata.Id, installedPackage.Version); if (!config.Force) { @@ -1152,14 +1240,17 @@ public virtual ConcurrentDictionary Upgrade(ChocolateyCon } packageResult.Messages.Add(new ResultMessage(ResultType.Note, logMessage)); - if (config.RegularOutput) this.Log().Info(logMessage); + if (config.RegularOutput) + { + this.Log().Info(logMessage); + } } if ((availablePackage.Identity.Version > installedPackage.PackageMetadata.Version) || config.Force || (availablePackage.Identity.Version < installedPackage.PackageMetadata.Version && config.AllowDowngrade)) { if (availablePackage.Identity.Version > installedPackage.PackageMetadata.Version) { - string logMessage = "You have {0} v{1} installed. Version {2} is available based on your source(s).".FormatWith(installedPackage.PackageMetadata.Id, installedPackage.Version, availablePackage.Identity.Version); + var logMessage = "You have {0} v{1} installed. Version {2} is available based on your source(s).".FormatWith(installedPackage.PackageMetadata.Id, installedPackage.Version, availablePackage.Identity.Version); packageResult.Messages.Add(new ResultMessage(ResultType.Note, logMessage)); if (config.RegularOutput) @@ -1174,20 +1265,41 @@ public virtual ConcurrentDictionary Upgrade(ChocolateyCon if (isPinned) { - string logMessage = "{0} is pinned. Skipping pinned package.".FormatWith(packageName); - packageResult.Messages.Add(new ResultMessage(ResultType.Warn, logMessage)); - packageResult.Messages.Add(new ResultMessage(ResultType.Inconclusive, logMessage)); - if (config.RegularOutput) this.Log().Warn(ChocolateyLoggers.Important, logMessage); + if (!config.UpgradeCommand.IgnorePinned) + { + var logMessage = "{0} is pinned. Skipping pinned package.".FormatWith(packageName); + packageResult.Messages.Add(new ResultMessage(ResultType.Warn, logMessage)); + packageResult.Messages.Add(new ResultMessage(ResultType.Inconclusive, logMessage)); + + if (config.RegularOutput) + { + this.Log().Warn(ChocolateyLoggers.Important, logMessage); + } + + continue; + } + else + { + var logMessage = "{0} is pinned. Upgrading pinned package anyway as ignore pin is specified".FormatWith(packageName); + packageResult.Messages.Add(new ResultMessage(ResultType.Warn, logMessage)); - continue; + if (config.RegularOutput) + { + this.Log().Warn(ChocolateyLoggers.Important, logMessage); + } + + config.PinPackage = true; + } } if (performAction) { localPackageListValid = false; + var oldPrerelease = config.Prerelease; + config.Prerelease = config.Prerelease || availablePackage.Identity.Version.IsPrerelease; NugetCommon.GetPackageDependencies(availablePackage.Identity, NuGetFramework.AnyFramework, sourceCacheContext, _nugetLogger, remoteEndpoints, sourcePackageDependencyInfos, sourceDependencyCache, config).GetAwaiter().GetResult(); - + config.Prerelease = oldPrerelease; packagesToUninstall.Add(installedPackage); @@ -1201,7 +1313,6 @@ public virtual ConcurrentDictionary Upgrade(ChocolateyCon } } - packagesToInstall.Add(availablePackage); var localPackagesDependencyInfos = allLocalPackages @@ -1226,11 +1337,14 @@ public virtual ConcurrentDictionary Upgrade(ChocolateyCon { if (version != null) { - var requestedPackageDependency = NugetList.FindPackage(parentPackage.Id, config, _nugetLogger, sourceCacheContext, remoteEndpoints, version); + var requestedPackageDependency = NugetList.FindPackage(parentPackage.Id, config, _nugetLogger, (SourceCacheContext)sourceCacheContext, remoteEndpoints, version); if (requestedPackageDependency != null) { + oldPrerelease = config.Prerelease; + config.Prerelease = config.Prerelease || availablePackage.Identity.Version.IsPrerelease; NugetCommon.GetPackageDependencies(requestedPackageDependency.Identity, NuGetFramework.AnyFramework, sourceCacheContext, _nugetLogger, remoteEndpoints, sourcePackageDependencyInfos, sourceDependencyCache, config).GetAwaiter().GetResult(); + config.Prerelease = oldPrerelease; } } @@ -1243,7 +1357,10 @@ public virtual ConcurrentDictionary Upgrade(ChocolateyCon if (availablePackageDependency != null) { + oldPrerelease = config.Prerelease; + config.Prerelease = config.Prerelease || availablePackage.Identity.Version.IsPrerelease; NugetCommon.GetPackageDependencies(availablePackageDependency.Identity, NuGetFramework.AnyFramework, sourceCacheContext, _nugetLogger, remoteEndpoints, sourcePackageDependencyInfos, sourceDependencyCache, config).GetAwaiter().GetResult(); + config.Prerelease = oldPrerelease; } else { @@ -1251,7 +1368,12 @@ public virtual ConcurrentDictionary Upgrade(ChocolateyCon } } - var removedSources = RemovePinnedSourceDependencies(sourcePackageDependencyInfos, allLocalPackages); + var removedSources = new HashSet(); + + if (!config.UpgradeCommand.IgnorePinned) + { + removedSources.AddRange(RemovePinnedSourceDependencies(sourcePackageDependencyInfos, allLocalPackages)); + } if (version != null || removedSources.Count == 0) { @@ -1304,7 +1426,7 @@ public virtual ConcurrentDictionary Upgrade(ChocolateyCon { var forcedResult = packageResultsToReturn.GetOrAdd(packageToUninstall.Identity.Id, packageToUninstall); forcedResult.Messages.Add(new ResultMessage(ResultType.Note, "Removing old version")); - string logMessage = "{0}:{1} {2}".FormatWith("Unable to remove existing package", Environment.NewLine, ex.Message); + var logMessage = "{0}:{1} {2}".FormatWith("Unable to remove existing package", Environment.NewLine, ex.Message); this.Log().Warn(logMessage); forcedResult.Messages.Add(new ResultMessage(ResultType.Inconclusive, logMessage)); } @@ -1358,7 +1480,10 @@ public virtual ConcurrentDictionary Upgrade(ChocolateyCon { foreach (var packageVersion in NugetList.FindAllPackageVersions(parentPackage.Id, config, _nugetLogger, sourceCacheContext, remoteEndpoints)) { + oldPrerelease = config.Prerelease; + config.Prerelease = config.Prerelease || availablePackage.Identity.Version.IsPrerelease; NugetCommon.GetPackageDependencies(packageVersion.Identity, NuGetFramework.AnyFramework, sourceCacheContext, _nugetLogger, remoteEndpoints, sourcePackageDependencyInfos, sourceDependencyCache, config).GetAwaiter().GetResult(); + config.Prerelease = oldPrerelease; } } @@ -1466,11 +1591,14 @@ public virtual ConcurrentDictionary Upgrade(ChocolateyCon { var forcedResult = packageResultsToReturn.GetOrAdd(packageToUninstall.Name, packageToUninstall); forcedResult.Messages.Add(new ResultMessage(ResultType.Note, "Backing up and removing old version")); - string logMessage = "{0}:{1} {2}".FormatWith("Unable to remove existing package prior to upgrade", Environment.NewLine, ex.Message); + var logMessage = "{0}:{1} {2}".FormatWith("Unable to remove existing package prior to upgrade", Environment.NewLine, ex.Message); this.Log().Warn(logMessage); //forcedResult.Messages.Add(new ResultMessage(ResultType.Inconclusive, logMessage)); forcedResult.Messages.Add(new ResultMessage(ResultType.Error, logMessage)); - if (continueAction != null) continueAction.Invoke(forcedResult, config); + if (continueAction != null) + { + continueAction.Invoke(forcedResult, config); + } continue; } @@ -1485,6 +1613,9 @@ public virtual ConcurrentDictionary Upgrade(ChocolateyCon _fileSystem.DeleteFile(pathResolver.GetInstalledPackageFilePath(packageDependencyInfo)); + this.Log().Info("Downloading package from source '{0}'".FormatWith(packageDependencyInfo.Source)); + this.Log().Debug("Package download location '{0}'".FormatWith(packageDependencyInfo.DownloadUri)); + ChocolateyProgressInfo.ShouldDisplayDownloadProgress = config.Features.ShowDownloadProgress; using (var downloadResult = downloadResource.GetDownloadResourceResultAsync( @@ -1493,7 +1624,7 @@ public virtual ConcurrentDictionary Upgrade(ChocolateyCon NuGetEnvironment.GetFolderPath(NuGetFolderPath.Temp), _nugetLogger, CancellationToken.None).GetAwaiter().GetResult()) { - //TODO, do check on downloadResult + ValidatePackageHash(config, packageDependencyInfo, downloadResult); nugetProject.InstallPackageAsync( packageDependencyInfo, @@ -1539,7 +1670,10 @@ public virtual ConcurrentDictionary Upgrade(ChocolateyCon packageResult.Messages.Add(new ResultMessage(ResultType.Warn, message)); } - if (continueAction != null) continueAction.Invoke(upgradePackageResult, config); + if (continueAction != null) + { + continueAction.Invoke(upgradePackageResult, config); + } if (packageToUninstall != null) { @@ -1559,15 +1693,25 @@ public virtual ConcurrentDictionary Upgrade(ChocolateyCon if (webException != null) { var response = webException.Response as HttpWebResponse; - if (response != null && !string.IsNullOrWhiteSpace(response.StatusDescription)) message += " {0}".FormatWith(response.StatusDescription); + if (response != null && !string.IsNullOrWhiteSpace(response.StatusDescription)) + { + message += " {0}".FormatWith(response.StatusDescription); + } } var logMessage = "{0} not upgraded. An error occurred during installation:{1} {2}".FormatWith(packageName, Environment.NewLine, message); this.Log().Error(ChocolateyLoggers.Important, logMessage); var errorResult = packageResultsToReturn.GetOrAdd(packageDependencyInfo.Id, new PackageResult(packageDependencyInfo.Id, version.ToFullStringChecked(), null)); errorResult.Messages.Add(new ResultMessage(ResultType.Error, logMessage)); - if (errorResult.ExitCode == 0) errorResult.ExitCode = 1; - if (continueAction != null) continueAction.Invoke(errorResult, config); + if (errorResult.ExitCode == 0) + { + errorResult.ExitCode = 1; + } + + if (continueAction != null) + { + continueAction.Invoke(errorResult, config); + } } } } @@ -1591,7 +1735,7 @@ public virtual ConcurrentDictionary GetOutdated(Chocolate var outdatedPackages = new ConcurrentDictionary(); - var allPackages = SetPackageNamesIfAllSpecified(config, () => { config.IgnoreDependencies = true; }); + var allPackages = SetLocalPackageNamesIfAllSpecified(config, () => { config.IgnoreDependencies = true; }); var packageNames = config.PackageNames.Split(new[] { ApplicationParameters.PackageNamesSeparator }, StringSplitOptions.RemoveEmptyEntries).OrEmpty().ToList(); config.CreateBackup(); @@ -1605,13 +1749,13 @@ public virtual ConcurrentDictionary GetOutdated(Chocolate var installedPackage = allPackages.FirstOrDefault(p => string.Equals(p.Name, packageName, StringComparison.OrdinalIgnoreCase)); var pkgInfo = _packageInfoService.Get(installedPackage.PackageMetadata); - bool isPinned = pkgInfo.IsPinned; + var isPinned = pkgInfo.IsPinned; // if the package is pinned and we are skipping pinned, // move on quickly if (isPinned && config.OutdatedCommand.IgnorePinned) { - string pinnedLogMessage = "{0} is pinned. Skipping pinned package.".FormatWith(packageName); + var pinnedLogMessage = "{0} is pinned. Skipping pinned package.".FormatWith(packageName); var pinnedPackageResult = outdatedPackages.GetOrAdd(packageName, new PackageResult(installedPackage.PackageMetadata, pathResolver.GetInstallPath(installedPackage.PackageMetadata.Id))); pinnedPackageResult.Messages.Add(new ResultMessage(ResultType.Debug, pinnedLogMessage)); pinnedPackageResult.Messages.Add(new ResultMessage(ResultType.Inconclusive, pinnedLogMessage)); @@ -1629,9 +1773,12 @@ public virtual ConcurrentDictionary GetOutdated(Chocolate if (latestPackage == null) { - if (config.Features.IgnoreUnfoundPackagesOnUpgradeOutdated) continue; + if (config.Features.IgnoreUnfoundPackagesOnUpgradeOutdated) + { + continue; + } - string unfoundLogMessage = "{0} was not found with the source(s) listed.{1} Source(s): \"{2}\"".FormatWith(packageName, Environment.NewLine, config.Sources); + var unfoundLogMessage = "{0} was not found with the source(s) listed.{1} Source(s): \"{2}\"".FormatWith(packageName, Environment.NewLine, config.Sources); var unfoundResult = outdatedPackages.GetOrAdd(packageName, new PackageResult(installedPackage.PackageMetadata, pathResolver.GetInstallPath(installedPackage.PackageMetadata.Id))); unfoundResult.Messages.Add(new ResultMessage(ResultType.Warn, unfoundLogMessage)); unfoundResult.Messages.Add(new ResultMessage(ResultType.Inconclusive, unfoundLogMessage)); @@ -1640,11 +1787,14 @@ public virtual ConcurrentDictionary GetOutdated(Chocolate continue; } - if (latestPackage.Identity.Version <= installedPackage.PackageMetadata.Version) continue; + if (latestPackage.Identity.Version <= installedPackage.PackageMetadata.Version) + { + continue; + } var packageResult = outdatedPackages.GetOrAdd(packageName, new PackageResult(latestPackage, pathResolver.GetInstallPath(latestPackage.Identity))); - string logMessage = "You have {0} v{1} installed. Version {2} is available based on your source(s).{3} Source(s): \"{4}\"".FormatWith(installedPackage.Name, installedPackage.Version, latestPackage.Identity.Version, Environment.NewLine, config.Sources); + var logMessage = "You have {0} v{1} installed. Version {2} is available based on your source(s).{3} Source(s): \"{4}\"".FormatWith(installedPackage.Name, installedPackage.Version, latestPackage.Identity.Version, Environment.NewLine, config.Sources); packageResult.Messages.Add(new ResultMessage(ResultType.Note, logMessage)); this.Log().Info("{0}|{1}|{2}|{3}".FormatWith(installedPackage.Name, installedPackage.Version, latestPackage.Identity.Version, isPinned.ToStringSafe().ToLowerSafe())); @@ -1666,7 +1816,10 @@ public virtual ConcurrentDictionary GetOutdated(Chocolate /// The original unmodified configuration, so it can be reset after upgrade protected virtual ChocolateyConfiguration SetConfigFromRememberedArguments(ChocolateyConfiguration config, ChocolateyPackageInformation packageInfo) { - if (!config.Features.UseRememberedArgumentsForUpgrades || string.IsNullOrWhiteSpace(packageInfo.Arguments)) return config; + if (!config.Features.UseRememberedArgumentsForUpgrades || string.IsNullOrWhiteSpace(packageInfo.Arguments)) + { + return config; + } var packageArgumentsUnencrypted = packageInfo.Arguments.ContainsSafe(" --") && packageInfo.Arguments.ToStringSafe().Length > 4 ? packageInfo.Arguments : NugetEncryptionUtility.DecryptString(packageInfo.Arguments); @@ -1687,7 +1840,10 @@ protected virtual ChocolateyConfiguration SetConfigFromRememberedArguments(Choco if (packageArgumentSplit.Length == 2) { optionValue = packageArgumentSplit[1].ToStringSafe().UnquoteSafe(); - if (optionValue.StartsWith("'")) optionValue.UnquoteSafe(); + if (optionValue.StartsWith("'")) + { + optionValue.UnquoteSafe(); + } } if (sensitiveArgs) @@ -1702,10 +1858,25 @@ protected virtual ChocolateyConfiguration SetConfigFromRememberedArguments(Choco ConfigurationOptions.OptionSet.Parse(packageArguments); // there may be overrides from the user running upgrade - if (!string.IsNullOrWhiteSpace(originalConfig.SourceCommand.Username)) config.SourceCommand.Username = originalConfig.SourceCommand.Username; - if (!string.IsNullOrWhiteSpace(originalConfig.SourceCommand.Password)) config.SourceCommand.Password = originalConfig.SourceCommand.Password; - if (!string.IsNullOrWhiteSpace(originalConfig.SourceCommand.Certificate)) config.SourceCommand.Certificate = originalConfig.SourceCommand.Certificate; - if (!string.IsNullOrWhiteSpace(originalConfig.SourceCommand.CertificatePassword)) config.SourceCommand.CertificatePassword = originalConfig.SourceCommand.CertificatePassword; + if (!string.IsNullOrWhiteSpace(originalConfig.SourceCommand.Username)) + { + config.SourceCommand.Username = originalConfig.SourceCommand.Username; + } + + if (!string.IsNullOrWhiteSpace(originalConfig.SourceCommand.Password)) + { + config.SourceCommand.Password = originalConfig.SourceCommand.Password; + } + + if (!string.IsNullOrWhiteSpace(originalConfig.SourceCommand.Certificate)) + { + config.SourceCommand.Certificate = originalConfig.SourceCommand.Certificate; + } + + if (!string.IsNullOrWhiteSpace(originalConfig.SourceCommand.CertificatePassword)) + { + config.SourceCommand.CertificatePassword = originalConfig.SourceCommand.CertificatePassword; + } return originalConfig; } @@ -1889,7 +2060,10 @@ private string GetInstallDirectory(IPackageMetadata installedPackage) protected virtual void EnsurePackageFilesHaveCompatibleAttributes(ChocolateyConfiguration config, IPackageMetadata installedPackage) { var installDirectory = GetInstallDirectory(installedPackage); - if (!_fileSystem.DirectoryExists(installDirectory)) return; + if (!_fileSystem.DirectoryExists(installDirectory)) + { + return; + } _filesService.EnsureCompatibleFileAttributes(installDirectory, config); } @@ -1941,7 +2115,10 @@ public virtual void RemoveOldPackageScriptsBeforeUpgrade(string directoryPath, s public virtual void BackupChangedFiles(string packageInstallPath, ChocolateyConfiguration config, ChocolateyPackageInformation packageInfo) { - if (packageInfo == null || packageInfo.Package == null) return; + if (packageInfo == null || packageInfo.Package == null) + { + return; + } var version = packageInfo.Package.Version.ToNormalizedStringChecked(); @@ -1968,7 +2145,10 @@ public virtual void BackupChangedFiles(string packageInstallPath, ChocolateyConf if (!currentFile.Checksum.IsEqualTo(installedFile.Checksum)) { // skip nupkgs if they are different - if (_fileSystem.GetFileExtension(currentFile.Path).IsEqualTo(".nupkg")) continue; + if (_fileSystem.GetFileExtension(currentFile.Path).IsEqualTo(".nupkg")) + { + continue; + } var backupName = "{0}.{1}".FormatWith(_fileSystem.GetFileName(currentFile.Path), version); FaultTolerance.TryCatchWithLoggingException( @@ -2010,7 +2190,10 @@ private void RemovePackageFromCache(ChocolateyConfiguration config, IPackageMeta this.Log().Debug(ChocolateyLoggers.Verbose, "Ensuring removal of package cache files."); var cacheDirectory = _fileSystem.CombinePaths(config.CacheLocation, installedPackage.Id, installedPackage.Version.ToNormalizedStringChecked()); - if (!_fileSystem.DirectoryExists(cacheDirectory)) return; + if (!_fileSystem.DirectoryExists(cacheDirectory)) + { + return; + } FaultTolerance.TryCatchWithLoggingException( () => _fileSystem.DeleteDirectoryChecked(cacheDirectory, recursive: true), @@ -2066,7 +2249,10 @@ public void UninstallDryRun(ChocolateyConfiguration config, Action Uninstall(ChocolateyC } } - SetPackageNamesIfAllSpecified(config, () => + SetLocalPackageNamesIfAllSpecified(config, () => { // force remove the item, ignore the dependencies // as those are going to be picked up anyway @@ -2153,7 +2339,7 @@ public virtual ConcurrentDictionary Uninstall(ChocolateyC var packageVersionsToRemove = new List(); - foreach (string packageName in config.PackageNames.Split(new[] { ApplicationParameters.PackageNamesSeparator }, StringSplitOptions.RemoveEmptyEntries).OrEmpty()) + foreach (var packageName in config.PackageNames.Split(new[] { ApplicationParameters.PackageNamesSeparator }, StringSplitOptions.RemoveEmptyEntries).OrEmpty()) { // We need to ensure we are using a clean configuration file // before we start reading it. @@ -2172,11 +2358,15 @@ public virtual ConcurrentDictionary Uninstall(ChocolateyC if (installedPackageVersions.Count == 0) { - string logMessage = "{0} is not installed. Cannot uninstall a non-existent package.".FormatWith(packageName); + var logMessage = "{0} is not installed. Cannot uninstall a non-existent package.".FormatWith(packageName); var missingResult = packageResultsToReturn.GetOrAdd(packageName, new PackageResult(packageName, null, null)); missingResult.Messages.Add(new ResultMessage(ResultType.Error, logMessage)); - if (config.RegularOutput) this.Log().Error(ChocolateyLoggers.Important, logMessage); + if (config.RegularOutput) + { + this.Log().Error(ChocolateyLoggers.Important, logMessage); + } + continue; } @@ -2208,18 +2398,32 @@ public virtual ConcurrentDictionary Uninstall(ChocolateyC requireAnswer: true, allowShortAnswer: false); - if (string.IsNullOrWhiteSpace(selection)) continue; - if (selection.IsEqualTo(abortChoice)) continue; + if (string.IsNullOrWhiteSpace(selection)) + { + continue; + } + + if (selection.IsEqualTo(abortChoice)) + { + continue; + } + if (selection.IsEqualTo(allVersionsChoice)) { packageVersionsToRemove.AddRange(installedPackageVersions.ToList()); - if (config.RegularOutput) this.Log().Info(() => "You selected to remove all versions of {0}".FormatWith(packageName)); + if (config.RegularOutput) + { + this.Log().Info(() => "You selected to remove all versions of {0}".FormatWith(packageName)); + } } else { PackageResult pkg = installedPackageVersions.FirstOrDefault((p) => p.Version.IsEqualTo(selection)); packageVersionsToRemove.Add(pkg); - if (config.RegularOutput) this.Log().Info(() => "You selected {0} v{1}".FormatWith(pkg.Name, pkg.Version)); + if (config.RegularOutput) + { + this.Log().Info(() => "You selected {0} v{1}".FormatWith(pkg.Name, pkg.Version)); + } } } } @@ -2241,7 +2445,11 @@ public virtual ConcurrentDictionary Uninstall(ChocolateyC var pinnedResult = packageResultsToReturn.GetOrAdd(installedPackage.Name, new PackageResult(installedPackage.Name, null, null)); pinnedResult.Messages.Add(new ResultMessage(ResultType.Warn, logMessage)); pinnedResult.Messages.Add(new ResultMessage(ResultType.Inconclusive, logMessage)); - if (config.RegularOutput) this.Log().Warn(ChocolateyLoggers.Important, logMessage); + if (config.RegularOutput) + { + this.Log().Warn(ChocolateyLoggers.Important, logMessage); + } + continue; } @@ -2314,7 +2522,10 @@ public virtual ConcurrentDictionary Uninstall(ChocolateyC var logMessage = "{0}{1} v{2}{3}".FormatWith(Environment.NewLine, packageToUninstall.Name, packageToUninstall.Version.ToStringSafe(), config.Force ? " (forced)" : string.Empty); packageResult.Messages.Add(new ResultMessage(ResultType.Debug, ApplicationParameters.Messages.ContinueChocolateyAction)); - if (continueAction != null) continueAction.Invoke(packageResult, config); + if (continueAction != null) + { + continueAction.Invoke(packageResult, config); + } if (packageToUninstall != null) { @@ -2356,7 +2567,10 @@ public virtual ConcurrentDictionary Uninstall(ChocolateyC this.Log().Error(ChocolateyLoggers.Important, logMessage); var result = packageResultsToReturn.GetOrAdd(packageToUninstall.Name + "." + packageToUninstall.Version.ToStringSafe(), new PackageResult(packageToUninstall.PackageMetadata, pathResolver.GetInstallPath(packageToUninstall.PackageMetadata.Id))); result.Messages.Add(new ResultMessage(ResultType.Error, logMessage)); - if (result.ExitCode == 0) result.ExitCode = 1; + if (result.ExitCode == 0) + { + result.ExitCode = 1; + } if (config.Features.StopOnFirstPackageFailure) { @@ -2370,7 +2584,10 @@ public virtual ConcurrentDictionary Uninstall(ChocolateyC { // continue action won't be found b/c we are not actually uninstalling (this is noop) var result = packageResultsToReturn.GetOrAdd(installedPackage.Name + "." + installedPackage.Version.ToStringSafe(), new PackageResult(installedPackage.PackageMetadata, pathResolver.GetInstallPath(installedPackage.PackageMetadata.Id))); - if (continueAction != null) continueAction.Invoke(result, config); + if (continueAction != null) + { + continueAction.Invoke(result, config); + } } } @@ -2522,7 +2739,10 @@ private void EnsureNupkgRemoved(IPackageMetadata removedPackage, bool throwError var installDir = _fileSystem.CombinePaths(ApplicationParameters.PackagesLocation, removedPackage.Id); var nupkg = _fileSystem.CombinePaths(installDir, nupkgFile); - if (!_fileSystem.FileExists(nupkg)) return; + if (!_fileSystem.FileExists(nupkg)) + { + return; + } FaultTolerance.TryCatchWithLoggingException( () => _fileSystem.DeleteFile(nupkg), @@ -2532,7 +2752,11 @@ private void EnsureNupkgRemoved(IPackageMetadata removedPackage, bool throwError protected void NormalizeNuspecCasing(IPackageSearchMetadata packageMetadata, string packageLocation) { - if (Platform.GetPlatform() == PlatformType.Windows) return; + if (Platform.GetPlatform() == PlatformType.Windows) + { + return; + } + this.Log().Debug(ChocolateyLoggers.Verbose, "Fixing nuspec casing if required"); var expectedNuspec = _fileSystem.CombinePaths(packageLocation, "{0}{1}" @@ -2561,7 +2785,10 @@ public virtual void RemoveInstallationFilesUnsafe(IPackageMetadata removedPackag foreach (var file in _fileSystem.GetFiles(installDir, "*.*", SearchOption.AllDirectories).OrEmpty()) { var fileSnapshot = pkgInfo.FilesSnapshot.Files.FirstOrDefault(f => f.Path.IsEqualTo(file)); - if (fileSnapshot == null) continue; + if (fileSnapshot == null) + { + continue; + } var filesystemFileChecksum = _filesService.GetPackageFile(file).Checksum; @@ -2573,7 +2800,10 @@ public virtual void RemoveInstallationFilesUnsafe(IPackageMetadata removedPackag if (fileSnapshot.Checksum == filesystemFileChecksum) { - if (!_fileSystem.FileExists(file)) continue; + if (!_fileSystem.FileExists(file)) + { + continue; + } try { @@ -2612,11 +2842,17 @@ public virtual void RemoveInstallationFiles(IPackageMetadata removedPackage, Cho foreach (var file in _fileSystem.GetFiles(installDir, "*.*", SearchOption.AllDirectories).OrEmpty()) { var fileSnapshot = pkgInfo.FilesSnapshot.Files.FirstOrDefault(f => f.Path.IsEqualTo(file)); - if (fileSnapshot == null) continue; + if (fileSnapshot == null) + { + continue; + } if (fileSnapshot.Checksum == _filesService.GetPackageFile(file).Checksum) { - if (!_fileSystem.FileExists(file)) continue; + if (!_fileSystem.FileExists(file)) + { + continue; + } FaultTolerance.TryCatchWithLoggingException( () => _fileSystem.DeleteFile(file), @@ -2682,12 +2918,12 @@ public IEnumerable GetInstalledPackages(ChocolateyConfiguration c return installedPackages; } - private IEnumerable SetPackageNamesIfAllSpecified(ChocolateyConfiguration config, Action customAction) + private IEnumerable SetLocalPackageNamesIfAllSpecified(ChocolateyConfiguration config, Action customAction) { var allPackages = GetInstalledPackages(config); if (config.PackageNames.IsEqualTo(ApplicationParameters.AllPackages)) { - var packagesToUpdate= allPackages.Select(p => p.Name).ToList(); + var packagesToUpdate = allPackages.Select(p => p.Name).ToList(); if (!string.IsNullOrWhiteSpace(config.UpgradeCommand.PackageNamesToSkip)) { @@ -2724,13 +2960,92 @@ private IEnumerable SetPackageNamesIfAllSpecified(ChocolateyConfi config.PackageNames = packagesToUpdate.Join(ApplicationParameters.PackageNamesSeparator); - if (customAction != null) customAction.Invoke(); + if (customAction != null) + { + customAction.Invoke(); + } } return allPackages; } -#pragma warning disable IDE1006 + private void SetRemotePackageNamesIfAllSpecified(ChocolateyConfiguration config, Action customAction) + { + if (config.PackageNames.IsEqualTo(ApplicationParameters.AllPackages)) + { + foreach (var repositoryUrl in ApplicationParameters.PublicNuGetSources) + { + if (config.Sources.Contains(repositoryUrl.TrimEnd(('/')))) + { + throw new ApplicationException("Installing all packages from {0} is not supported.{1}Only internal NuGet repositories are supported." + .FormatWith(repositoryUrl, Environment.NewLine)); + } + } + + var isQuiet = config.QuietOutput; + config.QuietOutput = true; + var input = config.Input; + config.Input = string.Empty; + var remotePackageList = List(config).Select(p => p.Name).Distinct().ToList(); + config.QuietOutput = isQuiet; + config.Input = input; + + config.PackageNames = remotePackageList.Join(ApplicationParameters.PackageNamesSeparator); + + if (customAction != null) + { + customAction.Invoke(); + } + } + } + + private void ValidatePackageHash(ChocolateyConfiguration config, SourcePackageDependencyInfo packageDependencyInfo, DownloadResourceResult downloadResult) + { + if (!config.Features.UsePackageHashValidation) + { + this.Log().Debug("Skipping package hash validation as feature '{0}' is not enabled.".FormatWith(ApplicationParameters.Features.UsePackageHashValidation)); + } + else if (packageDependencyInfo.PackageHash is null) + { + // Folder based sources and v3 api based sources do not provide package hashes when getting metadata + this.Log().Debug("Source does not provide a package hash, skipping package hash validation."); + } + else + { + var hashInfo = HashConverter.ConvertHashToHex(packageDependencyInfo.PackageHash); + + if (hashInfo.HashType == CryptoHashProviderType.Sha512) + { + using (var metadataFileStream = downloadResult.PackageReader.GetStream(PackagingCoreConstants.NupkgMetadataFileExtension)) + { + var metadataFileContents = NupkgMetadataFileFormat.Read(metadataFileStream, + _nugetLogger, + PackagingCoreConstants.NupkgMetadataFileExtension); + + var metadataFileHashInfo = HashConverter.ConvertHashToHex(metadataFileContents.ContentHash); + + if (hashInfo.ConvertedHash.Equals(metadataFileHashInfo.ConvertedHash, StringComparison.OrdinalIgnoreCase)) + { + this.Log().Debug("Package hash matches expected hash."); + } + else + { + var errorMessage = "Package hash '{0}' did not match expected hash '{1}'." + .FormatWith(metadataFileContents.ContentHash, + hashInfo.ConvertedHash); + + throw new InvalidDataException(errorMessage); + } + } + } + else + { + this.Log().Warn("Source is not providing a SHA512 hash, cannot validate package hash."); + } + } + } + +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public void ensure_source_app_installed(ChocolateyConfiguration config, Action ensureAction) => EnsureSourceAppInstalled(config, ensureAction); @@ -2864,6 +3179,6 @@ public virtual void remove_installation_files(IPackageMetadata removedPackage, C [Obsolete("This overload is deprecated and will be removed in v3.")] public IEnumerable get_all_installed_packages(ChocolateyConfiguration config) => GetInstalledPackages(config); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/services/PendingRebootService.cs b/src/chocolatey/infrastructure.app/services/PendingRebootService.cs index d4251504dd..e526217a6e 100644 --- a/src/chocolatey/infrastructure.app/services/PendingRebootService.cs +++ b/src/chocolatey/infrastructure.app/services/PendingRebootService.cs @@ -14,13 +14,13 @@ // See the License for the specific language governing permissions and // limitations under the License. +using chocolatey.infrastructure.app.configuration; +using Microsoft.Win32; +using chocolatey.infrastructure.platforms; +using System; + namespace chocolatey.infrastructure.app.services { - using configuration; - using Microsoft.Win32; - using platforms; - using System; - /// /// Service to check for System level pending reboot request /// @@ -69,7 +69,7 @@ private bool IsPendingComputerRename() var activeName = GetRegistryKeyString(path.FormatWith("ActiveComputerName"), "ComputerName"); var pendingName = GetRegistryKeyString(path.FormatWith("ComputerName"), "ComputerName"); - bool result = !string.IsNullOrWhiteSpace(activeName) && + var result = !string.IsNullOrWhiteSpace(activeName) && !string.IsNullOrWhiteSpace(pendingName) && activeName != pendingName; @@ -225,10 +225,10 @@ private bool IsAtLeastVistaSp1() return versionNumber.Build >= 6001; } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public bool is_pending_reboot(ChocolateyConfiguration config) => IsRebootPending(config); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/services/PowershellService.cs b/src/chocolatey/infrastructure.app/services/PowershellService.cs index b80dce5ba8..3ef71aaa99 100644 --- a/src/chocolatey/infrastructure.app/services/PowershellService.cs +++ b/src/chocolatey/infrastructure.app/services/PowershellService.cs @@ -14,33 +14,33 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Management.Automation.Runspaces; +using System.Reflection; +using chocolatey.infrastructure.adapters; +using chocolatey.infrastructure.commandline; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.cryptography; +using chocolatey.infrastructure.app.domain; +using chocolatey.infrastructure.commands; +using chocolatey.infrastructure.registration; +using chocolatey.infrastructure.logging; +using NuGet.Packaging; +using NuGet.Protocol.Core.Types; +using chocolatey.infrastructure.powershell; +using chocolatey.infrastructure.results; +using chocolatey.infrastructure.app.utility; +using CryptoHashProvider = chocolatey.infrastructure.cryptography.CryptoHashProvider; +using Environment = System.Environment; +using IFileSystem = chocolatey.infrastructure.filesystem.IFileSystem; + namespace chocolatey.infrastructure.app.services { - using System; - using System.Collections.Generic; - using System.Diagnostics; - using System.IO; - using System.Linq; - using System.Management.Automation; - using System.Management.Automation.Runspaces; - using System.Reflection; - using adapters; - using commandline; - using configuration; - using cryptography; - using domain; - using infrastructure.commands; - using infrastructure.registration; - using logging; - using NuGet.Packaging; - using NuGet.Protocol.Core.Types; - using powershell; - using results; - using utility; - using CryptoHashProvider = cryptography.CryptoHashProvider; - using Environment = System.Environment; - using IFileSystem = filesystem.IFileSystem; - public class PowershellService : IPowershellService { private readonly IFileSystem _fileSystem; @@ -88,13 +88,19 @@ private string GetPackageScriptForAction(PackageResult packageResult, CommandNam private IEnumerable GetHookScripts(ChocolateyConfiguration configuration, PackageResult packageResult, CommandNameType command, bool isPreHook) { - List hookScriptPaths = new List(); + var hookScriptPaths = new List(); // If skipping hook scripts, return an empty list - if (configuration.SkipHookScripts) return hookScriptPaths; + if (configuration.SkipHookScripts) + { + return hookScriptPaths; + } // If hooks directory doesn't exist, return an empty list to prevent directory not exist warnings - if (!_fileSystem.DirectoryExists(ApplicationParameters.HooksLocation)) return hookScriptPaths; + if (!_fileSystem.DirectoryExists(ApplicationParameters.HooksLocation)) + { + return hookScriptPaths; + } string filenameBase; @@ -246,7 +252,7 @@ public bool RunAction(ChocolateyConfiguration configuration, PackageResult packa foreach (var hookScriptPath in hookPreScriptPathList.Concat(hookPostScriptPathList).OrEmpty()) { this.Log().Debug(ChocolateyLoggers.Important, "Contents of '{0}':".FormatWith(chocoPowerShellScript)); - string hookScriptContents = _fileSystem.ReadFile(hookScriptPath); + var hookScriptContents = _fileSystem.ReadFile(hookScriptPath); this.Log().Debug(() => hookScriptContents.EscapeCurlyBraces()); } @@ -256,12 +262,12 @@ public bool RunAction(ChocolateyConfiguration configuration, PackageResult packa var package = packageResult.SearchMetadata; PreparePowerShellEnvironment(package, configuration, packageDirectory); - bool shouldRun = !configuration.PromptForConfirmation; + var shouldRun = !configuration.PromptForConfirmation; if (!string.IsNullOrEmpty(chocoPowerShellScript)) { this.Log().Debug(ChocolateyLoggers.Important, "Contents of '{0}':".FormatWith(chocoPowerShellScript)); - string chocoPowerShellScriptContents = _fileSystem.ReadFile(chocoPowerShellScript); + var chocoPowerShellScriptContents = _fileSystem.ReadFile(chocoPowerShellScript); // leave this way, doesn't take it through formatting. this.Log().Debug(() => chocoPowerShellScriptContents.EscapeCurlyBraces()); @@ -294,7 +300,11 @@ public bool RunAction(ChocolateyConfiguration configuration, PackageResult packa ); } - if (selection.IsEqualTo("yes")) shouldRun = true; + if (selection.IsEqualTo("yes")) + { + shouldRun = true; + } + if (selection.IsEqualTo("all - yes to all")) { configuration.PromptForConfirmation = false; @@ -404,7 +414,10 @@ private PowerShellExecutionResults RunExternalPowerShell(ChocolateyConfiguration configuration.CommandExecutionTimeoutSeconds, (s, e) => { - if (string.IsNullOrWhiteSpace(e.Data)) return; + if (string.IsNullOrWhiteSpace(e.Data)) + { + return; + } //inspect for different streams if (e.Data.StartsWith("DEBUG:")) { @@ -425,7 +438,11 @@ private PowerShellExecutionResults RunExternalPowerShell(ChocolateyConfiguration }, (s, e) => { - if (string.IsNullOrWhiteSpace(e.Data)) return; + if (string.IsNullOrWhiteSpace(e.Data)) + { + return; + } + result.StandardErrorWritten = true; this.Log().Error(() => " " + e.Data.EscapeCurlyBraces()); }); @@ -435,7 +452,10 @@ private PowerShellExecutionResults RunExternalPowerShell(ChocolateyConfiguration public void PreparePowerShellEnvironment(IPackageSearchMetadata package, ChocolateyConfiguration configuration, string packageDirectory) { - if (package == null) return; + if (package == null) + { + return; + } EnvironmentSettings.UpdateEnvironmentVariables(); EnvironmentSettings.SetEnvironmentVariables(configuration); @@ -561,8 +581,15 @@ private void AddAssemblyResolver() // we build against v1 - everything should update in a kosher manner to the newest, but it may not. var assembly = TryLoadVersionedAssembly(requestedAssembly, new Version(5, 0, 0, 0)) ?? TryLoadVersionedAssembly(requestedAssembly, new Version(4, 0, 0, 0)); - if (assembly == null) assembly = TryLoadVersionedAssembly(requestedAssembly, new Version(3, 0, 0, 0)); - if (assembly == null) assembly = TryLoadVersionedAssembly(requestedAssembly, new Version(1, 0, 0, 0)); + if (assembly == null) + { + assembly = TryLoadVersionedAssembly(requestedAssembly, new Version(3, 0, 0, 0)); + } + + if (assembly == null) + { + assembly = TryLoadVersionedAssembly(requestedAssembly, new Version(1, 0, 0, 0)); + } return assembly; }; @@ -572,7 +599,10 @@ private void AddAssemblyResolver() private System.Reflection.Assembly TryLoadVersionedAssembly(AssemblyName requestedAssembly, Version version) { - if (requestedAssembly == null) return null; + if (requestedAssembly == null) + { + return null; + } requestedAssembly.Version = version; @@ -587,7 +617,10 @@ private System.Reflection.Assembly TryLoadVersionedAssembly(AssemblyName request } catch (Exception ex) { - if (requestedAssembly.Name.EndsWith(".resources", StringComparison.OrdinalIgnoreCase)) return null; + if (requestedAssembly.Name.EndsWith(".resources", StringComparison.OrdinalIgnoreCase)) + { + return null; + } this.Log().Debug(ChocolateyLoggers.Verbose, "Attempting to load assembly {0} failed:{1} {2}".FormatWith(requestedAssembly.Name, Environment.NewLine, ex.Message.EscapeCurlyBraces())); @@ -611,7 +644,7 @@ public PowerShellExecutionResults RunHost(ChocolateyConfiguration config, string var result = new PowerShellExecutionResults(); - string commandToRun = WrapScriptWithModule(chocoPowerShellScript, hookPreScriptPathList, hookPostScriptPathList, config); + var commandToRun = WrapScriptWithModule(chocoPowerShellScript, hookPreScriptPathList, hookPostScriptPathList, config); var host = new PoshHost(config); this.Log().Debug(() => "Calling built-in PowerShell host with ['{0}']".FormatWith(commandToRun.EscapeCurlyBraces())); @@ -639,7 +672,7 @@ public PowerShellExecutionResults RunHost(ChocolateyConfiguration config, string // Write-Output pipeline.Output.DataReady += (sender, args) => { - PipelineReader reader = sender as PipelineReader; + var reader = sender as PipelineReader; if (reader != null) { @@ -653,7 +686,7 @@ public PowerShellExecutionResults RunHost(ChocolateyConfiguration config, string // Write-Error pipeline.Error.DataReady += (sender, args) => { - PipelineReader reader = sender as PipelineReader; + var reader = sender as PipelineReader; if (reader != null) { @@ -697,7 +730,10 @@ public PowerShellExecutionResults RunHost(ChocolateyConfiguration config, string "; pipeline.Commands.Add(new Command(outputRedirectionFixScript, isScript: true, useLocalScope: false)); - if (additionalActionsBeforeScript != null) additionalActionsBeforeScript.Invoke(pipeline); + if (additionalActionsBeforeScript != null) + { + additionalActionsBeforeScript.Invoke(pipeline); + } pipeline.Commands.Add(new Command(commandToRun, isScript: true, useLocalScope: false)); @@ -717,7 +753,10 @@ public PowerShellExecutionResults RunHost(ChocolateyConfiguration config, string if (scriptStackTrace != null) { var scriptError = scriptStackTrace.GetValue(record, null).ToStringSafe(); - if (!string.IsNullOrWhiteSpace(scriptError)) errorStackTrace = scriptError; + if (!string.IsNullOrWhiteSpace(scriptError)) + { + errorStackTrace = scriptError; + } } } this.Log().Error("ERROR: {0}{1}".FormatWith(ex.Message.EscapeCurlyBraces(), !config.Debug ? string.Empty : "{0} {1}".FormatWith(Environment.NewLine, errorStackTrace.EscapeCurlyBraces()))); @@ -739,12 +778,20 @@ public PowerShellExecutionResults RunHost(ChocolateyConfiguration config, string case PipelineState.Failed: case PipelineState.Stopping: case PipelineState.Stopped: - if (host.ExitCode == 0) host.SetShouldExit(1); + if (host.ExitCode == 0) + { + host.SetShouldExit(1); + } + host.HostException = pipeline.PipelineStateInfo.Reason; break; case PipelineState.Completed: - if (host.ExitCode == -1) host.SetShouldExit(0); + if (host.ExitCode == -1) + { + host.SetShouldExit(0); + } + break; } } @@ -759,7 +806,7 @@ public PowerShellExecutionResults RunHost(ChocolateyConfiguration config, string return result; } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public void noop_action(PackageResult packageResult, CommandNameType command) => DryRunAction(packageResult, command); @@ -803,6 +850,6 @@ public void prepare_powershell_environment(IPackageSearchMetadata package, Choco [Obsolete("This overload is deprecated and will be removed in v3.")] public PowerShellExecutionResults run_host(ChocolateyConfiguration config, string chocoPowerShellScript, Action additionalActionsBeforeScript, IEnumerable hookPreScriptPathList, IEnumerable hookPostScriptPathList) => RunHost(config, chocoPowerShellScript, additionalActionsBeforeScript, hookPreScriptPathList, hookPostScriptPathList); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/services/PythonService.cs b/src/chocolatey/infrastructure.app/services/PythonService.cs index 718bbccae3..c7acd3f1dd 100644 --- a/src/chocolatey/infrastructure.app/services/PythonService.cs +++ b/src/chocolatey/infrastructure.app/services/PythonService.cs @@ -14,23 +14,23 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text.RegularExpressions; +using Microsoft.Win32; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.domain; +using chocolatey.infrastructure.filesystem; +using chocolatey.infrastructure.commands; +using chocolatey.infrastructure.logging; +using chocolatey.infrastructure.results; +using chocolatey.infrastructure.platforms; + namespace chocolatey.infrastructure.app.services { - using System; - using System.Collections.Concurrent; - using System.Collections.Generic; - using System.IO; - using System.Linq; - using System.Text.RegularExpressions; - using Microsoft.Win32; - using configuration; - using domain; - using filesystem; - using infrastructure.commands; - using logging; - using results; - using platforms; - /// /// Alternative Source for Installing Python packages /// @@ -172,7 +172,10 @@ public string SourceType public void EnsureSourceAppInstalled(ChocolateyConfiguration config, Action ensureAction) { - if (Platform.GetPlatform() != PlatformType.Windows) throw new NotImplementedException("This source is not supported on non-Windows systems"); + if (Platform.GetPlatform() != PlatformType.Windows) + { + throw new NotImplementedException("This source is not supported on non-Windows systems"); + } //ensure at least python 2.7.9 is installed var python = _fileSystem.GetExecutablePath("python"); @@ -212,7 +215,10 @@ public void EnsureSourceAppInstalled(ChocolateyConfiguration config, Action argsDictionary) @@ -302,7 +314,11 @@ public IEnumerable List(ChocolateyConfiguration config) stdOutAction: (s, e) => { var logMessage = e.Data; - if (string.IsNullOrWhiteSpace(logMessage)) return; + if (string.IsNullOrWhiteSpace(logMessage)) + { + return; + } + if (!config.QuietOutput) { this.Log().Info(logMessage.EscapeCurlyBraces()); @@ -314,7 +330,11 @@ public IEnumerable List(ChocolateyConfiguration config) }, stdErrAction: (s, e) => { - if (string.IsNullOrWhiteSpace(e.Data)) return; + if (string.IsNullOrWhiteSpace(e.Data)) + { + return; + } + this.Log().Error(() => "{0}".FormatWith(e.Data.EscapeCurlyBraces())); }, updateProcessPath: false, @@ -338,6 +358,11 @@ public ConcurrentDictionary Install(ChocolateyConfigurati public ConcurrentDictionary Install(ChocolateyConfiguration config, Action continueAction, Action beforeModifyAction) { + if (config.PackageNames.IsEqualTo(ApplicationParameters.AllPackages)) + { + throw new NotImplementedException("Alternative sources do not allow the use of the 'all' package name/keyword."); + } + EnsureExecutablePathSet(); var args = BuildArguments(config, _installArguments); var packageResults = new ConcurrentDictionary(StringComparer.InvariantCultureIgnoreCase); @@ -359,7 +384,11 @@ public ConcurrentDictionary Install(ChocolateyConfigurati (s, e) => { var logMessage = e.Data; - if (string.IsNullOrWhiteSpace(logMessage)) return; + if (string.IsNullOrWhiteSpace(logMessage)) + { + return; + } + this.Log().Info(() => " [{0}] {1}".FormatWith(AppName, logMessage.EscapeCurlyBraces())); if (_errorRegex.IsMatch(logMessage) || _errorNotFoundRegex.IsMatch(logMessage)) @@ -379,7 +408,11 @@ public ConcurrentDictionary Install(ChocolateyConfigurati (s, e) => { var logMessage = e.Data; - if (string.IsNullOrWhiteSpace(logMessage)) return; + if (string.IsNullOrWhiteSpace(logMessage)) + { + return; + } + this.Log().Error("[{0}] {1}".FormatWith(AppName, logMessage.EscapeCurlyBraces())); if (_errorRegex.IsMatch(logMessage) || _errorNotFoundRegex.IsMatch(logMessage)) @@ -413,7 +446,7 @@ public ConcurrentDictionary Upgrade(ChocolateyConfigurati { if (config.PackageNames.IsEqualTo(ApplicationParameters.AllPackages)) { - throw new NotImplementedException("The all keyword is not available for alternate sources"); + throw new NotImplementedException("Alternative sources do not allow the use of the 'all' package name/keyword."); } EnsureExecutablePathSet(); @@ -438,7 +471,11 @@ public ConcurrentDictionary Upgrade(ChocolateyConfigurati (s, e) => { var logMessage = e.Data; - if (string.IsNullOrWhiteSpace(logMessage)) return; + if (string.IsNullOrWhiteSpace(logMessage)) + { + return; + } + this.Log().Info(() => " [{0}] {1}".FormatWith(AppName, logMessage.EscapeCurlyBraces())); if (_errorRegex.IsMatch(logMessage) || _errorNotFoundRegex.IsMatch(logMessage)) @@ -458,7 +495,11 @@ public ConcurrentDictionary Upgrade(ChocolateyConfigurati (s, e) => { var logMessage = e.Data; - if (string.IsNullOrWhiteSpace(logMessage)) return; + if (string.IsNullOrWhiteSpace(logMessage)) + { + return; + } + this.Log().Error("[{0}] {1}".FormatWith(AppName, logMessage.EscapeCurlyBraces())); if (_errorRegex.IsMatch(logMessage) || _errorNotFoundRegex.IsMatch(logMessage)) @@ -505,7 +546,11 @@ public ConcurrentDictionary Uninstall(ChocolateyConfigura (s, e) => { var logMessage = e.Data; - if (string.IsNullOrWhiteSpace(logMessage)) return; + if (string.IsNullOrWhiteSpace(logMessage)) + { + return; + } + this.Log().Info(() => " [{0}] {1}".FormatWith(AppName, logMessage.EscapeCurlyBraces())); if (_errorRegex.IsMatch(logMessage) || _errorNotFoundRegex.IsMatch(logMessage)) @@ -525,7 +570,11 @@ public ConcurrentDictionary Uninstall(ChocolateyConfigura (s, e) => { var logMessage = e.Data; - if (string.IsNullOrWhiteSpace(logMessage)) return; + if (string.IsNullOrWhiteSpace(logMessage)) + { + return; + } + this.Log().Error("[{0}] {1}".FormatWith(AppName, logMessage.EscapeCurlyBraces())); if (_errorRegex.IsMatch(logMessage) || _errorNotFoundRegex.IsMatch(logMessage)) @@ -565,7 +614,7 @@ private static string GetValueFromOutput(string output, Regex regex, string grou return string.Empty; } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public const string PYTHON_PACKAGE = PythonPackage; [Obsolete("This overload is deprecated and will be removed in v3.")] @@ -628,6 +677,6 @@ public void uninstall_noop(ChocolateyConfiguration config, Action uninstall_run(ChocolateyConfiguration config, Action continueAction, Action beforeUninstallAction = null) => Uninstall(config, continueAction, beforeUninstallAction); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/services/RegistryService.cs b/src/chocolatey/infrastructure.app/services/RegistryService.cs index 2a39ed966c..6d06f6f84e 100644 --- a/src/chocolatey/infrastructure.app/services/RegistryService.cs +++ b/src/chocolatey/infrastructure.app/services/RegistryService.cs @@ -14,23 +14,23 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Security.AccessControl; +using System.Security.Principal; +using System.Text; +using System.Text.RegularExpressions; +using Microsoft.Win32; +using chocolatey.infrastructure.app.domain; +using chocolatey.infrastructure.filesystem; +using chocolatey.infrastructure.services; +using chocolatey.infrastructure.tolerance; +using Registry = chocolatey.infrastructure.app.domain.Registry; + namespace chocolatey.infrastructure.app.services { - using System; - using System.Collections.Generic; - using System.Globalization; - using System.Linq; - using System.Security.AccessControl; - using System.Security.Principal; - using System.Text; - using System.Text.RegularExpressions; - using Microsoft.Win32; - using domain; - using filesystem; - using infrastructure.services; - using tolerance; - using Registry = domain.Registry; - /// /// Allows comparing registry /// @@ -64,14 +64,20 @@ private RegistryKey OpenKey(RegistryHive hive, RegistryView view) private void AddKey(IList keys, RegistryHive hive, RegistryView view) { var key = OpenKey(hive, view); - if (key != null) keys.Add(key); + if (key != null) + { + keys.Add(key); + } } public Registry GetInstallerKeys() { var snapshot = new Registry(); var windowsIdentity = WindowsIdentity.GetCurrent(); - if (windowsIdentity != null) snapshot.User = windowsIdentity.User.ToStringSafe(); + if (windowsIdentity != null) + { + snapshot.User = windowsIdentity.User.ToStringSafe(); + } IList keys = new List(); if (Environment.Is64BitOperatingSystem) @@ -92,7 +98,7 @@ public Registry GetInstallerKeys() if (uninstallKey != null) { - //Console.WriteLine("Evaluating {0} of {1}".format_with(uninstallKey.View, uninstallKey.Name)); + //Console.WriteLine("Evaluating {0} of {1}".FormatWith(uninstallKey.View, uninstallKey.Name)); UpdateSnapshot(uninstallKey, snapshot); } registryKey.Close(); @@ -120,7 +126,10 @@ public Registry GetInstallerKeys() /// The snapshot. public void UpdateSnapshot(RegistryKey key, Registry snapshot) { - if (key == null) return; + if (key == null) + { + return; + } FaultTolerance.TryCatchWithLoggingException( () => @@ -137,12 +146,12 @@ public void UpdateSnapshot(RegistryKey key, Registry snapshot) logWarningInsteadOfError: true); var appKey = new RegistryApplicationKey - { - KeyPath = key.Name, - RegistryView = key.View, - DefaultValue = key.AsXmlSafeString(""), - DisplayName = key.AsXmlSafeString("DisplayName") - }; + { + KeyPath = key.Name, + RegistryView = key.View, + DefaultValue = key.AsXmlSafeString(""), + DisplayName = key.AsXmlSafeString("DisplayName") + }; if (string.IsNullOrWhiteSpace(appKey.DisplayName)) { @@ -227,17 +236,17 @@ public void UpdateSnapshot(RegistryKey key, Registry snapshot) { //if (appKey.is_in_programs_and_features() && appKey.InstallerType == InstallerType.Unknown) //{ - foreach (var name in key.GetValueNames()) + foreach (var name in key.GetValueNames()) + { + //var kind = key.GetValueKind(name); + var value = key.AsXmlSafeString(name); + if (name.IsEqualTo("QuietUninstallString") || name.IsEqualTo("UninstallString")) { - //var kind = key.GetValueKind(name); - var value = key.AsXmlSafeString(name); - if (name.IsEqualTo("QuietUninstallString") || name.IsEqualTo("UninstallString")) - { - Console.WriteLine("key - {0}|{1}={2}|Type detected={3}|install location={4}".FormatWith(key.Name, name, value.ToStringSafe(), appKey.InstallerType.ToStringSafe(),appKey.InstallLocation.ToStringSafe())); - } - - //Console.WriteLine("key - {0}, name - {1}, kind - {2}, value - {3}".format_with(key.Name, name, kind, value.to_string())); + Console.WriteLine("key - {0}|{1}={2}|Type detected={3}|install location={4}".FormatWith(key.Name, name, value.ToStringSafe(), appKey.InstallerType.ToStringSafe(), appKey.InstallLocation.ToStringSafe())); } + + //Console.WriteLine("key - {0}, name - {1}, kind - {2}, value - {3}".FormatWith(key.Name, name, kind, value.to_string())); + } //} } @@ -251,7 +260,10 @@ public void UpdateSnapshot(RegistryKey key, Registry snapshot) private void GetMsiInformation(RegistryApplicationKey appKey, RegistryKey key) { var userDataProductKeyId = GetMsiUserDataKey(key.Name); - if (string.IsNullOrWhiteSpace(userDataProductKeyId)) return; + if (string.IsNullOrWhiteSpace(userDataProductKeyId)) + { + return; + } var hklm = OpenKey(RegistryHive.LocalMachine, RegistryView.Default); if (Environment.Is64BitOperatingSystem) @@ -263,7 +275,10 @@ private void GetMsiInformation(RegistryApplicationKey appKey, RegistryKey key) () => { var msiRegistryKey = hklm.OpenSubKey(UninstallerMsiMachineKeyName, RegistryKeyPermissionCheck.ReadSubTree, RegistryRights.ReadKey); - if (msiRegistryKey == null) return; + if (msiRegistryKey == null) + { + return; + } foreach (var subKeyName in msiRegistryKey.GetSubKeyNames()) { @@ -271,7 +286,10 @@ private void GetMsiInformation(RegistryApplicationKey appKey, RegistryKey key) () => msiRegistryKey.OpenSubKey("{0}\\Products\\{1}\\InstallProperties".FormatWith(subKeyName, userDataProductKeyId), RegistryKeyPermissionCheck.ReadSubTree, RegistryRights.ReadKey), "Failed to open subkey named '{0}' for '{1}', likely due to permissions".FormatWith(subKeyName, msiRegistryKey.Name), logWarningInsteadOfError: true); - if (msiProductKey == null) continue; + if (msiProductKey == null) + { + continue; + } appKey.InstallLocation = SetIfEmpty(appKey.InstallLocation, msiProductKey.AsXmlSafeString("InstallLocation")); // informational @@ -293,8 +311,8 @@ private void GetMsiInformation(RegistryApplicationKey appKey, RegistryKey key) //if (string.IsNullOrWhiteSpace(appKey.InstallLocation) && !appKey.Publisher.contains("Microsoft")) //{ // var msiComponentsKey = FaultTolerance.try_catch_with_logging_exception( - // () => msiRegistryKey.OpenSubKey("{0}\\Components".format_with(subKeyName), RegistryKeyPermissionCheck.ReadSubTree, RegistryRights.ReadKey), - // "Failed to open subkey named '{0}' for '{1}', likely due to permissions".format_with(subKeyName, msiRegistryKey.Name), + // () => msiRegistryKey.OpenSubKey("{0}\\Components".FormatWith(subKeyName), RegistryKeyPermissionCheck.ReadSubTree, RegistryRights.ReadKey), + // "Failed to open subkey named '{0}' for '{1}', likely due to permissions".FormatWith(subKeyName, msiRegistryKey.Name), // logWarningInsteadOfError: true); // if (msiComponentsKey == null) continue; @@ -302,7 +320,7 @@ private void GetMsiInformation(RegistryApplicationKey appKey, RegistryKey key) // { // var msiComponentKey = FaultTolerance.try_catch_with_logging_exception( // () => msiComponentsKey.OpenSubKey(msiComponentKeyName, RegistryKeyPermissionCheck.ReadSubTree, RegistryRights.ReadKey), - // "Failed to open subkey named '{0}' for '{1}', likely due to permissions".format_with(subKeyName, msiRegistryKey.Name), + // "Failed to open subkey named '{0}' for '{1}', likely due to permissions".FormatWith(subKeyName, msiRegistryKey.Name), // logWarningInsteadOfError: true); // if (msiComponentKey.GetValueNames().Contains(userDataProductKeyId, StringComparer.OrdinalIgnoreCase)) @@ -322,7 +340,10 @@ private void GetMsiInformation(RegistryApplicationKey appKey, RegistryKey key) private string SetIfEmpty(string current, string proposed) { - if (string.IsNullOrWhiteSpace(current)) return proposed; + if (string.IsNullOrWhiteSpace(current)) + { + return proposed; + } return current; } @@ -335,9 +356,12 @@ private string GetMsiUserDataKey(string name) { _userDataKey.Clear(); var match = _guidRegex.Match(name); - if (!match.Success) return string.Empty; + if (!match.Success) + { + return string.Empty; + } - for (int i = 0; i < 3; i++) + for (var i = 0; i < 3; i++) { var fullGroup = match.Groups["ReverseFull{0}".FormatWith(i + 1)]; if (fullGroup != null) @@ -345,13 +369,13 @@ private string GetMsiUserDataKey(string name) _userDataKey.Append(fullGroup.Value.ToCharArray().Reverse().ToArray()); } } - for (int i = 0; i < 2; i++) + for (var i = 0; i < 2; i++) { var pairsGroup = match.Groups["ReversePairs{0}".FormatWith(i + 1)]; if (pairsGroup != null) { var pairValue = pairsGroup.Value; - for (int j = 0; j < pairValue.Length - 1; j++) + for (var j = 0; j < pairValue.Length - 1; j++) { _userDataKey.Append("{1}{0}".FormatWith(pairValue[j], pairValue[j + 1])); j++; @@ -508,7 +532,10 @@ public static GenericRegistryValue GetRegistryValue(RegistryHiveType hive, strin "Could not get registry value '{0}' from key '{1}'".FormatWith(registryValue, key.Name), logWarningInsteadOfError: true); - if (value != null) break; + if (value != null) + { + break; + } } } } @@ -516,7 +543,7 @@ public static GenericRegistryValue GetRegistryValue(RegistryHiveType hive, strin return value; } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public Registry get_installer_keys() => GetInstallerKeys(); @@ -560,6 +587,6 @@ public RegistryKey get_key(RegistryHive hive, string subKeyPath) [Obsolete("This overload is deprecated and will be removed in v3.")] public static GenericRegistryValue get_value(RegistryHiveType hive, string subKeyPath, string registryValue) => GetRegistryValue(hive, subKeyPath, registryValue); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/services/RubyGemsService.cs b/src/chocolatey/infrastructure.app/services/RubyGemsService.cs index 6ffb618ef9..16d8354165 100644 --- a/src/chocolatey/infrastructure.app/services/RubyGemsService.cs +++ b/src/chocolatey/infrastructure.app/services/RubyGemsService.cs @@ -14,20 +14,20 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Linq; +using System.Text.RegularExpressions; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.domain; +using chocolatey.infrastructure.commands; +using chocolatey.infrastructure.logging; +using chocolatey.infrastructure.results; +using chocolatey.infrastructure.platforms; + namespace chocolatey.infrastructure.app.services { - using System; - using System.Collections.Concurrent; - using System.Collections.Generic; - using System.Linq; - using System.Text.RegularExpressions; - using configuration; - using domain; - using infrastructure.commands; - using logging; - using results; - using platforms; - public sealed class RubyGemsService : IBootstrappableSourceRunner, IListSourceRunner, IInstallSourceRunner { private readonly ICommandExecutor _commandExecutor; @@ -116,7 +116,10 @@ public string SourceType public void EnsureSourceAppInstalled(ChocolateyConfiguration config, Action ensureAction) { - if (Platform.GetPlatform() != PlatformType.Windows) throw new NotImplementedException("This source is not supported on non-Windows systems"); + if (Platform.GetPlatform() != PlatformType.Windows) + { + throw new NotImplementedException("This source is not supported on non-Windows systems"); + } var runnerConfig = new ChocolateyConfiguration { @@ -165,7 +168,11 @@ public IEnumerable List(ChocolateyConfiguration config) stdOutAction: (s, e) => { var logMessage = e.Data; - if (string.IsNullOrWhiteSpace(logMessage)) return; + if (string.IsNullOrWhiteSpace(logMessage)) + { + return; + } + if (!config.QuietOutput) { this.Log().Info(logMessage.EscapeCurlyBraces()); @@ -177,7 +184,11 @@ public IEnumerable List(ChocolateyConfiguration config) }, stdErrAction: (s, e) => { - if (string.IsNullOrWhiteSpace(e.Data)) return; + if (string.IsNullOrWhiteSpace(e.Data)) + { + return; + } + this.Log().Error(() => "{0}".FormatWith(e.Data.EscapeCurlyBraces())); }, updateProcessPath: false @@ -200,6 +211,11 @@ public ConcurrentDictionary Install(ChocolateyConfigurati public ConcurrentDictionary Install(ChocolateyConfiguration config, Action continueAction, Action beforeModifyAction) { + if (config.PackageNames.IsEqualTo(ApplicationParameters.AllPackages)) + { + throw new NotImplementedException("Alternative sources do not allow the use of the 'all' package name/keyword."); + } + var packageResults = new ConcurrentDictionary(StringComparer.InvariantCultureIgnoreCase); var args = ExternalCommandArgsBuilder.BuildArguments(config, _installArguments); @@ -213,7 +229,11 @@ public ConcurrentDictionary Install(ChocolateyConfigurati (s, e) => { var logMessage = e.Data; - if (string.IsNullOrWhiteSpace(logMessage)) return; + if (string.IsNullOrWhiteSpace(logMessage)) + { + return; + } + this.Log().Info(() => " [{0}] {1}".FormatWith(AppName, logMessage.EscapeCurlyBraces())); if (_installingRegex.IsMatch(logMessage)) @@ -238,7 +258,11 @@ public ConcurrentDictionary Install(ChocolateyConfigurati (s, e) => { var logMessage = e.Data; - if (string.IsNullOrWhiteSpace(logMessage)) return; + if (string.IsNullOrWhiteSpace(logMessage)) + { + return; + } + this.Log().Error("[{0}] {1}".FormatWith(AppName, logMessage.EscapeCurlyBraces())); var packageName = GetValueFromOutput(logMessage, _packageNameErrorRegex, PackageNameGroup); @@ -279,7 +303,7 @@ private static string GetValueFromOutput(string output, Regex regex, string grou return string.Empty; } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public const string RUBY_PORTABLE_PACKAGE = "ruby.portable"; [Obsolete("This overload is deprecated and will be removed in v3.")] @@ -322,6 +346,6 @@ public ConcurrentDictionary install_run(ChocolateyConfigu [Obsolete("This overload is deprecated and will be removed in v3.")] public ConcurrentDictionary install_run(ChocolateyConfiguration config, Action continueAction, Action beforeModifyAction) => Install(config, continueAction, beforeModifyAction); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/services/RuleService.cs b/src/chocolatey/infrastructure.app/services/RuleService.cs index a0ab53dc55..f919f411a8 100644 --- a/src/chocolatey/infrastructure.app/services/RuleService.cs +++ b/src/chocolatey/infrastructure.app/services/RuleService.cs @@ -13,19 +13,19 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using chocolatey.infrastructure.guards; +using chocolatey.infrastructure.rules; +using chocolatey.infrastructure.services; +using NuGet.Configuration; +using NuGet.Packaging; + namespace chocolatey.infrastructure.app.services { - using System; - using System.Collections.Generic; - using System.Linq; - using System.Threading; - using System.Threading.Tasks; - using chocolatey.infrastructure.guards; - using chocolatey.infrastructure.rules; - using chocolatey.infrastructure.services; - using NuGet.Configuration; - using NuGet.Packaging; - public class RuleService : IRuleService { private readonly IMetadataRule[] _rules; @@ -94,11 +94,11 @@ private static IEnumerable ValidateNuspec(NuspecReader reader, IMeta } } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public IEnumerable validate_rules(string filePath) => ValidateRules(filePath); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 private class RuleIdEqualityComparer : IEqualityComparer { diff --git a/src/chocolatey/infrastructure.app/services/ShimGenerationService.cs b/src/chocolatey/infrastructure.app/services/ShimGenerationService.cs index 0ebcc58130..eb24b886a2 100644 --- a/src/chocolatey/infrastructure.app/services/ShimGenerationService.cs +++ b/src/chocolatey/infrastructure.app/services/ShimGenerationService.cs @@ -14,16 +14,16 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.IO; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.filesystem; +using chocolatey.infrastructure.commands; +using chocolatey.infrastructure.results; + namespace chocolatey.infrastructure.app.services { - using System; - using System.Collections.Generic; - using System.IO; - using configuration; - using filesystem; - using infrastructure.commands; - using results; - public class ShimGenerationService : IShimGenerationService { private readonly IFileSystem _fileSystem; @@ -48,28 +48,28 @@ public ShimGenerationService(IFileSystem fileSystem, ICommandExecutor commandExe private void SetupShimgenArgsDictionary() { _shimGenArguments.Add("_file_path_", new ExternalCommandArgument - { - ArgumentOption = "--path=", - ArgumentValue = PathToken, - QuoteValue = true, - Required = true - }); + { + ArgumentOption = "--path=", + ArgumentValue = PathToken, + QuoteValue = true, + Required = true + }); _shimGenArguments.Add("_output_directory_", new ExternalCommandArgument - { - ArgumentOption = "--output=", - ArgumentValue = OutputToken, - QuoteValue = true, - Required = true - }); + { + ArgumentOption = "--output=", + ArgumentValue = OutputToken, + QuoteValue = true, + Required = true + }); _shimGenArguments.Add("_icon_path_", new ExternalCommandArgument - { - ArgumentOption = " --iconpath=", - ArgumentValue = IconPathToken, - QuoteValue = true, - Required = true - }); + { + ArgumentOption = " --iconpath=", + ArgumentValue = IconPathToken, + QuoteValue = true, + Required = true + }); //_shimGenArguments.Add("_gui_", new ExternalCommandArgument { ArgumentOption = "--gui", Required = false }); } @@ -89,10 +89,14 @@ public void Install(ChocolateyConfiguration configuration, PackageResult package //gather all .exes in the folder var exeFiles = _fileSystem.GetFiles(packageResult.InstallLocation, pattern: "*.exe", option: SearchOption.AllDirectories); - foreach (string file in exeFiles.OrEmpty()) + foreach (var file in exeFiles.OrEmpty()) { - if (_fileSystem.FileExists(file + ".ignore")) continue; - bool isGui = _fileSystem.FileExists(file + ".gui"); + if (_fileSystem.FileExists(file + ".ignore")) + { + continue; + } + + var isGui = _fileSystem.FileExists(file + ".gui"); //todo: #2586 v2 be able to determine gui automatically var args = ExternalCommandArgsBuilder.BuildArguments(configuration, _shimGenArguments); @@ -107,12 +111,20 @@ public void Install(ChocolateyConfiguration configuration, PackageResult package _shimGenExePath, argsForPackage, configuration.CommandExecutionTimeoutSeconds, (s, e) => { - if (string.IsNullOrWhiteSpace(e.Data)) return; + if (string.IsNullOrWhiteSpace(e.Data)) + { + return; + } + this.Log().Debug(() => " [ShimGen] {0}".FormatWith(e.Data.EscapeCurlyBraces())); }, (s, e) => { - if (string.IsNullOrWhiteSpace(e.Data)) return; + if (string.IsNullOrWhiteSpace(e.Data)) + { + return; + } + this.Log().Error(() => " [ShimGen] {0}".FormatWith(e.Data.EscapeCurlyBraces())); }, updateProcessPath: true @@ -134,9 +146,12 @@ public void Uninstall(ChocolateyConfiguration configuration, PackageResult packa { //gather all .exes in the folder var exeFiles = _fileSystem.GetFiles(packageResult.InstallLocation, pattern: "*.exe", option: SearchOption.AllDirectories); - foreach (string file in exeFiles.OrEmpty()) + foreach (var file in exeFiles.OrEmpty()) { - if (_fileSystem.FileExists(file + ".ignore")) continue; + if (_fileSystem.FileExists(file + ".ignore")) + { + continue; + } var shimLocation = _fileSystem.CombinePaths(ApplicationParameters.ShimsLocation, _fileSystem.GetFileName(file)); this.Log().Debug(() => "Removing shim for {0} at '{1}".FormatWith(_fileSystem.GetFileName(file), shimLocation)); @@ -144,7 +159,7 @@ public void Uninstall(ChocolateyConfiguration configuration, PackageResult packa } } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public void install(ChocolateyConfiguration configuration, PackageResult packageResult) => Install(configuration, packageResult); @@ -152,6 +167,6 @@ public void install(ChocolateyConfiguration configuration, PackageResult package [Obsolete("This overload is deprecated and will be removed in v3.")] public void uninstall(ChocolateyConfiguration configuration, PackageResult packageResult) => Uninstall(configuration, packageResult); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/services/TemplateService.cs b/src/chocolatey/infrastructure.app/services/TemplateService.cs index f1f103a276..02df52e85e 100644 --- a/src/chocolatey/infrastructure.app/services/TemplateService.cs +++ b/src/chocolatey/infrastructure.app/services/TemplateService.cs @@ -14,23 +14,23 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Text; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.services; +using chocolatey.infrastructure.logging; +using chocolatey.infrastructure.app.templates; +using chocolatey.infrastructure.tokens; +using chocolatey.infrastructure.app.nuget; +using NuGet.Common; +using IFileSystem = chocolatey.infrastructure.filesystem.IFileSystem; + namespace chocolatey.infrastructure.app.services { - using System; - using System.Collections.Generic; - using System.IO; - using System.Linq; - using System.Reflection; - using System.Text; - using configuration; - using infrastructure.services; - using logging; - using templates; - using tokens; - using nuget; - using NuGet.Common; - using IFileSystem = filesystem.IFileSystem; - public class TemplateService : ITemplateService { private readonly UTF8Encoding _utf8WithoutBOM = new UTF8Encoding(false); @@ -65,7 +65,10 @@ public void GenerateDryRun(ChocolateyConfiguration configuration) public void Generate(ChocolateyConfiguration configuration) { var logger = ChocolateyLoggers.Normal; - if (configuration.QuietOutput) logger = ChocolateyLoggers.LogFileOnly; + if (configuration.QuietOutput) + { + logger = ChocolateyLoggers.LogFileOnly; + } var packageLocation = _fileSystem.CombinePaths(configuration.OutputDirectory ?? _fileSystem.GetCurrentDirectory(), configuration.NewCommand.Name); if (_fileSystem.DirectoryExists(packageLocation) && !configuration.Force) @@ -74,21 +77,31 @@ public void Generate(ChocolateyConfiguration configuration) "The location for the template already exists. You can:{0} 1. Remove '{1}'{0} 2. Use --force{0} 3. Specify a different name".FormatWith(Environment.NewLine, packageLocation)); } - if (configuration.RegularOutput) this.Log().Info(logger, () => "Creating a new package specification at {0}".FormatWith(packageLocation)); + if (configuration.RegularOutput) + { + this.Log().Info(logger, () => "Creating a new package specification at {0}".FormatWith(packageLocation)); + } + try { _fileSystem.DeleteDirectoryChecked(packageLocation, recursive: true); } catch (Exception ex) { - if (configuration.RegularOutput) this.Log().Warn(() => "{0}".FormatWith(ex.Message)); + if (configuration.RegularOutput) + { + this.Log().Warn(() => "{0}".FormatWith(ex.Message)); + } } _fileSystem.EnsureDirectoryExists(packageLocation); var packageToolsLocation = _fileSystem.CombinePaths(packageLocation, "tools"); _fileSystem.EnsureDirectoryExists(packageToolsLocation); var tokens = new TemplateValues(); - if (configuration.NewCommand.AutomaticPackage) tokens.SetAutomatic(); + if (configuration.NewCommand.AutomaticPackage) + { + tokens.SetAutomatic(); + } // now override those values foreach (var property in configuration.NewCommand.TemplateProperties) @@ -100,7 +113,11 @@ public void Generate(ChocolateyConfiguration configuration) } catch (Exception) { - if (configuration.RegularOutput) this.Log().Debug("Property {0} will be added to additional properties.".FormatWith(property.Key)); + if (configuration.RegularOutput) + { + this.Log().Debug("Property {0} will be added to additional properties.".FormatWith(property.Key)); + } + tokens.AdditionalProperties.Add(property.Key, property.Value); } } @@ -154,7 +171,10 @@ public void Generate(ChocolateyConfiguration configuration) var templatePath = _fileSystem.CombinePaths(ApplicationParameters.TemplatesLocation, configuration.NewCommand.TemplateName); var templateParameterCachePath = _fileSystem.CombinePaths(templatePath, _templateParameterCacheFilename); - if (!_fileSystem.DirectoryExists(templatePath)) throw new ApplicationException("Unable to find path to requested template '{0}'. Path should be '{1}'".FormatWith(configuration.NewCommand.TemplateName, templatePath)); + if (!_fileSystem.DirectoryExists(templatePath)) + { + throw new ApplicationException("Unable to find path to requested template '{0}'. Path should be '{1}'".FormatWith(configuration.NewCommand.TemplateName, templatePath)); + } this.Log().Info(configuration.QuietOutput ? logger : ChocolateyLoggers.Important, "Generating package from custom template at '{0}'.".FormatWith(templatePath)); @@ -178,7 +198,7 @@ public void Generate(ChocolateyConfiguration configuration) else if (_templateBinaryExtensions.Contains(fileExtension)) { this.Log().Debug(" Treating template file ('{0}') as binary instead of replacing templated values.".FormatWith(_fileSystem.GetFileName(file))); - _fileSystem.CopyFile(file, packageFileLocation, overwriteExisting:true); + _fileSystem.CopyFile(file, packageFileLocation, overwriteExisting: true); } else if (templateParameterCachePath.IsEqualTo(file)) { @@ -201,7 +221,11 @@ public void GenerateFileFromTemplate(ChocolateyConfiguration configuration, Temp template = TokenReplacer.ReplaceTokens(tokens, template); template = TokenReplacer.ReplaceTokens(tokens.AdditionalProperties, template); - if (configuration.RegularOutput) this.Log().Info(() => "Generating template to a file{0} at '{1}'".FormatWith(Environment.NewLine, fileLocation)); + if (configuration.RegularOutput) + { + this.Log().Info(() => "Generating template to a file{0} at '{1}'".FormatWith(Environment.NewLine, fileLocation)); + } + this.Log().Debug(() => "{0}".FormatWith(template)); _fileSystem.EnsureDirectoryExists(_fileSystem.GetDirectoryName(fileLocation)); _fileSystem.WriteFile(fileLocation, template, encoding); @@ -408,7 +432,7 @@ protected HashSet GetTemplateParametersFromFiles(ChocolateyConfiguration return parametersList; } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public void generate_noop(ChocolateyConfiguration configuration) => GenerateDryRun(configuration); @@ -444,6 +468,6 @@ protected IEnumerable get_template_parameters(ChocolateyConfiguration co [Obsolete("This overload is deprecated and will be removed in v3.")] protected HashSet get_template_parameters_from_files(ChocolateyConfiguration configuration) => GetTemplateParametersFromFiles(configuration); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/services/WindowsFeatureService.cs b/src/chocolatey/infrastructure.app/services/WindowsFeatureService.cs index 3c44a8d8d2..1c3b660d4a 100644 --- a/src/chocolatey/infrastructure.app/services/WindowsFeatureService.cs +++ b/src/chocolatey/infrastructure.app/services/WindowsFeatureService.cs @@ -14,21 +14,21 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.IO; +using System.Text.RegularExpressions; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.domain; +using chocolatey.infrastructure.filesystem; +using chocolatey.infrastructure.commands; +using chocolatey.infrastructure.logging; +using chocolatey.infrastructure.results; +using chocolatey.infrastructure.platforms; + namespace chocolatey.infrastructure.app.services { - using System; - using System.Collections.Concurrent; - using System.Collections.Generic; - using System.IO; - using System.Text.RegularExpressions; - using configuration; - using domain; - using filesystem; - using infrastructure.commands; - using logging; - using results; - using platforms; - /// /// Alternative Source for Enabling Windows Features /// @@ -158,14 +158,20 @@ public string SourceType public void EnsureSourceAppInstalled(ChocolateyConfiguration config, Action ensureAction) { - if (Platform.GetPlatform() != PlatformType.Windows) throw new NotImplementedException("This source is not supported on non-Windows systems"); + if (Platform.GetPlatform() != PlatformType.Windows) + { + throw new NotImplementedException("This source is not supported on non-Windows systems"); + } EnsureExecutablePathSet(); } private void EnsureExecutablePathSet() { - if (!string.IsNullOrWhiteSpace(_exePath)) return; + if (!string.IsNullOrWhiteSpace(_exePath)) + { + return; + } foreach (var location in _exeLocations) { @@ -176,7 +182,10 @@ private void EnsureExecutablePathSet() } } - if (string.IsNullOrWhiteSpace(_exePath)) throw new FileNotFoundException("Unable to find suitable location for the executable. Searched the following locations: '{0}'".FormatWith(string.Join("; ", _exeLocations))); + if (string.IsNullOrWhiteSpace(_exePath)) + { + throw new FileNotFoundException("Unable to find suitable location for the executable. Searched the following locations: '{0}'".FormatWith(string.Join("; ", _exeLocations))); + } } public void ListDryRun(ChocolateyConfiguration config) @@ -200,7 +209,11 @@ public IEnumerable List(ChocolateyConfiguration config) stdOutAction: (s, e) => { var logMessage = e.Data; - if (string.IsNullOrWhiteSpace(logMessage)) return; + if (string.IsNullOrWhiteSpace(logMessage)) + { + return; + } + if (!config.QuietOutput) { this.Log().Info(logMessage.EscapeCurlyBraces()); @@ -212,7 +225,11 @@ public IEnumerable List(ChocolateyConfiguration config) }, stdErrAction: (s, e) => { - if (string.IsNullOrWhiteSpace(e.Data)) return; + if (string.IsNullOrWhiteSpace(e.Data)) + { + return; + } + this.Log().Error(() => "{0}".FormatWith(e.Data.EscapeCurlyBraces())); }, updateProcessPath: false, @@ -270,6 +287,11 @@ public ConcurrentDictionary Install(ChocolateyConfigurati public ConcurrentDictionary Install(ChocolateyConfiguration config, Action continueAction, Action beforeModifyAction) { + if (config.PackageNames.IsEqualTo(ApplicationParameters.AllPackages)) + { + throw new NotImplementedException("Alternative sources do not allow the use of the 'all' package name/keyword."); + } + EnsureExecutablePathSet(); var args = BuildArguments(config, _installArguments); var packageResults = new ConcurrentDictionary(StringComparer.InvariantCultureIgnoreCase); @@ -297,7 +319,11 @@ public ConcurrentDictionary Install(ChocolateyConfigurati (s, e) => { var logMessage = e.Data; - if (string.IsNullOrWhiteSpace(logMessage)) return; + if (string.IsNullOrWhiteSpace(logMessage)) + { + return; + } + this.Log().Info(() => " [{0}] {1}".FormatWith(AppName, logMessage.EscapeCurlyBraces())); if (_errorRegex.IsMatch(logMessage) || _errorNotFoundRegex.IsMatch(logMessage)) @@ -314,7 +340,11 @@ public ConcurrentDictionary Install(ChocolateyConfigurati (s, e) => { var logMessage = e.Data; - if (string.IsNullOrWhiteSpace(logMessage)) return; + if (string.IsNullOrWhiteSpace(logMessage)) + { + return; + } + this.Log().Error("[{0}] {1}".FormatWith(AppName, logMessage.EscapeCurlyBraces())); results.Messages.Add(new ResultMessage(ResultType.Error, logMessage)); @@ -368,7 +398,11 @@ public ConcurrentDictionary Uninstall(ChocolateyConfigura (s, e) => { var logMessage = e.Data; - if (string.IsNullOrWhiteSpace(logMessage)) return; + if (string.IsNullOrWhiteSpace(logMessage)) + { + return; + } + this.Log().Info(() => " [{0}] {1}".FormatWith(AppName, logMessage.EscapeCurlyBraces())); if (_errorRegex.IsMatch(logMessage) || _errorNotFoundRegex.IsMatch(logMessage)) @@ -385,7 +419,11 @@ public ConcurrentDictionary Uninstall(ChocolateyConfigura (s, e) => { var logMessage = e.Data; - if (string.IsNullOrWhiteSpace(logMessage)) return; + if (string.IsNullOrWhiteSpace(logMessage)) + { + return; + } + this.Log().Error("[{0}] {1}".FormatWith(AppName, logMessage.EscapeCurlyBraces())); results.Messages.Add(new ResultMessage(ResultType.Error, logMessage)); @@ -403,7 +441,7 @@ public ConcurrentDictionary Uninstall(ChocolateyConfigura return packageResults; } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public const string PACKAGE_NAME_GROUP = PackageNameGroup; [Obsolete("This overload is deprecated and will be removed in v3.")] @@ -452,6 +490,6 @@ public void uninstall_noop(ChocolateyConfiguration config, Action uninstall_run(ChocolateyConfiguration config, Action continueAction, Action beforeUninstallAction = null) => Uninstall(config, continueAction, beforeUninstallAction); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/tasks/RemovePendingPackagesTask.cs b/src/chocolatey/infrastructure.app/tasks/RemovePendingPackagesTask.cs index 9200b4c2e2..4e2444e565 100644 --- a/src/chocolatey/infrastructure.app/tasks/RemovePendingPackagesTask.cs +++ b/src/chocolatey/infrastructure.app/tasks/RemovePendingPackagesTask.cs @@ -14,19 +14,19 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.IO; +using System.Linq; +using chocolatey.infrastructure.app.events; +using chocolatey.infrastructure.filesystem; +using chocolatey.infrastructure.events; +using chocolatey.infrastructure.services; +using chocolatey.infrastructure.tasks; +using chocolatey.infrastructure.logging; +using chocolatey.infrastructure.tolerance; + namespace chocolatey.infrastructure.app.tasks { - using System; - using System.IO; - using System.Linq; - using events; - using filesystem; - using infrastructure.events; - using infrastructure.services; - using infrastructure.tasks; - using logging; - using tolerance; - public class RemovePendingPackagesTask : ITask { private readonly IFileSystem _fileSystem; @@ -53,7 +53,10 @@ public void Initialize() public void Shutdown() { - if (_subscription != null) _subscription.Dispose(); + if (_subscription != null) + { + _subscription.Dispose(); + } } private void HandleMessage(PreRunMessage message) @@ -100,7 +103,7 @@ private void HandleMessage(PreRunMessage message) } } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public void initialize() => Initialize(); @@ -108,6 +111,6 @@ public void initialize() [Obsolete("This overload is deprecated and will be removed in v3.")] public void shutdown() => Shutdown(); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/templates/TemplateValues.cs b/src/chocolatey/infrastructure.app/templates/TemplateValues.cs index 72054a07d4..10f0a3c94d 100644 --- a/src/chocolatey/infrastructure.app/templates/TemplateValues.cs +++ b/src/chocolatey/infrastructure.app/templates/TemplateValues.cs @@ -14,11 +14,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; + namespace chocolatey.infrastructure.app.templates { - using System; - using System.Collections.Generic; - public class TemplateValues { public TemplateValues() @@ -85,7 +85,7 @@ public string PackageNameLower public static readonly string VersionPropertyName = "PackageVersion"; public static readonly string MaintainerPropertyName = "MaintainerName"; -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public void set_normal() => SetNormal(); @@ -93,6 +93,6 @@ public void set_normal() [Obsolete("This overload is deprecated and will be removed in v3.")] public void set_auto() => SetAutomatic(); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/utility/ArgumentsUtility.cs b/src/chocolatey/infrastructure.app/utility/ArgumentsUtility.cs index e11df001ed..99ea0a5d75 100644 --- a/src/chocolatey/infrastructure.app/utility/ArgumentsUtility.cs +++ b/src/chocolatey/infrastructure.app/utility/ArgumentsUtility.cs @@ -14,10 +14,13 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using chocolatey.infrastructure.app.nuget; +using chocolatey.infrastructure.filesystem; + namespace chocolatey.infrastructure.app.utility { - using System; - //todo: #2560 maybe find a better name/location for this public static class ArgumentsUtility @@ -50,10 +53,76 @@ public static bool SensitiveArgumentsProvided(string commandArguments) ; } -#pragma warning disable IDE1006 + public static IEnumerable DecryptPackageArgumentsFile(IFileSystem fileSystem, string id, string version) + { + var argumentsPath = fileSystem.CombinePaths(ApplicationParameters.InstallLocation, ".chocolatey", "{0}.{1}".FormatWith(id, version)); + var argumentsFile = fileSystem.CombinePaths(argumentsPath, ".arguments"); + + var arguments = string.Empty; + + // Get the arguments decrypted in here and return them + try + { + if (fileSystem.FileExists(argumentsFile)) + { + arguments = fileSystem.ReadFile(argumentsFile); + } + } + catch (Exception) + { + "chocolatey".Log().Error("There was an error attempting to read the contents of the .arguments file for version '{0}' of package '{1}'. See log file for more information.".FormatWith(version, id)); + } + + if (string.IsNullOrEmpty(arguments)) + { + "chocolatey".Log().Debug("Unable to locate .arguments file for version '{0}' of package '{1}'.".FormatWith(version, id)); + yield break; + } + + // The following code is borrowed from the Chocolatey codebase, should + // be extracted to a separate location in choco executable so we can re-use it. + var packageArgumentsUnencrypted = arguments.Contains(" --") && arguments.ToStringSafe().Length > 4 + ? arguments + : NugetEncryptionUtility.DecryptString(arguments); + + // Lets do a global check first to see if there are any sensitive arguments + // before we filter out the values used later. + var sensitiveArgs = SensitiveArgumentsProvided(packageArgumentsUnencrypted); + + var packageArgumentsSplit = + packageArgumentsUnencrypted.Split(new[] { " --" }, StringSplitOptions.RemoveEmptyEntries); + + foreach (var packageArgument in packageArgumentsSplit.OrEmpty()) + { + var isSensitiveArgument = sensitiveArgs && SensitiveArgumentsProvided(string.Concat("--", packageArgument)); + + var packageArgumentSplit = + packageArgument.Split(new[] { '=' }, 2, StringSplitOptions.RemoveEmptyEntries); + + var optionName = packageArgumentSplit[0].ToStringSafe(); + var optionValue = string.Empty; + + if (packageArgumentSplit.Length == 2 && isSensitiveArgument) + { + optionValue = "[REDACTED ARGUMENT]"; + } + else if (packageArgumentSplit.Length == 2) + { + optionValue = packageArgumentSplit[1].ToStringSafe().UnquoteSafe(); + if (optionValue.StartsWith("'")) + { + optionValue.UnquoteSafe(); + } + } + + yield return "--{0}{1}".FormatWith(optionName, string.IsNullOrWhiteSpace(optionValue) ? string.Empty : "=" + optionValue); + } + } + +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public static bool arguments_contain_sensitive_information(string commandArguments) => SensitiveArgumentsProvided(commandArguments); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/utility/PackageUtility.cs b/src/chocolatey/infrastructure.app/utility/PackageUtility.cs index 78b52f0425..2dbee3473e 100644 --- a/src/chocolatey/infrastructure.app/utility/PackageUtility.cs +++ b/src/chocolatey/infrastructure.app/utility/PackageUtility.cs @@ -13,12 +13,12 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +using System; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.platforms; + namespace chocolatey.infrastructure.app.utility { - using System; - using configuration; - using platforms; - public class PackageUtility { /// @@ -30,8 +30,15 @@ public class PackageUtility /// true if the package is a dependency, false if the package is the one specified or a virtual/semi-virtual public static bool PackageIdHasDependencySuffix(ChocolateyConfiguration config, string packageName) { - if (string.IsNullOrWhiteSpace(config.PackageNames)) return true; - if (string.IsNullOrWhiteSpace(packageName)) return true; + if (string.IsNullOrWhiteSpace(config.PackageNames)) + { + return true; + } + + if (string.IsNullOrWhiteSpace(packageName)) + { + return true; + } foreach (var package in config.PackageNames.Split(new[] { ApplicationParameters.PackageNamesSeparator }, StringSplitOptions.RemoveEmptyEntries).OrEmpty()) { @@ -52,10 +59,10 @@ public static bool PackageIdHasDependencySuffix(ChocolateyConfiguration config, return true; } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public static bool package_is_a_dependency(ChocolateyConfiguration config, string packageName) => PackageIdHasDependencySuffix(config, packageName); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/validations/CacheFolderValidationLockdown.cs b/src/chocolatey/infrastructure.app/validations/CacheFolderValidationLockdown.cs index 17cf157a6b..5bb36aeaf1 100644 --- a/src/chocolatey/infrastructure.app/validations/CacheFolderValidationLockdown.cs +++ b/src/chocolatey/infrastructure.app/validations/CacheFolderValidationLockdown.cs @@ -14,15 +14,15 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.filesystem; +using chocolatey.infrastructure.information; +using chocolatey.infrastructure.validations; + namespace chocolatey.infrastructure.app.validations { - using System; - using System.Collections.Generic; - using chocolatey.infrastructure.app.configuration; - using chocolatey.infrastructure.filesystem; - using chocolatey.infrastructure.information; - using chocolatey.infrastructure.validations; - public sealed class CacheFolderLockdownValidation : IValidation { private readonly IFileSystem _fileSystem; @@ -114,7 +114,7 @@ public ICollection Validate(ChocolateyConfiguration config) return result; } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public ICollection validate(ChocolateyConfiguration config) @@ -122,6 +122,6 @@ public ICollection validate(ChocolateyConfiguration config) return Validate(config); } -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } \ No newline at end of file diff --git a/src/chocolatey/infrastructure.app/validations/GlobalConfigurationValidation.cs b/src/chocolatey/infrastructure.app/validations/GlobalConfigurationValidation.cs index beadb4e02f..8d9ced5f7e 100644 --- a/src/chocolatey/infrastructure.app/validations/GlobalConfigurationValidation.cs +++ b/src/chocolatey/infrastructure.app/validations/GlobalConfigurationValidation.cs @@ -14,13 +14,13 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.validations; + namespace chocolatey.infrastructure.app.validations { - using System; - using System.Collections.Generic; - using configuration; - using infrastructure.validations; - /// /// Performs top level validation checks against the current /// Chocolatey Configuration object to ensure that everything is @@ -71,7 +71,7 @@ to enable this feature (exit code 1). ExitCode = 1 }; - var commandsToErrorOn = new List {"install", "uninstall", "upgrade"}; + var commandsToErrorOn = new List { "install", "uninstall", "upgrade" }; if (!commandsToErrorOn.Contains(config.CommandName.ToLowerInvariant())) { validationResult.Status = ValidationStatus.Warning; @@ -84,10 +84,10 @@ to enable this feature (exit code 1). this.Log().Debug(" - Package Exit Code / Exit On Reboot = {0}".FormatWith(validationStatusResult.ToStringSafe())); } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public ICollection validate(ChocolateyConfiguration config) => Validate(config); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure.app/validations/SystemStateValidation.cs b/src/chocolatey/infrastructure.app/validations/SystemStateValidation.cs index 89bc90acfe..4f4b03229c 100644 --- a/src/chocolatey/infrastructure.app/validations/SystemStateValidation.cs +++ b/src/chocolatey/infrastructure.app/validations/SystemStateValidation.cs @@ -14,14 +14,14 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.validations; +using chocolatey.infrastructure.app.services; + namespace chocolatey.infrastructure.app.validations { - using System; - using System.Collections.Generic; - using configuration; - using infrastructure.validations; - using services; - /// /// Performs validation against the current System State. This /// includes things like pending reboot requirement. Any errors @@ -62,14 +62,14 @@ private void ValidateSystemPendingReboot(ChocolateyConfiguration config, ICollec if (result) { - var commandsToErrorOn = new List {"install", "uninstall", "upgrade"}; + var commandsToErrorOn = new List { "install", "uninstall", "upgrade" }; if (!commandsToErrorOn.Contains(config.CommandName.ToLowerInvariant())) { validationResults.Add(new ValidationResult { Message = @"A pending system reboot request has been detected, however, this is - being ignored due to the current command being used '{0}'. + being ignored due to the current command '{0}' being used. It is recommended that you reboot at your earliest convenience. ".FormatWith(config.CommandName), Status = ValidationStatus.Warning, @@ -105,10 +105,10 @@ or pass the option --exit-when-reboot-detected. } } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public ICollection validate(ChocolateyConfiguration config) => Validate(config); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure/adapters/Assembly.cs b/src/chocolatey/infrastructure/adapters/Assembly.cs index 999eb6348a..be4b6c2258 100644 --- a/src/chocolatey/infrastructure/adapters/Assembly.cs +++ b/src/chocolatey/infrastructure/adapters/Assembly.cs @@ -14,81 +14,76 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.ComponentModel; +using System.IO; +using System.Reflection; + namespace chocolatey.infrastructure.adapters { - using System; - using System.ComponentModel; - using System.IO; - using System.Reflection; - public sealed class Assembly : IAssembly { - private readonly System.Reflection.Assembly _assembly; - private Assembly(System.Reflection.Assembly assembly) { - _assembly = assembly; + UnderlyingType = assembly; } public string FullName { - get { return _assembly.FullName; } + get { return UnderlyingType.FullName; } } public string Location { - get { return _assembly.Location; } + get { return UnderlyingType.Location; } } public string CodeBase { - get { return _assembly.CodeBase; } + get { return UnderlyingType.CodeBase; } } [EditorBrowsable(EditorBrowsableState.Never)] - public System.Reflection.Assembly UnderlyingType - { - get { return _assembly; } - } + public System.Reflection.Assembly UnderlyingType { get; } public string[] GetManifestResourceNames() { - return _assembly.GetManifestResourceNames(); + return UnderlyingType.GetManifestResourceNames(); } public Stream GetManifestResourceStream(string name) { - return _assembly.GetManifestResourceStream(name); + return UnderlyingType.GetManifestResourceStream(name); } public Stream GetManifestResourceStream(Type type, string name) { - return _assembly.GetManifestResourceStream(type, name); + return UnderlyingType.GetManifestResourceStream(type, name); } public AssemblyName GetName() { - return _assembly.GetName(); + return UnderlyingType.GetName(); } - public Type GetType(String name) + public Type GetType(string name) { - return _assembly.GetType(name); + return UnderlyingType.GetType(name); } - public Type GetType(String name, bool throwOnError) + public Type GetType(string name, bool throwOnError) { - return _assembly.GetType(name,throwOnError); + return UnderlyingType.GetType(name, throwOnError); } - public Type GetType(String name, bool throwOnError, bool ignoreCase) + public Type GetType(string name, bool throwOnError, bool ignoreCase) { - return _assembly.GetType(name,throwOnError, ignoreCase); + return UnderlyingType.GetType(name, throwOnError, ignoreCase); } public Type[] GetTypes() { - return _assembly.GetTypes(); + return UnderlyingType.GetTypes(); } public static IAssembly Load(byte[] rawAssembly) @@ -103,7 +98,7 @@ public static IAssembly Load(byte[] rawAssembly, byte[] rawSymbols) public static IAssembly LoadFile(string path) { - return new Assembly(System.Reflection.Assembly.LoadFile(path)); + return new Assembly(System.Reflection.Assembly.LoadFile(path)); } public static IAssembly GetAssembly(Type type) @@ -138,10 +133,10 @@ public static implicit operator Assembly(System.Reflection.Assembly value) return new Assembly(value); } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public static IAssembly set_assembly(System.Reflection.Assembly value) => SetAssembly(value); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure/adapters/Console.cs b/src/chocolatey/infrastructure/adapters/Console.cs index 9bacb403f9..6d601afdb5 100644 --- a/src/chocolatey/infrastructure/adapters/Console.cs +++ b/src/chocolatey/infrastructure/adapters/Console.cs @@ -14,15 +14,15 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.IO; +using System.Runtime.InteropServices; +using chocolatey.infrastructure.app; +using chocolatey.infrastructure.commandline; +using chocolatey.infrastructure.platforms; + namespace chocolatey.infrastructure.adapters { - using System; - using System.IO; - using System.Runtime.InteropServices; - using app; - using commandline; - using platforms; - /// /// Adapter for System.Console /// @@ -30,28 +30,40 @@ public sealed class Console : IConsole { public string ReadLine() { - if (!ApplicationParameters.AllowPrompts) return string.Empty; + if (!ApplicationParameters.AllowPrompts) + { + return string.Empty; + } return System.Console.ReadLine(); } public string ReadLine(int timeoutMilliseconds) { - if (!ApplicationParameters.AllowPrompts) return string.Empty; + if (!ApplicationParameters.AllowPrompts) + { + return string.Empty; + } return ReadLineTimeout.Read(timeoutMilliseconds); } public System.ConsoleKeyInfo ReadKey(bool intercept) { - if (!ApplicationParameters.AllowPrompts) return new System.ConsoleKeyInfo('\0', ConsoleKey.Enter, false, false, false); + if (!ApplicationParameters.AllowPrompts) + { + return new System.ConsoleKeyInfo('\0', ConsoleKey.Enter, false, false, false); + } return System.Console.ReadKey(intercept); } public System.ConsoleKeyInfo ReadKey(int timeoutMilliseconds) { - if (!ApplicationParameters.AllowPrompts) return new System.ConsoleKeyInfo('\0', ConsoleKey.Enter, false, false, false); + if (!ApplicationParameters.AllowPrompts) + { + return new System.ConsoleKeyInfo('\0', ConsoleKey.Enter, false, false, false); + } return ReadKeyTimeout.ReadKey(timeoutMilliseconds); } @@ -79,13 +91,19 @@ public System.ConsoleColor BackgroundColor { get { - if (!IsOutputRedirected) return System.Console.BackgroundColor; + if (!IsOutputRedirected) + { + return System.Console.BackgroundColor; + } return System.ConsoleColor.Black; } set { - if (!IsOutputRedirected) System.Console.BackgroundColor = value; + if (!IsOutputRedirected) + { + System.Console.BackgroundColor = value; + } } } @@ -93,13 +111,19 @@ public System.ConsoleColor ForegroundColor { get { - if (!IsOutputRedirected) return System.Console.ForegroundColor; + if (!IsOutputRedirected) + { + return System.Console.ForegroundColor; + } return System.ConsoleColor.Gray; } set { - if (!IsOutputRedirected) System.Console.ForegroundColor = value; + if (!IsOutputRedirected) + { + System.Console.ForegroundColor = value; + } } } @@ -107,13 +131,19 @@ public int BufferWidth { get { - if (!IsOutputRedirected) return System.Console.BufferWidth; + if (!IsOutputRedirected) + { + return System.Console.BufferWidth; + } return GetConsoleBuffer().dwSize.X; //the current console window width } set { - if (!IsOutputRedirected) System.Console.BufferWidth = value; + if (!IsOutputRedirected) + { + System.Console.BufferWidth = value; + } } } @@ -121,32 +151,47 @@ public int BufferHeight { get { - if (!IsOutputRedirected) return System.Console.BufferHeight; + if (!IsOutputRedirected) + { + return System.Console.BufferHeight; + } return GetConsoleBuffer().dwSize.Y; //the current console window height } set { - if (!IsOutputRedirected) System.Console.BufferHeight = value; + if (!IsOutputRedirected) + { + System.Console.BufferHeight = value; + } } } public void SetBufferSize(int width, int height) { - if (!IsOutputRedirected) System.Console.SetBufferSize(width, height); + if (!IsOutputRedirected) + { + System.Console.SetBufferSize(width, height); + } } public string Title { get { - if (!IsOutputRedirected) return System.Console.Title; + if (!IsOutputRedirected) + { + return System.Console.Title; + } return string.Empty; } set { - if (!IsOutputRedirected) System.Console.Title = value; + if (!IsOutputRedirected) + { + System.Console.Title = value; + } } } @@ -154,7 +199,10 @@ public bool KeyAvailable { get { - if (!IsOutputRedirected) return System.Console.KeyAvailable; + if (!IsOutputRedirected) + { + return System.Console.KeyAvailable; + } return false; } @@ -164,13 +212,19 @@ public int CursorSize { get { - if (!IsOutputRedirected) return System.Console.CursorSize; + if (!IsOutputRedirected) + { + return System.Console.CursorSize; + } return GetConsoleBuffer().dwCursorPosition.Y; } set { - if (!IsOutputRedirected) System.Console.CursorSize = value; + if (!IsOutputRedirected) + { + System.Console.CursorSize = value; + } } } @@ -178,7 +232,10 @@ public int LargestWindowWidth { get { - if (!IsOutputRedirected) return System.Console.LargestWindowWidth; + if (!IsOutputRedirected) + { + return System.Console.LargestWindowWidth; + } return GetConsoleBuffer().dwMaximumWindowSize.X; //the max console window width } @@ -188,7 +245,10 @@ public int LargestWindowHeight { get { - if (!IsOutputRedirected) return System.Console.LargestWindowHeight; + if (!IsOutputRedirected) + { + return System.Console.LargestWindowHeight; + } return GetConsoleBuffer().dwMaximumWindowSize.Y; //the max console window height } @@ -198,13 +258,19 @@ public int WindowWidth { get { - if (!IsOutputRedirected) return System.Console.WindowWidth; + if (!IsOutputRedirected) + { + return System.Console.WindowWidth; + } return GetConsoleBuffer().dwSize.X; //the current console window width } set { - if (!IsOutputRedirected) System.Console.WindowWidth = value; + if (!IsOutputRedirected) + { + System.Console.WindowWidth = value; + } } } @@ -212,32 +278,47 @@ public int WindowHeight { get { - if (!IsOutputRedirected) return System.Console.WindowHeight; + if (!IsOutputRedirected) + { + return System.Console.WindowHeight; + } return GetConsoleBuffer().dwSize.Y; //the current console window height } set { - if (!IsOutputRedirected) System.Console.WindowHeight = value; + if (!IsOutputRedirected) + { + System.Console.WindowHeight = value; + } } } public void SetWindowSize(int width, int height) { - if (!IsOutputRedirected) System.Console.SetWindowSize(width, height); + if (!IsOutputRedirected) + { + System.Console.SetWindowSize(width, height); + } } public int WindowLeft { get { - if (!IsOutputRedirected) return System.Console.WindowLeft; + if (!IsOutputRedirected) + { + return System.Console.WindowLeft; + } return GetConsoleBuffer().srWindow.Left; } set { - if (!IsOutputRedirected) System.Console.WindowLeft = value; + if (!IsOutputRedirected) + { + System.Console.WindowLeft = value; + } } } @@ -245,19 +326,28 @@ public int WindowTop { get { - if (!IsOutputRedirected) return System.Console.WindowTop; + if (!IsOutputRedirected) + { + return System.Console.WindowTop; + } return GetConsoleBuffer().srWindow.Top; } set { - if (!IsOutputRedirected) System.Console.WindowTop = value; + if (!IsOutputRedirected) + { + System.Console.WindowTop = value; + } } } public void SetWindowPosition(int width, int height) { - if (!IsOutputRedirected) System.Console.SetWindowPosition(width, height); + if (!IsOutputRedirected) + { + System.Console.SetWindowPosition(width, height); + } } /// @@ -267,7 +357,10 @@ public bool IsOutputRedirected { get { - if (!IsWindows()) return false; + if (!IsWindows()) + { + return false; + } return FileType.Char != GetFileType(GetStdHandle(StdHandle.StdOut)); } @@ -280,7 +373,10 @@ public bool IsErrorRedirected { get { - if (!IsWindows()) return false; + if (!IsWindows()) + { + return false; + } return FileType.Char != GetFileType(GetStdHandle(StdHandle.StdErr)); } @@ -293,7 +389,10 @@ public bool IsInputRedirected { get { - if (!IsWindows()) return false; + if (!IsWindows()) + { + return false; + } return FileType.Char != GetFileType(GetStdHandle(StdHandle.StdIn)); } @@ -315,7 +414,10 @@ private CONSOLE_SCREEN_BUFFER_INFO GetConsoleBuffer() wAttributes = 0, }; - if (!IsWindows()) return defaultConsoleBuffer; + if (!IsWindows()) + { + return defaultConsoleBuffer; + } CONSOLE_SCREEN_BUFFER_INFO csbi; if (GetConsoleScreenBufferInfo(GetStdHandle(StdHandle.StdOut), out csbi)) @@ -327,6 +429,7 @@ private CONSOLE_SCREEN_BUFFER_INFO GetConsoleBuffer() return defaultConsoleBuffer; } +#pragma warning disable IDE1006 // naming conventions /// /// Contains information about a console screen buffer. /// @@ -340,12 +443,13 @@ private struct CONSOLE_SCREEN_BUFFER_INFO /// A CoOrd structure that contains the column and row coordinates of the cursor in the console screen buffer. internal COORD dwCursorPosition; /// The attributes of the characters written to a screen buffer by the WriteFile and WriteConsole functions, or echoed to a screen buffer by the ReadFile and ReadConsole functions. - internal System.Int16 wAttributes; + internal short wAttributes; /// A SmallRect structure that contains the console screen buffer coordinates of the upper-left and lower-right corners of the display window. internal SMALL_RECT srWindow; /// A CoOrd structure that contains the maximum size of the console window, in character columns and rows, given the current screen buffer size and font and the screen size. internal COORD dwMaximumWindowSize; } +#pragma warning restore IDE1006 // naming conventions /// /// Defines the coordinates of a character cell in a console screen buffer. @@ -357,9 +461,9 @@ private struct CONSOLE_SCREEN_BUFFER_INFO private struct COORD { /// The horizontal coordinate or column value. - internal System.Int16 X; + internal short X; /// The vertical coordinate or row value. - internal System.Int16 Y; + internal short Y; } /// @@ -371,13 +475,13 @@ private struct COORD private struct SMALL_RECT { /// The x-coordinate of the upper left corner of the rectangle. - internal System.Int16 Left; + internal short Left; /// The y-coordinate of the upper left corner of the rectangle. - internal System.Int16 Top; + internal short Top; /// The x-coordinate of the lower right corner of the rectangle. - internal System.Int16 Right; + internal short Right; /// The y-coordinate of the lower right corner of the rectangle. - internal System.Int16 Bottom; + internal short Bottom; } private enum StdHandle diff --git a/src/chocolatey/infrastructure/adapters/Environment.cs b/src/chocolatey/infrastructure/adapters/Environment.cs index 26df791377..93d3705d55 100644 --- a/src/chocolatey/infrastructure/adapters/Environment.cs +++ b/src/chocolatey/infrastructure/adapters/Environment.cs @@ -14,12 +14,12 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections; +using chocolatey.infrastructure.app; + namespace chocolatey.infrastructure.adapters { - using System; - using System.Collections; - using app; - public sealed class Environment : IEnvironment { public OperatingSystem OSVersion @@ -63,7 +63,10 @@ public string CurrentDirectory public string ExpandEnvironmentVariables(string name) { - if (string.IsNullOrWhiteSpace(name)) return name; + if (string.IsNullOrWhiteSpace(name)) + { + return name; + } return System.Environment.ExpandEnvironmentVariables(name); } diff --git a/src/chocolatey/infrastructure/adapters/HashAlgorithm.cs b/src/chocolatey/infrastructure/adapters/HashAlgorithm.cs index 3e5e30e094..868486c577 100644 --- a/src/chocolatey/infrastructure/adapters/HashAlgorithm.cs +++ b/src/chocolatey/infrastructure/adapters/HashAlgorithm.cs @@ -14,10 +14,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System.IO; + namespace chocolatey.infrastructure.adapters { - using System.IO; - public sealed class HashAlgorithm : IHashAlgorithm { private readonly System.Security.Cryptography.HashAlgorithm _algorithm; diff --git a/src/chocolatey/infrastructure/adapters/IAssembly.cs b/src/chocolatey/infrastructure/adapters/IAssembly.cs index bb1caca0ff..93db3b98c3 100644 --- a/src/chocolatey/infrastructure/adapters/IAssembly.cs +++ b/src/chocolatey/infrastructure/adapters/IAssembly.cs @@ -14,13 +14,13 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.ComponentModel; +using System.IO; +using System.Reflection; + namespace chocolatey.infrastructure.adapters { - using System; - using System.ComponentModel; - using System.IO; - using System.Reflection; - // ReSharper disable InconsistentNaming public interface IAssembly @@ -80,11 +80,11 @@ public interface IAssembly AssemblyName GetName(); - Type GetType(String name); + Type GetType(string name); - Type GetType(String name, bool throwOnError); + Type GetType(string name, bool throwOnError); - Type GetType(String name, bool throwOnError, bool ignoreCase); + Type GetType(string name, bool throwOnError, bool ignoreCase); Type[] GetTypes(); diff --git a/src/chocolatey/infrastructure/adapters/IConsole.cs b/src/chocolatey/infrastructure/adapters/IConsole.cs index fc0f67be25..9a29c7c40a 100644 --- a/src/chocolatey/infrastructure/adapters/IConsole.cs +++ b/src/chocolatey/infrastructure/adapters/IConsole.cs @@ -14,10 +14,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System.IO; + namespace chocolatey.infrastructure.adapters { - using System.IO; - // ReSharper disable InconsistentNaming public interface IConsole diff --git a/src/chocolatey/infrastructure/adapters/IEncryptionUtility.cs b/src/chocolatey/infrastructure/adapters/IEncryptionUtility.cs index ad9fda3ee8..22eaf26049 100644 --- a/src/chocolatey/infrastructure/adapters/IEncryptionUtility.cs +++ b/src/chocolatey/infrastructure/adapters/IEncryptionUtility.cs @@ -14,23 +14,23 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; + namespace chocolatey.infrastructure.adapters { - using System; - public interface IEncryptionUtility { string EncryptString(string cleartextValue); string DecryptString(string encryptedString); string GenerateUniqueToken(string caseInsensitiveKey); -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] string encrypt_string(string cleartextValue); [Obsolete("This overload is deprecated and will be removed in v3.")] string decrypt_string(string encryptedString); [Obsolete("This overload is deprecated and will be removed in v3.")] string generate_unique_token(string caseInsensitiveKey); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure/adapters/IEnvironment.cs b/src/chocolatey/infrastructure/adapters/IEnvironment.cs index a69936c469..c8c9fc6397 100644 --- a/src/chocolatey/infrastructure/adapters/IEnvironment.cs +++ b/src/chocolatey/infrastructure/adapters/IEnvironment.cs @@ -14,11 +14,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections; + namespace chocolatey.infrastructure.adapters { - using System; - using System.Collections; - // ReSharper disable InconsistentNaming public interface IEnvironment diff --git a/src/chocolatey/infrastructure/adapters/IHashAlgorithm.cs b/src/chocolatey/infrastructure/adapters/IHashAlgorithm.cs index 3c3f8f0b74..af1e6fcd1b 100644 --- a/src/chocolatey/infrastructure/adapters/IHashAlgorithm.cs +++ b/src/chocolatey/infrastructure/adapters/IHashAlgorithm.cs @@ -14,10 +14,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System.IO; + namespace chocolatey.infrastructure.adapters { - using System.IO; - // ReSharper disable InconsistentNaming public interface IHashAlgorithm diff --git a/src/chocolatey/infrastructure/adapters/IProcess.cs b/src/chocolatey/infrastructure/adapters/IProcess.cs index 82fde88c2d..4279f3cfcf 100644 --- a/src/chocolatey/infrastructure/adapters/IProcess.cs +++ b/src/chocolatey/infrastructure/adapters/IProcess.cs @@ -14,11 +14,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Diagnostics; + namespace chocolatey.infrastructure.adapters { - using System; - using System.Diagnostics; - // ReSharper disable InconsistentNaming public interface IProcess : IDisposable diff --git a/src/chocolatey/infrastructure/adapters/Process.cs b/src/chocolatey/infrastructure/adapters/Process.cs index 109c6d7267..6032cab2d3 100644 --- a/src/chocolatey/infrastructure/adapters/Process.cs +++ b/src/chocolatey/infrastructure/adapters/Process.cs @@ -14,74 +14,70 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Diagnostics; + namespace chocolatey.infrastructure.adapters { - using System; - using System.Diagnostics; - public sealed class Process : IProcess { - private readonly System.Diagnostics.Process _process; public event EventHandler OutputDataReceived; public event EventHandler ErrorDataReceived; public Process() { - _process = new System.Diagnostics.Process(); - _process.ErrorDataReceived += (sender, args) => ErrorDataReceived.Invoke(sender, args); - _process.OutputDataReceived += (sender, args) => OutputDataReceived.Invoke(sender, args); + UnderlyingType = new System.Diagnostics.Process(); + UnderlyingType.ErrorDataReceived += (sender, args) => ErrorDataReceived.Invoke(sender, args); + UnderlyingType.OutputDataReceived += (sender, args) => OutputDataReceived.Invoke(sender, args); } public ProcessStartInfo StartInfo { - get { return _process.StartInfo; } - set { _process.StartInfo = value; } + get { return UnderlyingType.StartInfo; } + set { UnderlyingType.StartInfo = value; } } public bool EnableRaisingEvents { - get { return _process.EnableRaisingEvents; } - set { _process.EnableRaisingEvents = value; } + get { return UnderlyingType.EnableRaisingEvents; } + set { UnderlyingType.EnableRaisingEvents = value; } } public int ExitCode { - get { return _process.ExitCode; } + get { return UnderlyingType.ExitCode; } } - public System.Diagnostics.Process UnderlyingType - { - get { return _process; } - } + public System.Diagnostics.Process UnderlyingType { get; } public void Start() { - _process.Start(); + UnderlyingType.Start(); } public void BeginErrorReadLine() { - _process.BeginErrorReadLine(); + UnderlyingType.BeginErrorReadLine(); } public void BeginOutputReadLine() { - _process.BeginOutputReadLine(); + UnderlyingType.BeginOutputReadLine(); } public void WaitForExit() { - _process.WaitForExit(); + UnderlyingType.WaitForExit(); } public bool WaitForExit(int milliseconds) { - return _process.WaitForExit(milliseconds); + return UnderlyingType.WaitForExit(milliseconds); } public void Dispose() { - _process.Dispose(); + UnderlyingType.Dispose(); } } } diff --git a/src/chocolatey/infrastructure/commandline/ExitScenarioHandler.cs b/src/chocolatey/infrastructure/commandline/ExitScenarioHandler.cs index 641fa1afe2..cd3abd660d 100644 --- a/src/chocolatey/infrastructure/commandline/ExitScenarioHandler.cs +++ b/src/chocolatey/infrastructure/commandline/ExitScenarioHandler.cs @@ -14,13 +14,13 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Runtime.InteropServices; +using chocolatey.infrastructure.logging; +using chocolatey.infrastructure.platforms; + namespace chocolatey.infrastructure.commandline { - using System; - using System.Runtime.InteropServices; - using logging; - using platforms; - /// /// Detect abnormal exit signals and log them /// @@ -48,7 +48,10 @@ private enum SignalControlType public static void SetHandler() { - if (Platform.GetPlatform() != PlatformType.Windows) return; + if (Platform.GetPlatform() != PlatformType.Windows) + { + return; + } _handler += Handler; SetConsoleCtrlHandler(_handler, true); diff --git a/src/chocolatey/infrastructure/commandline/InteractivePrompt.cs b/src/chocolatey/infrastructure/commandline/InteractivePrompt.cs index c732105fd5..cf4ba3c387 100644 --- a/src/chocolatey/infrastructure/commandline/InteractivePrompt.cs +++ b/src/chocolatey/infrastructure/commandline/InteractivePrompt.cs @@ -14,17 +14,17 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using chocolatey.infrastructure.adapters; +using chocolatey.infrastructure.guards; +using chocolatey.infrastructure.logging; +using Console = chocolatey.infrastructure.adapters.Console; + namespace chocolatey.infrastructure.commandline { - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.Linq; - using adapters; - using guards; - using logging; - using Console = adapters.Console; - public class InteractivePrompt { private static Lazy _console = new Lazy(() => new Console()); @@ -43,7 +43,11 @@ private static IConsole Console public static string PromptForConfirmation(string prompt, IEnumerable choices, string defaultChoice, bool requireAnswer, bool allowShortAnswer = true, bool shortPrompt = false, int repeat = 10, int timeoutInSeconds = 0) { - if (repeat < 0) throw new ApplicationException("Too many bad attempts. Stopping before application crash."); + if (repeat < 0) + { + throw new ApplicationException("Too many bad attempts. Stopping before application crash."); + } + Ensure.That(() => prompt).NotNull(); Ensure.That(() => choices).NotNull(); Ensure @@ -66,7 +70,7 @@ public static string PromptForConfirmation(string prompt, IEnumerable ch Ensure .That(() => choices) .Meets( - c => !c.Any(String.IsNullOrWhiteSpace), + c => !c.Any(string.IsNullOrWhiteSpace), (name, value) => { throw new ApplicationException("Some choices are empty. Please ensure you provide no empty choices."); }); Ensure @@ -89,12 +93,12 @@ public static string PromptForConfirmation(string prompt, IEnumerable ch "chocolatey".Log().Info(shortPrompt ? ChocolateyLoggers.LogFileOnly : ChocolateyLoggers.Important, prompt); - int counter = 1; + var counter = 1; IDictionary choiceDictionary = new Dictionary(); foreach (var choice in choices.OrEmpty()) { choiceDictionary.Add(counter, choice); - "chocolatey".Log().Info(shortPrompt ? ChocolateyLoggers.LogFileOnly : ChocolateyLoggers.Normal," {0}) {1}{2}".FormatWith(counter, choice.ToStringSafe(), choice.IsEqualTo(defaultChoice) ? " [Default - Press Enter]" : "")); + "chocolatey".Log().Info(shortPrompt ? ChocolateyLoggers.LogFileOnly : ChocolateyLoggers.Normal, " {0}) {1}{2}".FormatWith(counter, choice.ToStringSafe(), choice.IsEqualTo(defaultChoice) ? " [Default - Press Enter]" : "")); if (shortPrompt) { var choicePrompt = choice.IsEqualTo(defaultChoice) ? @@ -103,10 +107,14 @@ public static string PromptForConfirmation(string prompt, IEnumerable ch "[{0}]".FormatWith(choice.ToUpperInvariant()) : shortPrompt ? - "[{0}]{1}".FormatWith(choice.Substring(0,1).ToUpperInvariant(), choice.Substring(1, choice.Length - 1)) : + "[{0}]{1}".FormatWith(choice.Substring(0, 1).ToUpperInvariant(), choice.Substring(1, choice.Length - 1)) : choice; - if (counter != 1) Console.Write("/"); + if (counter != 1) + { + Console.Write("/"); + } + Console.Write(choicePrompt); } @@ -116,7 +124,10 @@ public static string PromptForConfirmation(string prompt, IEnumerable ch Console.Write(shortPrompt ? "): " : "> "); var selection = timeoutInSeconds == 0 ? Console.ReadLine() : Console.ReadLine(timeoutInSeconds * 1000); - if (shortPrompt) Console.WriteLine(); + if (shortPrompt) + { + Console.WriteLine(); + } if (string.IsNullOrWhiteSpace(selection) && !string.IsNullOrWhiteSpace(defaultChoice)) { @@ -124,7 +135,7 @@ public static string PromptForConfirmation(string prompt, IEnumerable ch return defaultChoice; } - int selected = -1; + var selected = -1; if (!int.TryParse(selection, out selected) || selected <= 0 || selected > (counter - 1)) { // check to see if value was passed @@ -178,7 +189,7 @@ public static string GetPassword(bool interactive) { password = password.Substring(0, password.Length - 1); // get the location of the cursor - int pos = System.Console.CursorLeft; + var pos = System.Console.CursorLeft; // move the cursor to the left by one character System.Console.SetCursorPosition(pos - 1, System.Console.CursorTop); // replace it with space @@ -189,14 +200,18 @@ public static string GetPassword(bool interactive) info = possibleNonInteractive ? Console.ReadKey(TimeoutInSeconds * 1000) : Console.ReadKey(true); } } - for (int i = 0; i < password.Length; i++) Console.Write("*"); + for (var i = 0; i < password.Length; i++) + { + Console.Write("*"); + } + System.Console.WriteLine(""); return password; } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] [EditorBrowsable(EditorBrowsableState.Never)] public static void initialize_with(Lazy console) @@ -209,6 +224,6 @@ public static string prompt_for_confirmation(string prompt, IEnumerable [Obsolete("This overload is deprecated and will be removed in v3.")] public static string get_password(bool interactive) => GetPassword(interactive); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure/commandline/Options.cs b/src/chocolatey/infrastructure/commandline/Options.cs index bf16a7223d..3baaffc08f 100644 --- a/src/chocolatey/infrastructure/commandline/Options.cs +++ b/src/chocolatey/infrastructure/commandline/Options.cs @@ -1,4 +1,16 @@  +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel; +using System.Globalization; +using System.IO; +using System.Runtime.Serialization; +using System.Security.Permissions; +using System.Text; +using System.Text.RegularExpressions; + // // Options.cs // @@ -139,20 +151,6 @@ namespace chocolatey.infrastructure.commandline { - - using System; - using System.Collections; - using System.Collections.Generic; - using System.Collections.ObjectModel; - using System.ComponentModel; - using System.Globalization; - using System.IO; - using System.Runtime.Serialization; - using System.Security.Permissions; - using System.Text; - using System.Text.RegularExpressions; - - // ReSharper disable InconsistentNaming public class OptionValueCollection : IList, IList { diff --git a/src/chocolatey/infrastructure/commandline/ReadKeyTimeout.cs b/src/chocolatey/infrastructure/commandline/ReadKeyTimeout.cs index df6132c53d..ac32137ad8 100644 --- a/src/chocolatey/infrastructure/commandline/ReadKeyTimeout.cs +++ b/src/chocolatey/infrastructure/commandline/ReadKeyTimeout.cs @@ -14,11 +14,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Threading; + namespace chocolatey.infrastructure.commandline { - using System; - using System.Threading; - /// /// Because sometimes you to timeout a readkey instead of blocking infinitely. /// @@ -69,7 +69,10 @@ public static ConsoleKeyInfo ReadKey(int timeoutMilliseconds) public void Dispose() { - if (_isDisposing) return; + if (_isDisposing) + { + return; + } _isDisposing = true; _responseThread.Abort(); @@ -79,10 +82,10 @@ public void Dispose() _foregroundResponseReset.Dispose(); } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public static ConsoleKeyInfo read_key(int timeoutMilliseconds) => ReadKey(timeoutMilliseconds); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure/commandline/ReadLineTimeout.cs b/src/chocolatey/infrastructure/commandline/ReadLineTimeout.cs index 5e75b48497..2fea566a03 100644 --- a/src/chocolatey/infrastructure/commandline/ReadLineTimeout.cs +++ b/src/chocolatey/infrastructure/commandline/ReadLineTimeout.cs @@ -14,11 +14,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Threading; + namespace chocolatey.infrastructure.commandline { - using System; - using System.Threading; - /// /// Because sometimes you to timeout a readline instead of blocking infinitely. /// @@ -69,7 +69,10 @@ public static string Read(int timeoutMilliseconds) public void Dispose() { - if (_isDisposing) return; + if (_isDisposing) + { + return; + } _isDisposing = true; _responseThread.Abort(); @@ -80,10 +83,10 @@ public void Dispose() } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public static string read(int timeoutMilliseconds) => Read(timeoutMilliseconds); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure/commands/CommandExecutor.cs b/src/chocolatey/infrastructure/commands/CommandExecutor.cs index 3eb526c3da..79e86247da 100644 --- a/src/chocolatey/infrastructure/commands/CommandExecutor.cs +++ b/src/chocolatey/infrastructure/commands/CommandExecutor.cs @@ -14,18 +14,18 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.ComponentModel; +using System.Diagnostics; +using System.IO; +using chocolatey.infrastructure.adapters; +using chocolatey.infrastructure.filesystem; +using chocolatey.infrastructure.logging; +using chocolatey.infrastructure.platforms; +using Process = chocolatey.infrastructure.adapters.Process; + namespace chocolatey.infrastructure.commands { - using System; - using System.ComponentModel; - using System.Diagnostics; - using System.IO; - using adapters; - using filesystem; - using logging; - using platforms; - using Process = adapters.Process; - public sealed class CommandExecutor : ICommandExecutor { public CommandExecutor(IFileSystem fileSystem) @@ -97,7 +97,7 @@ bool allowUseWindow stdErrAction, updateProcessPath, allowUseWindow, - waitForExit:true + waitForExit: true ); } @@ -157,7 +157,7 @@ public static int ExecuteStatic(string process, bool waitForExit ) { - int exitCode = -1; + var exitCode = -1; if (updateProcessPath) { process = FileSystem.GetFullPath(process); @@ -177,14 +177,14 @@ bool waitForExit "chocolatey".Log().Debug(() => "Calling command ['\"{0}\" {1}']".FormatWith(process.EscapeCurlyBraces(), arguments.EscapeCurlyBraces())); var psi = new ProcessStartInfo(process.UnquoteSafe(), arguments) - { - UseShellExecute = false, - WorkingDirectory = workingDirectory, - RedirectStandardOutput = true, - RedirectStandardError = true, - CreateNoWindow = !allowUseWindow, - WindowStyle = ProcessWindowStyle.Minimized, - }; + { + UseShellExecute = false, + WorkingDirectory = workingDirectory, + RedirectStandardOutput = true, + RedirectStandardError = true, + CreateNoWindow = !allowUseWindow, + WindowStyle = ProcessWindowStyle.Minimized, + }; using (var p = _initializeProcess()) { @@ -245,16 +245,22 @@ bool waitForExit private static void LogOutput(object sender, DataReceivedEventArgs e) { - if (e != null) "chocolatey".Log().Info(e.Data.EscapeCurlyBraces()); + if (e != null) + { + "chocolatey".Log().Info(e.Data.EscapeCurlyBraces()); + } } private static void LogError(object sender, DataReceivedEventArgs e) { - if (e != null) "chocolatey".Log().Error(e.Data.EscapeCurlyBraces()); + if (e != null) + { + "chocolatey".Log().Error(e.Data.EscapeCurlyBraces()); + } } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] [EditorBrowsable(EditorBrowsableState.Never)] public static void initialize_with(Lazy file_system, Func process_initializer) @@ -331,6 +337,6 @@ private static void log_output(object sender, DataReceivedEventArgs e) [Obsolete("This overload is deprecated and will be removed in v3.")] private static void log_error(object sender, DataReceivedEventArgs e) => LogError(sender, e); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure/commands/Execute.cs b/src/chocolatey/infrastructure/commands/Execute.cs index 1fe7040763..7e954dfa1b 100644 --- a/src/chocolatey/infrastructure/commands/Execute.cs +++ b/src/chocolatey/infrastructure/commands/Execute.cs @@ -14,13 +14,13 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Threading; +using System.Threading.Tasks; +using chocolatey.infrastructure.logging; + namespace chocolatey.infrastructure.commands { - using System; - using System.Threading; - using System.Threading.Tasks; - using logging; - /// /// Execute a method or function /// @@ -62,7 +62,10 @@ private Execute(TimeSpan timespan) /// The results of the function if completes within timespan, otherwise returns the default value. public T Command(Func function, T timeoutDefaultValue) { - if (function == null) return timeoutDefaultValue; + if (function == null) + { + return timeoutDefaultValue; + } var cancelToken = new CancellationTokenSource(); cancelToken.Token.ThrowIfCancellationRequested(); @@ -78,10 +81,13 @@ public T Command(Func function, T timeoutDefaultValue) task.Wait(_timespan); } - if (task.IsCompleted) return task.Result; + if (task.IsCompleted) + { + return task.Result; + } cancelToken.Cancel(); - this.Log().Warn(ChocolateyLoggers.Important,() => @"Chocolatey timed out waiting for the command to finish. The timeout + this.Log().Warn(ChocolateyLoggers.Important, () => @"Chocolatey timed out waiting for the command to finish. The timeout specified (or the default value) was '{0}' seconds. Perhaps try a higher `--execution-timeout`? See `choco -h` for details.".FormatWith(_timespan.TotalSeconds)); @@ -104,7 +110,10 @@ public T Command(Func function, T timeoutDefaultValue) /// True if it finishes executing, false otherwise. public bool Command(Action action) { - if (action == null) return false; + if (action == null) + { + return false; + } var completed = false; @@ -135,7 +144,7 @@ public bool Command(Action action) return completed; } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public static Execute with_timeout(int timeoutInSeconds) => WithTimeout(timeoutInSeconds); @@ -151,6 +160,6 @@ public T command(Func function, T timeoutDefaultValue) [Obsolete("This overload is deprecated and will be removed in v3.")] public bool command(Action action) => Command(action); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure/commands/ExitCodeDescription.cs b/src/chocolatey/infrastructure/commands/ExitCodeDescription.cs index ff7c4072f1..f2531d451d 100644 --- a/src/chocolatey/infrastructure/commands/ExitCodeDescription.cs +++ b/src/chocolatey/infrastructure/commands/ExitCodeDescription.cs @@ -13,10 +13,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; + namespace chocolatey.infrastructure.commands { - using System; - public sealed class ExitCodeDescription { public ExitCodeDescription(string description, params int[] exitCodes) diff --git a/src/chocolatey/infrastructure/commands/ExternalCommandArgsBuilder.cs b/src/chocolatey/infrastructure/commands/ExternalCommandArgsBuilder.cs index b018331af5..3eb695fd39 100644 --- a/src/chocolatey/infrastructure/commands/ExternalCommandArgsBuilder.cs +++ b/src/chocolatey/infrastructure/commands/ExternalCommandArgsBuilder.cs @@ -14,13 +14,13 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Reflection; +using System.Text; + namespace chocolatey.infrastructure.commands { - using System; - using System.Collections.Generic; - using System.Reflection; - using System.Text; - /// /// Responsible for setting up arguments for an external command to be executed /// @@ -62,7 +62,10 @@ public static string BuildArguments(object properties, IDictionary propertyValues foreach (var prop in properties.OrEmpty()) { //todo: #2587 need a better way of handling - if (prop.Name == "MachineSources") continue; + if (prop.Name == "MachineSources") + { + continue; + } if (prop.PropertyType.IsBuiltinType()) { @@ -86,12 +92,12 @@ private static void FillArgsDictionary(Dictionary propertyValues var arg = configToArgNames[propName]; var propType = prop.PropertyType; var propValue = prop.GetValue(obj, null).ToStringSafe().QuoteIfContainsSpaces(); - if (propType == typeof (Boolean) && propValue.IsEqualTo(bool.FalseString)) + if (propType == typeof(bool) && propValue.IsEqualTo(bool.FalseString)) { continue; } - if (string.IsNullOrWhiteSpace(arg.ArgumentValue) && propType != typeof (Boolean)) + if (string.IsNullOrWhiteSpace(arg.ArgumentValue) && propType != typeof(bool)) { if (string.IsNullOrWhiteSpace(propValue)) { @@ -126,7 +132,7 @@ private static string QuoteArgumentValueIfRequired(ExternalCommandArgument argum return argument.ArgumentValue; } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public static string build_arguments(object properties, IDictionary configToArgNames) => BuildArguments(properties, configToArgNames); @@ -138,6 +144,6 @@ private static void fill_args_dictionary(Dictionary propertyValu [Obsolete("This overload is deprecated and will be removed in v3.")] private static string quote_arg_value_if_required(ExternalCommandArgument argument) => QuoteArgumentValueIfRequired(argument); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure/commands/ICommand.cs b/src/chocolatey/infrastructure/commands/ICommand.cs index 3c62b649aa..2159f1c89e 100644 --- a/src/chocolatey/infrastructure/commands/ICommand.cs +++ b/src/chocolatey/infrastructure/commands/ICommand.cs @@ -14,13 +14,13 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.commandline; + namespace chocolatey.infrastructure.commands { - using System; - using System.Collections.Generic; - using app.configuration; - using commandline; - /// /// Commands that can be configured and run /// @@ -66,7 +66,7 @@ public interface ICommand /// bool MayRequireAdminAccess(); -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] void configure_argument_parser(OptionSet optionSet, ChocolateyConfiguration configuration); @@ -87,6 +87,6 @@ public interface ICommand [Obsolete("This overload is deprecated and will be removed in v3.")] bool may_require_admin_access(); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure/commands/ICommandExecutor.cs b/src/chocolatey/infrastructure/commands/ICommandExecutor.cs index 276f4b0ac3..bb87e3e8be 100644 --- a/src/chocolatey/infrastructure/commands/ICommandExecutor.cs +++ b/src/chocolatey/infrastructure/commands/ICommandExecutor.cs @@ -14,11 +14,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Diagnostics; + namespace chocolatey.infrastructure.commands { - using System; - using System.Diagnostics; - public interface ICommandExecutor { int Execute(string process, string arguments, int waitForExitInSeconds); @@ -56,7 +56,7 @@ int Execute( bool waitForExit ); -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] int execute(string process, string arguments, int waitForExitInSeconds); @@ -96,6 +96,6 @@ int execute( bool allowUseWindow, bool waitForExit ); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure/commands/IListCommand.cs b/src/chocolatey/infrastructure/commands/IListCommand.cs index 33de9cc57c..a42cfe16bb 100644 --- a/src/chocolatey/infrastructure/commands/IListCommand.cs +++ b/src/chocolatey/infrastructure/commands/IListCommand.cs @@ -14,29 +14,29 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using chocolatey.infrastructure.app.configuration; + namespace chocolatey.infrastructure.commands { - using System; - using System.Collections.Generic; - using app.configuration; - public interface IListCommand : ICommand { int Count(ChocolateyConfiguration config); -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] int count(ChocolateyConfiguration config); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } public interface IListCommand : IListCommand { IEnumerable List(ChocolateyConfiguration config); -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] IEnumerable list(ChocolateyConfiguration config); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure/commands/PowershellExecutor.cs b/src/chocolatey/infrastructure/commands/PowershellExecutor.cs index 392e60be3f..4f753d7aae 100644 --- a/src/chocolatey/infrastructure/commands/PowershellExecutor.cs +++ b/src/chocolatey/infrastructure/commands/PowershellExecutor.cs @@ -14,27 +14,21 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Diagnostics; +using System.IO; +using chocolatey.infrastructure.adapters; +using chocolatey.infrastructure.filesystem; +using Environment = System.Environment; + namespace chocolatey.infrastructure.commands { - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.Diagnostics; - using System.IO; - using adapters; - using filesystem; - using Environment = System.Environment; - public sealed class PowershellExecutor { - private static bool _allowUseWindow = true; - [EditorBrowsable(EditorBrowsableState.Never)] - public static bool AllowUseWindow - { - get { return _allowUseWindow; } - set { _allowUseWindow = value; } - } + public static bool AllowUseWindow { get; set; } = true; private static readonly IList _powershellLocations = new List { @@ -53,9 +47,12 @@ public static int Execute( Action stdErrAction ) { - if (string.IsNullOrWhiteSpace(_powershell)) _powershell = GetPowerShellLocation(fileSystem); + if (string.IsNullOrWhiteSpace(_powershell)) + { + _powershell = GetPowerShellLocation(fileSystem); + } //-NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '%DIR%chocolatey.ps1' %PS_ARGS%" - string arguments = "-NoProfile -NoLogo -ExecutionPolicy Bypass -Command \"{0}\"".FormatWith(command); + var arguments = "-NoProfile -NoLogo -ExecutionPolicy Bypass -Command \"{0}\"".FormatWith(command); return CommandExecutor.ExecuteStatic( _powershell, @@ -65,7 +62,7 @@ Action stdErrAction stdOutAction: stdOutAction, stdErrAction: stdErrAction, updateProcessPath: true, - allowUseWindow: _allowUseWindow + allowUseWindow: AllowUseWindow ); } @@ -82,7 +79,7 @@ public static string GetPowerShellLocation(IFileSystem fileSystem) throw new FileNotFoundException("Unable to find suitable location for PowerShell. Searched the following locations: '{0}'".FormatWith(string.Join("; ", _powershellLocations))); } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public static int execute( string command, @@ -95,6 +92,6 @@ public static int execute( [Obsolete("This overload is deprecated and will be removed in v3.")] public static string get_powershell_location(IFileSystem fileSystem) => GetPowerShellLocation(fileSystem); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure/configuration/Config.cs b/src/chocolatey/infrastructure/configuration/Config.cs index dd2b47b2ac..99cd4a5e70 100644 --- a/src/chocolatey/infrastructure/configuration/Config.cs +++ b/src/chocolatey/infrastructure/configuration/Config.cs @@ -14,12 +14,12 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.ComponentModel; +using chocolatey.infrastructure.app.configuration; + namespace chocolatey.infrastructure.configuration { - using System; - using System.ComponentModel; - using app.configuration; - /// /// Configuration initialization /// @@ -53,7 +53,7 @@ public static ChocolateyConfiguration GetConfigurationSettings() return _configuration; } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public static void initialize_with(ChocolateyConfiguration configuration) => InitializeWith(configuration); @@ -61,6 +61,6 @@ public static void initialize_with(ChocolateyConfiguration configuration) [Obsolete("This overload is deprecated and will be removed in v3.")] public static ChocolateyConfiguration get_configuration_settings() => GetConfigurationSettings(); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure/cryptography/CryptoHashProvider.cs b/src/chocolatey/infrastructure/cryptography/CryptoHashProvider.cs index a88e0bc929..31af0997ab 100644 --- a/src/chocolatey/infrastructure/cryptography/CryptoHashProvider.cs +++ b/src/chocolatey/infrastructure/cryptography/CryptoHashProvider.cs @@ -14,19 +14,19 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.IO; +using System.Runtime.InteropServices; +using System.Security.Cryptography; +using System.Text; +using chocolatey.infrastructure.adapters; +using chocolatey.infrastructure.app; +using chocolatey.infrastructure.filesystem; +using Environment = System.Environment; +using HashAlgorithm = chocolatey.infrastructure.adapters.HashAlgorithm; + namespace chocolatey.infrastructure.cryptography { - using System; - using System.IO; - using System.Runtime.InteropServices; - using System.Security.Cryptography; - using System.Text; - using adapters; - using app; - using filesystem; - using Environment = System.Environment; - using HashAlgorithm = adapters.HashAlgorithm; - public class CryptoHashProvider : IHashProvider { private readonly IFileSystem _fileSystem; @@ -86,7 +86,10 @@ public CryptoHashProvider(IFileSystem fileSystem, IHashAlgorithm hashAlgorithm) public string ComputeFileHash(string filePath) { - if (!_fileSystem.FileExists(filePath)) return string.Empty; + if (!_fileSystem.FileExists(filePath)) + { + return string.Empty; + } try { @@ -136,13 +139,16 @@ private static bool IsFileLocked(Exception exception) public static string ComputeStringHash(string originalText, CryptoHashProviderType providerType) { IHashAlgorithm hashAlgorithm = GetHashAlgorithmStatic(providerType); - if (hashAlgorithm == null) return string.Empty; + if (hashAlgorithm == null) + { + return string.Empty; + } - var hash = hashAlgorithm.ComputeHash(Encoding.ASCII.GetBytes(originalText)); - return BitConverter.ToString(hash).Replace("-", string.Empty); + var hash = hashAlgorithm.ComputeHash(Encoding.ASCII.GetBytes(originalText)); + return BitConverter.ToString(hash).Replace("-", string.Empty); } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public void set_hash_algorithm(CryptoHashProviderType algorithmType) => SetHashAlgorithm(algorithmType); @@ -170,6 +176,6 @@ private static bool file_is_locked(Exception exception) [Obsolete("This overload is deprecated and will be removed in v3.")] public static string hash_value(string originalText, CryptoHashProviderType providerType) => ComputeStringHash(originalText, providerType); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure/cryptography/DefaultEncryptionUtility.cs b/src/chocolatey/infrastructure/cryptography/DefaultEncryptionUtility.cs index f00f261159..b876295739 100644 --- a/src/chocolatey/infrastructure/cryptography/DefaultEncryptionUtility.cs +++ b/src/chocolatey/infrastructure/cryptography/DefaultEncryptionUtility.cs @@ -14,21 +14,24 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Security.Cryptography; +using System.Text; +using chocolatey.infrastructure.adapters; +using chocolatey.infrastructure.platforms; + namespace chocolatey.infrastructure.cryptography { - using System; - using System.Security.Cryptography; - using System.Text; - using adapters; - using platforms; - public class DefaultEncryptionUtility : IEncryptionUtility { private readonly byte[] _entropyBytes = Encoding.UTF8.GetBytes("Chocolatey"); public string EncryptString(string cleartextValue) { - if (string.IsNullOrWhiteSpace(cleartextValue)) return null; + if (string.IsNullOrWhiteSpace(cleartextValue)) + { + return null; + } var decryptedByteArray = Encoding.UTF8.GetBytes(cleartextValue); byte[] encryptedByteArray; @@ -92,7 +95,7 @@ public string GenerateUniqueToken(string caseInsensitiveKey) return Convert.ToBase64String(hashProvider.CalculateHash(pathBytes)).ToUpperInvariant(); } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public string encrypt_string(string cleartextValue) => EncryptString(cleartextValue); @@ -104,6 +107,6 @@ public string decrypt_string(string encryptedString) [Obsolete("This overload is deprecated and will be removed in v3.")] public string generate_unique_token(string caseInsensitiveKey) => GenerateUniqueToken(caseInsensitiveKey); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure/cryptography/HashConverter.cs b/src/chocolatey/infrastructure/cryptography/HashConverter.cs new file mode 100644 index 0000000000..1a741d6630 --- /dev/null +++ b/src/chocolatey/infrastructure/cryptography/HashConverter.cs @@ -0,0 +1,65 @@ +// Copyright © 2017 - 2021 Chocolatey Software, Inc +// Copyright © 2011 - 2017 RealDimensions Software, LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +using System; + +namespace chocolatey.infrastructure.cryptography +{ + public static class HashConverter + { + public static (string ConvertedHash, CryptoHashProviderType HashType) ConvertHashToHex(string hash) + { + // Sha 1 in base64 + if (hash.Length.Equals(28)) + { + return (BitConverter.ToString(Convert.FromBase64String(hash)).Replace("-", string.Empty), CryptoHashProviderType.Sha1); + } + + // Sha 1 in hex + if (hash.Length.Equals(40)) + { + return (hash, CryptoHashProviderType.Sha1); + } + + // Sha 256 in base64 + if (hash.Length.Equals(44)) + { + return (BitConverter.ToString(Convert.FromBase64String(hash)).Replace("-", string.Empty), CryptoHashProviderType.Sha256); + } + + // Sha 256 in hex + if (hash.Length.Equals(64)) + { + return (hash, CryptoHashProviderType.Sha256); + } + + // Sha 512 in base64 + if (hash.Length.Equals(88)) + { + return (BitConverter.ToString(Convert.FromBase64String(hash)).Replace("-", string.Empty), CryptoHashProviderType.Sha512); + } + + // Sha 512 in hex + if (hash.Length.Equals(128)) + { + return (hash, CryptoHashProviderType.Sha512); + } + + "chocolatey".Log().Warn("Unknown Hash type, Length '{0}', Hash '{1}'".FormatWith(hash, hash.Length)); + return (hash, CryptoHashProviderType.Unknown); + } + } +} diff --git a/src/chocolatey/infrastructure/cryptography/IHashProvider.cs b/src/chocolatey/infrastructure/cryptography/IHashProvider.cs index 16e18175f8..0f86eec0a1 100644 --- a/src/chocolatey/infrastructure/cryptography/IHashProvider.cs +++ b/src/chocolatey/infrastructure/cryptography/IHashProvider.cs @@ -51,7 +51,7 @@ public interface IHashProvider /// A computed hash of the array, based on the contents. string ComputeByteArrayHash(byte[] buffer); -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] void set_hash_algorithm(CryptoHashProviderType algorithmType); @@ -63,6 +63,6 @@ public interface IHashProvider [Obsolete("This overload is deprecated and will be removed in v3.")] string hash_byte_array(byte[] buffer); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure/events/EventManager.cs b/src/chocolatey/infrastructure/events/EventManager.cs index 6323dd5f3e..5b6c862359 100644 --- a/src/chocolatey/infrastructure/events/EventManager.cs +++ b/src/chocolatey/infrastructure/events/EventManager.cs @@ -14,12 +14,12 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.ComponentModel; +using chocolatey.infrastructure.services; + namespace chocolatey.infrastructure.events { - using System; - using System.ComponentModel; - using services; - public static class EventManager { private static Func _messageSubscriptionManager = () => new EventSubscriptionManagerService(); @@ -76,7 +76,7 @@ public static IDisposable Subscribe(Action handleEvent, Action messageSubscriptionManager) => InitializeWith(messageSubscriptionManager); @@ -87,7 +87,7 @@ public static void publish(Event message) where Event : class, IMessage [Obsolete("This overload is deprecated and will be removed in v3.")] public static IDisposable subscribe(Action handleEvent, Action handleError, Func filter) where Event : class, IMessage - => Subscribe(handleEvent,handleError, filter); -#pragma warning restore IDE1006 + => Subscribe(handleEvent, handleError, filter); +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure/extractors/AssemblyFileExtractor.cs b/src/chocolatey/infrastructure/extractors/AssemblyFileExtractor.cs index baec02c18d..ea241d75ee 100644 --- a/src/chocolatey/infrastructure/extractors/AssemblyFileExtractor.cs +++ b/src/chocolatey/infrastructure/extractors/AssemblyFileExtractor.cs @@ -14,16 +14,16 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; +using chocolatey.infrastructure.adapters; +using chocolatey.infrastructure.filesystem; +using chocolatey.infrastructure.tolerance; + namespace chocolatey.infrastructure.extractors { - using System; - using System.Collections.Generic; - using System.IO; - using System.Text; - using adapters; - using filesystem; - using tolerance; - /// /// Extracts resources from an assembly. /// @@ -48,7 +48,7 @@ public static void ExtractTextFileFromAssembly(IFileSystem fileSystem, IAssembly var fileText = assembly.GetManifestString(manifestLocation); if (string.IsNullOrWhiteSpace(fileText)) { - string errorMessage = "Could not find a file in the manifest resource stream of '{0}' at '{1}'.".FormatWith(assembly.FullName, manifestLocation); + var errorMessage = "Could not find a file in the manifest resource stream of '{0}' at '{1}'.".FormatWith(assembly.FullName, manifestLocation); "chocolatey".Log().Error(() => errorMessage); throw new FileNotFoundException(errorMessage); } @@ -78,7 +78,7 @@ public static void ExtractBinaryFileFromAssembly(IFileSystem fileSystem, IAssemb fileSystem.EnsureDirectoryExists(fileSystem.GetDirectoryName(filePath)); fileSystem.WriteFile(filePath, () => assembly.GetManifestStream(manifestLocation)); }, - errorMessage:"Unable to extract binary", + errorMessage: "Unable to extract binary", throwError: throwError, logWarningInsteadOfError: false, logDebugInsteadOfError: !throwError, @@ -113,12 +113,16 @@ public static void ExtractAssemblyResourcesToRelativeDirectory(IFileSystem fileS //var fileLocation = fileSystem.combine_paths("", resourceString.ToString().Split('.')) + resourceName.Substring(fileExtensionLocation); var filePath = fileSystem.CombinePaths(directoryPath, fileLocation); - if (logOutput) "chocolatey".Log().Debug("Unpacking {0} to '{1}'".FormatWith(fileLocation, filePath)); + if (logOutput) + { + "chocolatey".Log().Debug("Unpacking {0} to '{1}'".FormatWith(fileLocation, filePath)); + } + ExtractBinaryFileFromAssembly(fileSystem, assembly, resourceName, filePath, overwriteExisting, throwError); } } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public static void extract_text_file_from_assembly(IFileSystem fileSystem, IAssembly assembly, string manifestLocation, string filePath, bool overwriteExisting = false) => ExtractTextFileFromAssembly(fileSystem, assembly, manifestLocation, filePath, overwriteExisting); @@ -130,6 +134,6 @@ public static void extract_binary_file_from_assembly(IFileSystem fileSystem, IAs [Obsolete("This overload is deprecated and will be removed in v3.")] public static void extract_all_resources_to_relative_directory(IFileSystem fileSystem, IAssembly assembly, string directoryPath, IList relativeDirectories, string resourcesToInclude, bool overwriteExisting = false, bool logOutput = false, bool throwError = true) => ExtractAssemblyResourcesToRelativeDirectory(fileSystem, assembly, directoryPath, relativeDirectories, resourcesToInclude, overwriteExisting, logOutput, throwError); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure/filesystem/DotNetFileSystem.cs b/src/chocolatey/infrastructure/filesystem/DotNetFileSystem.cs index 048cba2866..4f26bf7da6 100644 --- a/src/chocolatey/infrastructure/filesystem/DotNetFileSystem.cs +++ b/src/chocolatey/infrastructure/filesystem/DotNetFileSystem.cs @@ -14,27 +14,27 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices; +using System.Security.AccessControl; +using System.Security.Principal; +using System.Text; +using System.Threading; +using chocolatey.infrastructure.adapters; +using chocolatey.infrastructure.app; +using chocolatey.infrastructure.logging; +using chocolatey.infrastructure.platforms; +using chocolatey.infrastructure.tolerance; +using Assembly = chocolatey.infrastructure.adapters.Assembly; +using Environment = chocolatey.infrastructure.adapters.Environment; + namespace chocolatey.infrastructure.filesystem { - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.Diagnostics; - using System.IO; - using System.Linq; - using System.Runtime.InteropServices; - using System.Security.AccessControl; - using System.Security.Principal; - using System.Text; - using System.Threading; - using adapters; - using app; - using logging; - using platforms; - using tolerance; - using Assembly = adapters.Assembly; - using Environment = adapters.Environment; - /// /// Implementation of IFileSystem for Dot Net /// @@ -75,14 +75,21 @@ public string CombinePaths(string leftItem, params string[] rightItems) { var methodName = string.Empty; var stackFrame = new System.Diagnostics.StackFrame(1); - if (stackFrame != null) methodName = stackFrame.GetMethod().Name; + if (stackFrame != null) + { + methodName = stackFrame.GetMethod().Name; + } + throw new ApplicationException("Path to combine cannot be empty. Tried to combine null with '{0}'.{1}".FormatWith(string.Join(",", rightItems), string.IsNullOrWhiteSpace(methodName) ? string.Empty : " Method called from '{0}'".FormatWith(methodName))); } var combinedPath = Platform.GetPlatform() == PlatformType.Windows ? leftItem : leftItem.Replace('\\', '/'); foreach (var rightItem in rightItems) { - if (rightItem.Contains(":")) throw new ApplicationException("Cannot combine a path with ':' attempted to combine '{0}' with '{1}'".FormatWith(rightItem, combinedPath)); + if (rightItem.Contains(":")) + { + throw new ApplicationException("Cannot combine a path with ':' attempted to combine '{0}' with '{1}'".FormatWith(rightItem, combinedPath)); + } var rightSide = Platform.GetPlatform() == PlatformType.Windows ? rightItem : rightItem.Replace('\\', '/'); if (rightSide.StartsWith(Path.DirectorySeparatorChar.ToStringSafe()) || rightSide.StartsWith(Path.AltDirectorySeparatorChar.ToStringSafe())) @@ -100,7 +107,10 @@ public string CombinePaths(string leftItem, params string[] rightItems) public string GetFullPath(string path) { - if (string.IsNullOrWhiteSpace(path)) return path; + if (string.IsNullOrWhiteSpace(path)) + { + return path; + } try { @@ -136,7 +146,10 @@ public char GetPathSeparator() public string GetExecutablePath(string executableName) { - if (string.IsNullOrWhiteSpace(executableName)) return string.Empty; + if (string.IsNullOrWhiteSpace(executableName)) + { + return string.Empty; + } var isWindows = Platform.GetPlatform() == PlatformType.Windows; IList extensions = new List(); @@ -156,9 +169,11 @@ public string GetExecutablePath(string executableName) // Gets the path to an executable based on looking in current // working directory, next to the running process, then among the // derivatives of Path and Pathext variables, applied in order. - var searchPaths = new List(); - searchPaths.Add(GetCurrentDirectory()); - searchPaths.Add(GetDirectoryName(GetCurrentAssemblyPath())); + var searchPaths = new List + { + GetCurrentDirectory(), + GetDirectoryName(GetCurrentAssemblyPath()) + }; searchPaths.AddRange(Environment.GetEnvironmentVariable(ApplicationParameters.Environment.Path).ToStringSafe().Split(new[] { GetPathSeparator() }, StringSplitOptions.RemoveEmptyEntries)); foreach (var path in searchPaths.OrEmpty()) @@ -166,7 +181,10 @@ public string GetExecutablePath(string executableName) foreach (var extension in extensions.OrEmpty()) { var possiblePath = CombinePaths(path, "{0}{1}".FormatWith(executableName, extension.ToLowerSafe())); - if (FileExists(possiblePath)) return possiblePath; + if (FileExists(possiblePath)) + { + return possiblePath; + } } } @@ -186,7 +204,11 @@ public string GetCurrentAssemblyPath() public IEnumerable GetFiles(string directoryPath, string pattern = "*.*", SearchOption option = SearchOption.TopDirectoryOnly) { - if (string.IsNullOrWhiteSpace(directoryPath)) return new List(); + if (string.IsNullOrWhiteSpace(directoryPath)) + { + return new List(); + } + if (!DirectoryExists(directoryPath)) { this.Log().Warn("Directory '{0}' does not exist.".FormatWith(directoryPath)); @@ -198,7 +220,10 @@ public IEnumerable GetFiles(string directoryPath, string pattern = "*.*" public IEnumerable GetFiles(string directoryPath, string[] extensions, SearchOption option = SearchOption.TopDirectoryOnly) { - if (string.IsNullOrWhiteSpace(directoryPath)) return new List(); + if (string.IsNullOrWhiteSpace(directoryPath)) + { + return new List(); + } return Directory.EnumerateFiles(directoryPath, "*.*", option) .Where(f => extensions.Any(x => f.EndsWith(x, StringComparison.OrdinalIgnoreCase))); @@ -223,14 +248,20 @@ public string GetFileName(string filePath) public string GetFilenameWithoutExtension(string filePath) { - if (Platform.GetPlatform() == PlatformType.Windows) return Path.GetFileNameWithoutExtension(filePath); + if (Platform.GetPlatform() == PlatformType.Windows) + { + return Path.GetFileNameWithoutExtension(filePath); + } return Path.GetFileNameWithoutExtension(filePath.Replace('\\', '/')); } public string GetFileExtension(string filePath) { - if (Platform.GetPlatform() == PlatformType.Windows) return Path.GetExtension(filePath); + if (Platform.GetPlatform() == PlatformType.Windows) + { + return Path.GetExtension(filePath); + } return Path.GetExtension(filePath.Replace('\\', '/')); } @@ -340,7 +371,7 @@ public void MoveFile(string filePath, string newFilePath) { MoveFile(filePath, newFilePath, isSilent: false); } - + public void MoveFile(string filePath, string newFilePath, bool isSilent) { EnsureDirectoryExists(GetDirectoryName(newFilePath), ignoreError: true); @@ -396,7 +427,7 @@ public bool CopyFileUnsafe(string sourceFilePath, string destinationFilePath, bo EnsureDirectoryExists(GetDirectoryName(destinationFilePath), ignoreError: true); //Private Declare Function apiCopyFile Lib "kernel32" Alias "CopyFileA" _ - int success = CopyFileW(sourceFilePath, destinationFilePath, overwriteExisting ? 0 : 1); + var success = CopyFileW(sourceFilePath, destinationFilePath, overwriteExisting ? 0 : 1); //if (success == 0) //{ // var error = Marshal.GetLastWin32Error(); @@ -578,14 +609,20 @@ public string GetCurrentDirectory() public IEnumerable GetDirectories(string directoryPath) { - if (!DirectoryExists(directoryPath)) return new List(); + if (!DirectoryExists(directoryPath)) + { + return new List(); + } return Directory.EnumerateDirectories(directoryPath); } public IEnumerable GetDirectories(string directoryPath, string pattern, SearchOption option = SearchOption.TopDirectoryOnly) { - if (!DirectoryExists(directoryPath)) return new List(); + if (!DirectoryExists(directoryPath)) + { + return new List(); + } return Directory.EnumerateDirectories(directoryPath, pattern, option); } @@ -658,11 +695,17 @@ public void MoveDirectory(string directoryPath, string newDirectoryPath) public void MoveDirectory(string directoryPath, string newDirectoryPath, bool useFileMoveFallback, bool isSilent) { - if (string.IsNullOrWhiteSpace(directoryPath) || string.IsNullOrWhiteSpace(newDirectoryPath)) throw new ApplicationException("You must provide a directory to move from or to."); + if (string.IsNullOrWhiteSpace(directoryPath) || string.IsNullOrWhiteSpace(newDirectoryPath)) + { + throw new ApplicationException("You must provide a directory to move from or to."); + } // Linux / macOS do not have a SystemDrive environment variable, instead, everything is under "/" var systemDrive = Platform.GetPlatform() == PlatformType.Windows ? Environment.GetEnvironmentVariable("SystemDrive") : "/"; - if (CombinePaths(directoryPath, "").IsEqualTo(CombinePaths(systemDrive, ""))) throw new ApplicationException("Cannot move or delete the root of the system drive"); + if (CombinePaths(directoryPath, "").IsEqualTo(CombinePaths(systemDrive, ""))) + { + throw new ApplicationException("Cannot move or delete the root of the system drive"); + } try { @@ -694,7 +737,10 @@ public void MoveDirectory(string directoryPath, string newDirectoryPath, bool us foreach (var file in GetFiles(directoryPath, "*.*", SearchOption.AllDirectories).OrEmpty()) { var destinationFile = file.Replace(directoryPath, newDirectoryPath); - if (FileExists(destinationFile)) DeleteFile(destinationFile, isSilent); + if (FileExists(destinationFile)) + { + DeleteFile(destinationFile, isSilent); + } EnsureDirectoryExists(GetDirectoryName(destinationFile), ignoreError: true); this.Log().Debug(ChocolateyLoggers.Verbose, "Moving '{0}'{1} to '{2}'".FormatWith(file, Environment.NewLine, destinationFile)); @@ -723,8 +769,8 @@ public void CopyDirectory(string sourceDirectoryPath, string destinationDirector { var destinationFile = file.Replace(sourceDirectoryPath, destinationDirectoryPath); EnsureDirectoryExists(GetDirectoryName(destinationFile), ignoreError: true); - //this.Log().Debug(ChocolateyLoggers.Verbose, "Copying '{0}' {1} to '{2}'".format_with(file, Environment.NewLine, destinationFile)); - + //this.Log().Debug(ChocolateyLoggers.Verbose, "Copying '{0}' {1} to '{2}'".FormatWith(file, Environment.NewLine, destinationFile)); + try { CopyFile(file, destinationFile, overwriteExisting, isSilent); @@ -903,11 +949,17 @@ public void DeleteDirectory(string directoryPath, bool recursive, bool overrideA public void DeleteDirectory(string directoryPath, bool recursive, bool overrideAttributes, bool isSilent) { - if (string.IsNullOrWhiteSpace(directoryPath)) throw new ApplicationException("You must provide a directory to delete."); + if (string.IsNullOrWhiteSpace(directoryPath)) + { + throw new ApplicationException("You must provide a directory to delete."); + } // Linux / macOS do not have a SystemDrive environment variable, instead, everything is under "/" var systemDrive = Platform.GetPlatform() == PlatformType.Windows ? Environment.GetEnvironmentVariable("SystemDrive") : "/"; - if (CombinePaths(directoryPath, "").IsEqualTo(CombinePaths(systemDrive, ""))) throw new ApplicationException("Cannot move or delete the root of the system drive"); + if (CombinePaths(directoryPath, "").IsEqualTo(CombinePaths(systemDrive, ""))) + { + throw new ApplicationException("Cannot move or delete the root of the system drive"); + } if (overrideAttributes) { @@ -916,13 +968,28 @@ public void DeleteDirectory(string directoryPath, bool recursive, bool overrideA var filePath = GetFullPath(file); var fileInfo = GetFileInfoFor(filePath); - if (IsSystemFile(fileInfo)) EnsureFileAttributeRemoved(filePath, FileAttributes.System); - if (IsReadOnlyFile(fileInfo)) EnsureFileAttributeRemoved(filePath, FileAttributes.ReadOnly); - if (IsHiddenFile(fileInfo)) EnsureFileAttributeRemoved(filePath, FileAttributes.Hidden); + if (IsSystemFile(fileInfo)) + { + EnsureFileAttributeRemoved(filePath, FileAttributes.System); + } + + if (IsReadOnlyFile(fileInfo)) + { + EnsureFileAttributeRemoved(filePath, FileAttributes.ReadOnly); + } + + if (IsHiddenFile(fileInfo)) + { + EnsureFileAttributeRemoved(filePath, FileAttributes.Hidden); + } } } - if (!isSilent) this.Log().Debug(ChocolateyLoggers.Verbose, () => "Attempting to delete directory \"{0}\".".FormatWith(GetFullPath(directoryPath))); + if (!isSilent) + { + this.Log().Debug(ChocolateyLoggers.Verbose, () => "Attempting to delete directory \"{0}\".".FormatWith(GetFullPath(directoryPath))); + } + AllowRetries( () => { @@ -1018,10 +1085,22 @@ public Encoding GetFileEncoding(string filePath) file.Read(buffer, 0, 5); file.Close(); - if (buffer[0] == 0xef && buffer[1] == 0xbb && buffer[2] == 0xbf) enc = Encoding.UTF8; - else if (buffer[0] == 0xfe && buffer[1] == 0xff) enc = Encoding.Unicode; - else if (buffer[0] == 0 && buffer[1] == 0 && buffer[2] == 0xfe && buffer[3] == 0xff) enc = Encoding.UTF32; - else if (buffer[0] == 0x2b && buffer[1] == 0x2f && buffer[2] == 0x76) enc = Encoding.UTF7; + if (buffer[0] == 0xef && buffer[1] == 0xbb && buffer[2] == 0xbf) + { + enc = Encoding.UTF8; + } + else if (buffer[0] == 0xfe && buffer[1] == 0xff) + { + enc = Encoding.Unicode; + } + else if (buffer[0] == 0 && buffer[1] == 0 && buffer[2] == 0xfe && buffer[3] == 0xff) + { + enc = Encoding.UTF32; + } + else if (buffer[0] == 0x2b && buffer[1] == 0x2f && buffer[2] == 0x76) + { + enc = Encoding.UTF7; + } //assume xml is utf8 //if (enc == Encoding.Default && get_file_extension(filePath).is_equal_to(".xml")) enc = Encoding.UTF8; @@ -1030,7 +1109,7 @@ public Encoding GetFileEncoding(string filePath) } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public void initialize_with(Lazy environment) => InitializeWith(environment); @@ -1077,7 +1156,7 @@ public bool file_exists(string filePath) [Obsolete("This overload is deprecated and will be removed in v3.")] public string get_file_name(string filePath) - => GetFileName( filePath); + => GetFileName(filePath); [Obsolete("This overload is deprecated and will be removed in v3.")] public string get_file_name_without_extension(string filePath) @@ -1258,6 +1337,6 @@ public void ensure_file_attribute_removed(string path, FileAttributes attributes [Obsolete("This overload is deprecated and will be removed in v3.")] public Encoding get_file_encoding(string filePath) => GetFileEncoding(filePath); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure/filesystem/FileSystem.cs b/src/chocolatey/infrastructure/filesystem/FileSystem.cs index e628c82348..30eae25b0c 100644 --- a/src/chocolatey/infrastructure/filesystem/FileSystem.cs +++ b/src/chocolatey/infrastructure/filesystem/FileSystem.cs @@ -14,19 +14,19 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.IO; + namespace chocolatey.infrastructure.filesystem { - using System; - using System.IO; - public static class FileSystem { public static byte[] ReadFileBytes(string filePath) { byte[] fileBytes = null; - using (FileStream fs = new FileStream(filePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) + using (var fs = new FileStream(filePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) { - using (BinaryReader binaryReader = new BinaryReader(fs)) + using (var binaryReader = new BinaryReader(fs)) { fileBytes = binaryReader.ReadBytes((int)fs.Length); } @@ -35,10 +35,10 @@ public static byte[] ReadFileBytes(string filePath) return fileBytes; } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public static byte[] read_binary_file_into_byte_array(string filePath) => ReadFileBytes(filePath); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure/filesystem/IFileSystem.cs b/src/chocolatey/infrastructure/filesystem/IFileSystem.cs index 34c36c8de3..982b3d5dd3 100644 --- a/src/chocolatey/infrastructure/filesystem/IFileSystem.cs +++ b/src/chocolatey/infrastructure/filesystem/IFileSystem.cs @@ -14,13 +14,13 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; + namespace chocolatey.infrastructure.filesystem { - using System; - using System.Collections.Generic; - using System.IO; - using System.Text; - /// /// File System Interface /// @@ -465,7 +465,7 @@ public interface IFileSystem void EnsureFileAttributeRemoved(string path, FileAttributes attributes); -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] string combine_paths(string leftItem, params string[] rightItems); @@ -624,6 +624,6 @@ public interface IFileSystem [Obsolete("This overload is deprecated and will be removed in v3.")] void ensure_file_attribute_removed(string path, FileAttributes attributes); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure/guards/Ensure.cs b/src/chocolatey/infrastructure/guards/Ensure.cs index de4409afb9..e6f56efe3b 100644 --- a/src/chocolatey/infrastructure/guards/Ensure.cs +++ b/src/chocolatey/infrastructure/guards/Ensure.cs @@ -14,12 +14,12 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.IO; +using System.Linq.Expressions; + namespace chocolatey.infrastructure.guards { - using System; - using System.IO; - using System.Linq.Expressions; - public static class Ensure { public static EnsureString That(Expression> expression) @@ -38,10 +38,14 @@ public static Ensure That(Expression> expression) => That(expression); @@ -66,7 +70,7 @@ public static EnsureString that(Expression> expression) [Obsolete("This overload is deprecated and will be removed in v3.")] public static Ensure that(Expression> expression) where TypeToEnsure : class => That(expression); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } public class EnsureString : Ensure @@ -102,7 +106,7 @@ public EnsureString HasExtension(params string[] extensions) throw new ArgumentException(Name, "Value for {0} must contain one of the following extensions: {1}".FormatWith(Name, string.Join(", ", extensions))); } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public EnsureString is_not_null_or_whitespace() => NotNullOrWhitespace(); @@ -110,7 +114,7 @@ public EnsureString is_not_null_or_whitespace() [Obsolete("This overload is deprecated and will be removed in v3.")] public EnsureString has_any_extension(params string[] extensions) => HasExtension(extensions); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } public class Ensure where EnsurableType : class @@ -142,7 +146,7 @@ public void Meets(Func ensureFunction, Action NotNull(); @@ -150,6 +154,6 @@ public void is_not_null() [Obsolete("This overload is deprecated and will be removed in v3.")] public void meets(Func ensureFunction, Action exceptionAction) => Meets(ensureFunction, exceptionAction); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure/information/ExtensionInformation.cs b/src/chocolatey/infrastructure/information/ExtensionInformation.cs index a55c0fabd2..25dd40c4fa 100644 --- a/src/chocolatey/infrastructure/information/ExtensionInformation.cs +++ b/src/chocolatey/infrastructure/information/ExtensionInformation.cs @@ -14,11 +14,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System.Collections.Generic; +using chocolatey.infrastructure.adapters; + namespace chocolatey.infrastructure.information { - using System.Collections.Generic; - using chocolatey.infrastructure.adapters; - public class ExtensionInformation { public ExtensionInformation(IAssembly assembly) @@ -36,8 +36,8 @@ public ExtensionInformation(IAssembly assembly) public override bool Equals(object obj) { - ExtensionInformation information = obj as ExtensionInformation; - return !ReferenceEquals(information, null) && + var information = obj as ExtensionInformation; + return information is object && Name == information.Name && Version == information.Version; } @@ -47,7 +47,7 @@ public override int GetHashCode() // We do this in an uncheched statement so there won't be any arithmetic exceptions unchecked { - int hashCode = 14; + var hashCode = 14; hashCode = (hashCode * 6) + EqualityComparer.Default.GetHashCode(Name) + EqualityComparer.Default.GetHashCode(Version); diff --git a/src/chocolatey/infrastructure/information/ProcessInformation.cs b/src/chocolatey/infrastructure/information/ProcessInformation.cs index e70e1b253e..bb6dfb9935 100644 --- a/src/chocolatey/infrastructure/information/ProcessInformation.cs +++ b/src/chocolatey/infrastructure/information/ProcessInformation.cs @@ -14,18 +14,21 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Runtime.InteropServices; +using System.Security.Principal; +using chocolatey.infrastructure.platforms; + namespace chocolatey.infrastructure.information { - using System; - using System.Runtime.InteropServices; - using System.Security.Principal; - using platforms; - public sealed class ProcessInformation { public static bool UserIsAdministrator() { - if (Platform.GetPlatform() != PlatformType.Windows) return false; + if (Platform.GetPlatform() != PlatformType.Windows) + { + return false; + } var isAdmin = false; @@ -38,7 +41,10 @@ public static bool UserIsAdministrator() // Any version of Windows less than 6 does not have UAC // so bail with the answer from the above check - if (Platform.GetVersion().Major < 6) return isAdmin; + if (Platform.GetVersion().Major < 6) + { + return isAdmin; + } if (!isAdmin) { @@ -63,7 +69,7 @@ public static bool UserIsAdministrator() "chocolatey".Log().Debug(@"User may be subject to UAC, checking for a split token (not 100% effective)."); - int tokenInfLength = Marshal.SizeOf(typeof(int)); + var tokenInfLength = Marshal.SizeOf(typeof(int)); IntPtr tokenInformation = Marshal.AllocHGlobal(tokenInfLength); try @@ -74,7 +80,10 @@ public static bool UserIsAdministrator() if (!successfulCall) { "chocolatey".Log().Warn("Error during native GetTokenInformation call - {0}".FormatWith(Marshal.GetLastWin32Error())); - if (tokenInformation != IntPtr.Zero) Marshal.FreeHGlobal(tokenInformation); + if (tokenInformation != IntPtr.Zero) + { + Marshal.FreeHGlobal(tokenInformation); + } } var elevationType = (TokenElevationType)Marshal.ReadInt32(tokenInformation); @@ -91,7 +100,10 @@ public static bool UserIsAdministrator() } finally { - if (tokenInformation != IntPtr.Zero) Marshal.FreeHGlobal(tokenInformation); + if (tokenInformation != IntPtr.Zero) + { + Marshal.FreeHGlobal(tokenInformation); + } } } } @@ -102,7 +114,10 @@ public static bool UserIsAdministrator() public static bool IsElevated() { - if (Platform.GetPlatform() != PlatformType.Windows) return false; + if (Platform.GetPlatform() != PlatformType.Windows) + { + return false; + } using (var identity = WindowsIdentity.GetCurrent(TokenAccessLevels.Query | TokenAccessLevels.Duplicate)) { @@ -128,7 +143,10 @@ public static bool UserIsRemote() public static bool UserIsSystem() { - if (Platform.GetPlatform() != PlatformType.Windows) return false; + if (Platform.GetPlatform() != PlatformType.Windows) + { + return false; + } var isSystem = false; @@ -183,7 +201,7 @@ _Out_ PDWORD ReturnLength /// Passed to to specify what /// information about the token to return. /// - enum TokenInformationType + private enum TokenInformationType { TokenUser = 1, TokenGroups, @@ -219,14 +237,14 @@ enum TokenInformationType /// /// The elevation type for a user token. /// - enum TokenElevationType + private enum TokenElevationType { TokenElevationTypeDefault = 1, TokenElevationTypeFull, TokenElevationTypeLimited } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public static bool user_is_administrator() => UserIsAdministrator(); @@ -246,6 +264,6 @@ public static bool user_is_remote() [Obsolete("This overload is deprecated and will be removed in v3.")] public static bool user_is_system() => UserIsSystem(); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure/information/VersionInformation.cs b/src/chocolatey/infrastructure/information/VersionInformation.cs index 3c5b52960e..95bc67e7a9 100644 --- a/src/chocolatey/infrastructure/information/VersionInformation.cs +++ b/src/chocolatey/infrastructure/information/VersionInformation.cs @@ -14,19 +14,23 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Diagnostics; +using chocolatey.infrastructure.adapters; + namespace chocolatey.infrastructure.information { - using System; - using System.Diagnostics; - using adapters; - public sealed class VersionInformation { public static string GetCurrentAssemblyVersion(IAssembly assembly = null) { string version = null; - if (assembly == null) assembly = Assembly.GetExecutingAssembly(); - string location = assembly != null ? assembly.Location : string.Empty; + if (assembly == null) + { + assembly = Assembly.GetExecutingAssembly(); + } + + var location = assembly != null ? assembly.Location : string.Empty; if (!string.IsNullOrEmpty(location)) { @@ -35,7 +39,7 @@ public static string GetCurrentAssemblyVersion(IAssembly assembly = null) if (string.IsNullOrEmpty(version)) { - var attributes= assembly.UnderlyingType.GetCustomAttributesData(); + var attributes = assembly.UnderlyingType.GetCustomAttributesData(); foreach (var attribute in attributes) { if (attribute.ToStringSafe().Contains("AssemblyFileVersion")) @@ -52,8 +56,12 @@ public static string GetCurrentAssemblyVersion(IAssembly assembly = null) public static string GetCurrentInformationalVersion(IAssembly assembly = null) { string version = null; - if (assembly == null) assembly = Assembly.GetExecutingAssembly(); - string location = assembly != null ? assembly.Location : string.Empty; + if (assembly == null) + { + assembly = Assembly.GetExecutingAssembly(); + } + + var location = assembly != null ? assembly.Location : string.Empty; if (!string.IsNullOrEmpty(location)) { @@ -78,7 +86,10 @@ public static string GetCurrentInformationalVersion(IAssembly assembly = null) public static string GetMinimumChocolateyVersion(IAssembly assembly = null) { - if (assembly == null) assembly = Assembly.GetExecutingAssembly(); + if (assembly == null) + { + assembly = Assembly.GetExecutingAssembly(); + } var attributeData = assembly.UnderlyingType.GetCustomAttributesData(); foreach (var attribute in attributeData) @@ -95,7 +106,7 @@ public static string GetMinimumChocolateyVersion(IAssembly assembly = null) return "1.0.0"; } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public static string get_current_assembly_version(IAssembly assembly = null) => GetCurrentAssemblyVersion(assembly = null); @@ -107,6 +118,6 @@ public static string get_current_informational_version(IAssembly assembly = null [Obsolete("This overload is deprecated and will be removed in v3.")] public static string get_minimum_chocolatey_version(IAssembly assembly = null) => GetMinimumChocolateyVersion(assembly); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure/licensing/ChocolateyLicense.cs b/src/chocolatey/infrastructure/licensing/ChocolateyLicense.cs index 65c4851616..5c77cacbf9 100644 --- a/src/chocolatey/infrastructure/licensing/ChocolateyLicense.cs +++ b/src/chocolatey/infrastructure/licensing/ChocolateyLicense.cs @@ -14,12 +14,12 @@ // See the License for the specific language governing permissions and // limitations under the License. +using chocolatey.infrastructure.adapters; +using System; +using DateTime = System.DateTime; + namespace chocolatey.infrastructure.licensing { - using adapters; - using System; - using DateTime = System.DateTime; - public sealed class ChocolateyLicense { public string Id { get; set; } @@ -42,10 +42,10 @@ public bool IsLicensedVersion() ; } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public bool is_licensed_version() => IsLicensedVersion(); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure/licensing/License.cs b/src/chocolatey/infrastructure/licensing/License.cs index f6fe5090a1..2ae5585f51 100644 --- a/src/chocolatey/infrastructure/licensing/License.cs +++ b/src/chocolatey/infrastructure/licensing/License.cs @@ -14,14 +14,14 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using chocolatey.infrastructure.app; +using chocolatey.infrastructure.information; +using chocolatey.infrastructure.logging; +using chocolatey.infrastructure.registration; + namespace chocolatey.infrastructure.licensing { - using System; - using app; - using information; - using logging; - using registration; - public static class License { public static ChocolateyLicense ValidateLicense() @@ -88,10 +88,10 @@ public static ChocolateyLicense ValidateLicense() return license; } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public static ChocolateyLicense validate_license() => ValidateLicense(); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure/licensing/LicenseValidation.cs b/src/chocolatey/infrastructure/licensing/LicenseValidation.cs index fe30004b5f..40bf783fa2 100644 --- a/src/chocolatey/infrastructure/licensing/LicenseValidation.cs +++ b/src/chocolatey/infrastructure/licensing/LicenseValidation.cs @@ -14,14 +14,14 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.IO; +using chocolatey.infrastructure.app; +using chocolatey.infrastructure.logging; +using Rhino.Licensing; + namespace chocolatey.infrastructure.licensing { - using System; - using System.IO; - using app; - using logging; - using Rhino.Licensing; - public sealed class LicenseValidation { private const string PublicKey = @@ -37,9 +37,12 @@ public static ChocolateyLicense Validate() var regularLogOutput = ShouldLogErrorsToConsole(); - string licenseFile = ApplicationParameters.LicenseFileLocation; + var licenseFile = ApplicationParameters.LicenseFileLocation; var userLicenseFile = ApplicationParameters.UserLicenseFileLocation; - if (File.Exists(userLicenseFile)) licenseFile = userLicenseFile; + if (File.Exists(userLicenseFile)) + { + licenseFile = userLicenseFile; + } // no IFileSystem at this point if (!File.Exists(licenseFile)) @@ -55,7 +58,7 @@ public static ChocolateyLicense Validate() { "chocolatey".Log().Error(regularLogOutput ? ChocolateyLoggers.Normal : ChocolateyLoggers.LogFileOnly, @"Files found in directory '{0}' but not a valid license file. License should be named '{1}'.".FormatWith(licenseDirectory, licenseFileName)); - "chocolatey".Log().Warn(ChocolateyLoggers.Important,@" Rename license file to '{0}' to allow commercial features.".FormatWith(licenseFileName)); + "chocolatey".Log().Warn(ChocolateyLoggers.Important, @" Rename license file to '{0}' to allow commercial features.".FormatWith(licenseFileName)); } } @@ -139,18 +142,24 @@ private static bool ShouldLogErrorsToConsole() { var args = Environment.GetCommandLineArgs(); // I think this check is incorrect??? if --version is supposed to return false, it can return true at this point? - if (args == null || args.Length < 2) return true; + if (args == null || args.Length < 2) + { + return true; + } var firstArg = args[1].ToStringSafe(); - if (firstArg.IsEqualTo("-v") || firstArg.IsEqualTo("--version")) return false; + if (firstArg.IsEqualTo("-v") || firstArg.IsEqualTo("--version")) + { + return false; + } return true; } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public static ChocolateyLicense validate() => Validate(); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure/logging/AggregateLog.cs b/src/chocolatey/infrastructure/logging/AggregateLog.cs index 87b7d0c4dd..76580dbdd5 100644 --- a/src/chocolatey/infrastructure/logging/AggregateLog.cs +++ b/src/chocolatey/infrastructure/logging/AggregateLog.cs @@ -14,11 +14,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; + namespace chocolatey.infrastructure.logging { - using System; - using System.Collections.Generic; - public sealed class AggregateLog : ILog, ILog { public IEnumerable Loggers { get; private set; } diff --git a/src/chocolatey/infrastructure/logging/ILog.cs b/src/chocolatey/infrastructure/logging/ILog.cs index babfcf270d..e53645932b 100644 --- a/src/chocolatey/infrastructure/logging/ILog.cs +++ b/src/chocolatey/infrastructure/logging/ILog.cs @@ -14,10 +14,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; + namespace chocolatey.infrastructure.logging { - using System; - /// /// Custom interface for logging messages /// diff --git a/src/chocolatey/infrastructure/logging/Log.cs b/src/chocolatey/infrastructure/logging/Log.cs index 2a4b9f1e12..12f9ece27a 100644 --- a/src/chocolatey/infrastructure/logging/Log.cs +++ b/src/chocolatey/infrastructure/logging/Log.cs @@ -14,16 +14,16 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; + namespace chocolatey.infrastructure.logging { - using System; - /// /// Logger type initialization /// public static class Log { - private static Type _logType = typeof (NullLog); + private static Type _logType = typeof(NullLog); private static ILog _logger; /// @@ -33,8 +33,11 @@ public static class Log /// Should other loggers be reset? public static void InitializeWith(bool resetLoggers = true) where T : ILog, new() { - _logType = typeof (T); - if (resetLoggers) LogExtensions.ResetLoggers(); + _logType = typeof(T); + if (resetLoggers) + { + LogExtensions.ResetLoggers(); + } } /// @@ -47,7 +50,10 @@ public static void InitializeWith(ILog loggerType, bool resetLoggers = true) { _logType = loggerType.GetType(); _logger = loggerType; - if (resetLoggers) LogExtensions.ResetLoggers(); + if (resetLoggers) + { + LogExtensions.ResetLoggers(); + } } /// diff --git a/src/chocolatey/infrastructure/logging/Log4NetAppenderConfiguration.cs b/src/chocolatey/infrastructure/logging/Log4NetAppenderConfiguration.cs index 2110f19989..40b59a74f1 100644 --- a/src/chocolatey/infrastructure/logging/Log4NetAppenderConfiguration.cs +++ b/src/chocolatey/infrastructure/logging/Log4NetAppenderConfiguration.cs @@ -14,26 +14,26 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.IO; +using System.Linq; +using chocolatey.infrastructure.adapters; +using chocolatey.infrastructure.app; +using log4net; +using log4net.Appender; +using log4net.Config; +using log4net.Core; +using log4net.Filter; +using log4net.Layout; +using log4net.Repository; +using log4net.Repository.Hierarchy; +using chocolatey.infrastructure.platforms; +using Console = chocolatey.infrastructure.adapters.Console; + namespace chocolatey.infrastructure.logging { - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.IO; - using System.Linq; - using adapters; - using app; - using log4net; - using log4net.Appender; - using log4net.Config; - using log4net.Core; - using log4net.Filter; - using log4net.Layout; - using log4net.Repository; - using log4net.Repository.Hierarchy; - using platforms; - using Console = adapters.Console; - public sealed class Log4NetAppenderConfiguration { private static readonly log4net.ILog _logger = LogManager.GetLogger(typeof(Log4NetAppenderConfiguration)); @@ -208,30 +208,33 @@ private static void ConfigureLoggingInfoColors() /// Loggers, such as a trace logger, to exclude from file appender. private static void SetFileAppender(string outputDirectory, params string[] excludeLoggerNames) { - if (excludeLoggerNames == null) excludeLoggerNames = new string[] {}; + if (excludeLoggerNames == null) + { + excludeLoggerNames = new string[] { }; + } if (!_alreadyConfiguredFileAppender) { _alreadyConfiguredFileAppender = true; var layout = new PatternLayout - { - ConversionPattern = "%date %property{pid} [%-5level] - %message%newline" - }; + { + ConversionPattern = "%date %property{pid} [%-5level] - %message%newline" + }; layout.ActivateOptions(); var app = new RollingFileAppender - { - Name = "{0}.changes.log.appender".FormatWith(ApplicationParameters.Name), - File = Path.Combine(Path.GetFullPath(outputDirectory), ApplicationParameters.LoggingFile), - Layout = layout, - AppendToFile = true, - RollingStyle = RollingFileAppender.RollingMode.Size, - MaxFileSize = 1024 * 1024 * 10, - MaxSizeRollBackups = 50, - LockingModel = new FileAppender.MinimalLock(), - PreserveLogFileNameExtension = true, - }; + { + Name = "{0}.changes.log.appender".FormatWith(ApplicationParameters.Name), + File = Path.Combine(Path.GetFullPath(outputDirectory), ApplicationParameters.LoggingFile), + Layout = layout, + AppendToFile = true, + RollingStyle = RollingFileAppender.RollingMode.Size, + MaxFileSize = 1024 * 1024 * 10, + MaxSizeRollBackups = 50, + LockingModel = new FileAppender.MinimalLock(), + PreserveLogFileNameExtension = true, + }; app.ActivateOptions(); var infoOnlyAppender = new RollingFileAppender @@ -271,7 +274,10 @@ private static void SetFileAppender(string outputDirectory, params string[] excl /// Appenders, such as a verbose console appender, to exclude from debug. public static void EnableDebugLoggingIf(bool enableDebug, params string[] excludeAppenderNames) { - if (excludeAppenderNames == null) excludeAppenderNames = new string[] { }; + if (excludeAppenderNames == null) + { + excludeAppenderNames = new string[] { }; + } if (enableDebug) { @@ -350,7 +356,10 @@ public static void EnableTraceLoggingIf(bool enableTrace, string traceLoggerName appender.AddFilter(new log4net.Filter.LevelRangeFilter { LevelMin = minLevel, LevelMax = Level.Fatal }); } - if (appender != null && appender.GetType() == typeof(RollingFileAppender)) fileAppenders.Add(appender); + if (appender != null && appender.GetType() == typeof(RollingFileAppender)) + { + fileAppenders.Add(appender); + } } foreach (ILogger log in logRepository.GetCurrentLoggers().Where(l => l.Name.IsEqualTo("Trace")).OrEmpty()) @@ -384,11 +393,18 @@ public static void EnableTraceLoggingIf(bool enableTrace, string traceLoggerName public static void SetupAdditionalLogFile(string logFileLocation) { - if (string.IsNullOrWhiteSpace(logFileLocation)) return; + if (string.IsNullOrWhiteSpace(logFileLocation)) + { + return; + } var logDirectory = Path.GetDirectoryName(logFileLocation); var logFileName = Path.GetFileNameWithoutExtension(logFileLocation); - if (!string.IsNullOrWhiteSpace(logDirectory) && !Directory.Exists(logDirectory)) Directory.CreateDirectory(logDirectory); + if (!string.IsNullOrWhiteSpace(logDirectory) && !Directory.Exists(logDirectory)) + { + Directory.CreateDirectory(logDirectory); + } + var layout = new PatternLayout { ConversionPattern = "%date %property{pid} [%-5level] - %message%newline" @@ -416,7 +432,7 @@ public static void SetupAdditionalLogFile(string logFileLocation) } } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public static void initialize_with(Lazy console) => InitializeWith(console); @@ -440,6 +456,6 @@ public static void set_trace_logger_when_trace(bool enableTrace, string traceLog [Obsolete("This overload is deprecated and will be removed in v3.")] public static void configure_additional_log_file(string logFileLocation) => SetupAdditionalLogFile(logFileLocation); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure/logging/Log4NetLog.cs b/src/chocolatey/infrastructure/logging/Log4NetLog.cs index c1ad0153c2..4573093e3f 100644 --- a/src/chocolatey/infrastructure/logging/Log4NetLog.cs +++ b/src/chocolatey/infrastructure/logging/Log4NetLog.cs @@ -15,16 +15,15 @@ // limitations under the License. using log4net.Config; +using System; +using System.Runtime; +using log4net; +using log4net.Core; [assembly: XmlConfigurator(Watch = true)] namespace chocolatey.infrastructure.logging { - using System; - using System.Runtime; - using log4net; - using log4net.Core; - /// /// Log4net logger implementing special ILog class /// @@ -43,37 +42,55 @@ public void InitializeFor(string loggerName) [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] public void Debug(string message, params object[] formatting) { - if (_logger.IsDebugEnabled) Log(Level.Debug, DecorateMessageWithAuditInformation(message), formatting); + if (_logger.IsDebugEnabled) + { + Log(Level.Debug, DecorateMessageWithAuditInformation(message), formatting); + } } [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] public void Debug(Func message) { - if (_logger.IsDebugEnabled) Log(Level.Debug, DecorateMessageWithAuditInformation(message.Invoke()).EscapeCurlyBraces()); + if (_logger.IsDebugEnabled) + { + Log(Level.Debug, DecorateMessageWithAuditInformation(message.Invoke()).EscapeCurlyBraces()); + } } [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] public void Info(string message, params object[] formatting) { - if (_logger.IsInfoEnabled) Log(Level.Info, DecorateMessageWithAuditInformation(message), formatting); + if (_logger.IsInfoEnabled) + { + Log(Level.Info, DecorateMessageWithAuditInformation(message), formatting); + } } [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] public void Info(Func message) { - if (_logger.IsInfoEnabled) Log(Level.Info, DecorateMessageWithAuditInformation(message.Invoke()).EscapeCurlyBraces()); + if (_logger.IsInfoEnabled) + { + Log(Level.Info, DecorateMessageWithAuditInformation(message.Invoke()).EscapeCurlyBraces()); + } } [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] public void Warn(string message, params object[] formatting) { - if (_logger.IsWarnEnabled) Log(Level.Warn, DecorateMessageWithAuditInformation(message), formatting); + if (_logger.IsWarnEnabled) + { + Log(Level.Warn, DecorateMessageWithAuditInformation(message), formatting); + } } [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] public void Warn(Func message) { - if (_logger.IsWarnEnabled) Log(Level.Warn, DecorateMessageWithAuditInformation(message.Invoke()).EscapeCurlyBraces()); + if (_logger.IsWarnEnabled) + { + Log(Level.Warn, DecorateMessageWithAuditInformation(message.Invoke()).EscapeCurlyBraces()); + } } [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] @@ -116,10 +133,10 @@ private void Log(Level level, string message, params object[] formatting) _logger.Logger.Log(_declaringType, level, message.FormatWith(formatting), null); } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public string decorate_message_with_audit_information(string message) => DecorateMessageWithAuditInformation(message); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure/logging/LogSinkLog.cs b/src/chocolatey/infrastructure/logging/LogSinkLog.cs index 58093cc447..99e7859b14 100644 --- a/src/chocolatey/infrastructure/logging/LogSinkLog.cs +++ b/src/chocolatey/infrastructure/logging/LogSinkLog.cs @@ -14,11 +14,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; + namespace chocolatey.infrastructure.logging { - using System; - using System.Collections.Generic; - public sealed class LogSinkLog : ILog, ILog { private readonly IList _messages = new List(); diff --git a/src/chocolatey/infrastructure/logging/NullLog.cs b/src/chocolatey/infrastructure/logging/NullLog.cs index c4ecc4b438..c59702a913 100644 --- a/src/chocolatey/infrastructure/logging/NullLog.cs +++ b/src/chocolatey/infrastructure/logging/NullLog.cs @@ -14,10 +14,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; + namespace chocolatey.infrastructure.logging { - using System; - /// /// The default logger until one is set. /// diff --git a/src/chocolatey/infrastructure/logging/TraceLog.cs b/src/chocolatey/infrastructure/logging/TraceLog.cs index 4e988086f1..e44b306716 100644 --- a/src/chocolatey/infrastructure/logging/TraceLog.cs +++ b/src/chocolatey/infrastructure/logging/TraceLog.cs @@ -14,15 +14,15 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Diagnostics; +using System.Net; +using System.Reflection; +using System.Threading; +using log4net.Util; + namespace chocolatey.infrastructure.logging { - using System; - using System.Diagnostics; - using System.Net; - using System.Reflection; - using System.Threading; - using log4net.Util; - public class TraceLog : TraceListener { public TraceLog() @@ -64,7 +64,7 @@ private void EnableNetworkLogging() { //// force initialization HttpWebRequest.Create("http://localhost"); - Thread waitForInitializationThread = new Thread(() => + var waitForInitializationThread = new Thread(() => { while (!(bool)isInitialized.GetValue(null)) { @@ -83,7 +83,10 @@ private void EnableNetworkLogging() EnableTraceSource("s_CacheTraceSource", logging, this); //System.Net.Cache var isEnabled = logging.GetField("s_LoggingEnabled", BindingFlags.NonPublic | BindingFlags.Static); - if (isEnabled !=null) isEnabled.SetValue(null, true); + if (isEnabled != null) + { + isEnabled.SetValue(null, true); + } } private static void EnableTraceSource(string fieldName, Type logging, TraceListener listener) diff --git a/src/chocolatey/infrastructure/platforms/Platform.cs b/src/chocolatey/infrastructure/platforms/Platform.cs index 253612edf5..3d5980b79c 100644 --- a/src/chocolatey/infrastructure/platforms/Platform.cs +++ b/src/chocolatey/infrastructure/platforms/Platform.cs @@ -14,15 +14,15 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.ComponentModel; +using System.Runtime.InteropServices; +using chocolatey.infrastructure.adapters; +using chocolatey.infrastructure.filesystem; +using Environment = chocolatey.infrastructure.adapters.Environment; + namespace chocolatey.infrastructure.platforms { - using System; - using System.ComponentModel; - using System.Runtime.InteropServices; - using adapters; - using filesystem; - using Environment = adapters.Environment; - /// /// OS Platform detection /// @@ -65,9 +65,14 @@ public static PlatformType GetPlatform() & FileSystem.DirectoryExists("/System") & FileSystem.DirectoryExists("/Users") & FileSystem.DirectoryExists("/Volumes")) + { return PlatformType.Mac; + } else + { return PlatformType.Linux; + } + default: return PlatformType.Windows; } @@ -104,9 +109,10 @@ private static string GetWindowsVersionName(Version version) var name = "Windows"; var isServer = false; - var osVersionInfo = new OSVERSIONINFOEX(); - - osVersionInfo.dwOSVersionInfoSize = Marshal.SizeOf(typeof (OSVERSIONINFOEX)); + var osVersionInfo = new OSVERSIONINFOEX + { + dwOSVersionInfoSize = Marshal.SizeOf(typeof(OSVERSIONINFOEX)) + }; var success = GetVersionEx(ref osVersionInfo); if (success) { @@ -116,11 +122,19 @@ private static string GetWindowsVersionName(Version version) //https://msdn.microsoft.com/en-us/library/windows/desktop/ms724832.aspx //switch doesn't like a double, but a string is fine?! - string majorMinor = version.Major + "." + version.Minor; + var majorMinor = version.Major + "." + version.Minor; switch (majorMinor) { case "10.0": - name = isServer ? "Windows Server 2016" : "Windows 10"; + if (isServer) + { + name = (version.Build < 20348) ? (version.Build < 17763) ? + "Windows Server 2016" : "Windows Server 2019" : "Windows Server 2022"; + } + else + { + name = (version.Build < 22000) ? "Windows 10" : "Windows 11"; + } break; case "6.4": name = isServer ? "Windows Server 2016" : "Windows 10"; @@ -196,7 +210,7 @@ _Inout_ LPOSVERSIONINFO lpVersionInfo // ReSharper restore InconsistentNaming -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] [EditorBrowsable(EditorBrowsableState.Never)] public static void initialize_with(Lazy environment, Lazy file_system) @@ -213,6 +227,6 @@ public static Version get_version() [Obsolete("This overload is deprecated and will be removed in v3.")] public static string get_name() => GetName(); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure/powershell/PoshHost.cs b/src/chocolatey/infrastructure/powershell/PoshHost.cs index 5294b81a3a..5e1dd5e54a 100644 --- a/src/chocolatey/infrastructure/powershell/PoshHost.cs +++ b/src/chocolatey/infrastructure/powershell/PoshHost.cs @@ -14,16 +14,16 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Globalization; +using System.Management.Automation.Host; +using chocolatey.infrastructure.app; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.domain; +using chocolatey.infrastructure.app.services; + namespace chocolatey.infrastructure.powershell { - using System; - using System.Globalization; - using System.Management.Automation.Host; - using app; - using app.configuration; - using app.domain; - using app.services; - public class PoshHost : PSHost { private readonly ChocolateyConfiguration _configuration; diff --git a/src/chocolatey/infrastructure/powershell/PoshHostRawUserInterface.cs b/src/chocolatey/infrastructure/powershell/PoshHostRawUserInterface.cs index 17ed8f272b..e60e7ecaae 100644 --- a/src/chocolatey/infrastructure/powershell/PoshHostRawUserInterface.cs +++ b/src/chocolatey/infrastructure/powershell/PoshHostRawUserInterface.cs @@ -14,13 +14,13 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Management.Automation.Host; +using chocolatey.infrastructure.adapters; +using Console = chocolatey.infrastructure.adapters.Console; + namespace chocolatey.infrastructure.powershell { - using System; - using System.Management.Automation.Host; - using adapters; - using Console = adapters.Console; - public class PoshHostRawUserInterface : PSHostRawUserInterface { private static readonly Lazy _console = new Lazy(() => new Console()); @@ -67,7 +67,8 @@ public override Size MaxWindowSize get { return new Size(Console.LargestWindowWidth, Console.LargestWindowHeight); } } - public override Coordinates WindowPosition { + public override Coordinates WindowPosition + { get { return new Coordinates(Console.WindowLeft, Console.WindowTop); } set { Console.SetWindowPosition(value.X, value.Y); } } diff --git a/src/chocolatey/infrastructure/powershell/PoshHostUserInterface.cs b/src/chocolatey/infrastructure/powershell/PoshHostUserInterface.cs index 7f3ba385de..ca56b4f0a1 100644 --- a/src/chocolatey/infrastructure/powershell/PoshHostUserInterface.cs +++ b/src/chocolatey/infrastructure/powershell/PoshHostUserInterface.cs @@ -14,21 +14,21 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Globalization; +using System.Management.Automation; +using System.Management.Automation.Host; +using System.Security; +using System.Text; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.commandline; +using chocolatey.infrastructure.logging; +using Console = chocolatey.infrastructure.adapters.Console; + namespace chocolatey.infrastructure.powershell { - using System; - using System.Collections.Generic; - using System.Collections.ObjectModel; - using System.Globalization; - using System.Management.Automation; - using System.Management.Automation.Host; - using System.Security; - using System.Text; - using app.configuration; - using commandline; - using logging; - using Console = adapters.Console; - public class PoshHostUserInterface : PSHostUserInterface { private readonly ChocolateyConfiguration _configuration; @@ -134,7 +134,10 @@ public override void WriteDebugLine(string message) private bool _hasLoggedStartProgress = false; public override void WriteProgress(long sourceId, ProgressRecord record) { - if (record.PercentComplete == -1) return; + if (record.PercentComplete == -1) + { + return; + } if (!_hasLoggedStartProgress) { @@ -165,10 +168,13 @@ public override Dictionary Prompt(string caption, string messa var results = new Dictionary(); foreach (FieldDescription field in descriptions) { - if (string.IsNullOrWhiteSpace(field.Label)) this.Log().Warn(field.Name.EscapeCurlyBraces()); + if (string.IsNullOrWhiteSpace(field.Label)) + { + this.Log().Warn(field.Name.EscapeCurlyBraces()); + } else { - string[] label = GetHotkeyAndLabel(field.Label); + var label = GetHotkeyAndLabel(field.Label); this.Log().Warn(label[1].EscapeCurlyBraces()); } @@ -183,7 +189,10 @@ public override Dictionary Prompt(string caption, string messa selection = ReadLine(); } - if (selection == null) return null; + if (selection == null) + { + return null; + } results[field.Name] = PSObject.AsPSObject(selection); } @@ -204,39 +213,52 @@ public override Dictionary Prompt(string caption, string messa /// private static string[] GetHotkeyAndLabel(string input) { - var result = new[] { String.Empty, String.Empty }; + var result = new[] { string.Empty, string.Empty }; //Do not use StringSplitOptions.RemoveEmptyEntries, it causes issues here - string[] fragments = input.Split('&'); + var fragments = input.Split('&'); if (fragments.Length == 2) { - if (fragments[1].Length > 0) result[0] = fragments[1][0].ToStringSafe().ToUpper(CultureInfo.CurrentCulture); + if (fragments[1].Length > 0) + { + result[0] = fragments[1][0].ToStringSafe().ToUpper(CultureInfo.CurrentCulture); + } result[1] = (fragments[0] + fragments[1]).Trim(); } - else result[1] = input; + else + { + result[1] = input; + } return result; } public override int PromptForChoice(string caption, string message, Collection choices, int defaultChoice) { - if (!string.IsNullOrWhiteSpace(caption)) this.Log().Warn(caption.EscapeCurlyBraces()); - if (!string.IsNullOrWhiteSpace(message)) this.Log().Warn(ChocolateyLoggers.Important, message.EscapeCurlyBraces()); + if (!string.IsNullOrWhiteSpace(caption)) + { + this.Log().Warn(caption.EscapeCurlyBraces()); + } - string[,] promptData = BuildHotkeysAndLabels(choices); + if (!string.IsNullOrWhiteSpace(message)) + { + this.Log().Warn(ChocolateyLoggers.Important, message.EscapeCurlyBraces()); + } + + var promptData = BuildHotkeysAndLabels(choices); // Format the overall choice prompt string to display. var choicePrompt = new StringBuilder(); - for (int element = 0; element < choices.Count; element++) + for (var element = 0; element < choices.Count; element++) { - choicePrompt.Append(String.Format( + choicePrompt.Append(string.Format( CultureInfo.CurrentCulture, "[{0}] {1} ", promptData[0, element], promptData[1, element])); } - choicePrompt.Append(String.Format( + choicePrompt.Append(string.Format( CultureInfo.CurrentCulture, "(default is \"{0}\")", promptData[0, defaultChoice])); @@ -244,13 +266,19 @@ public override int PromptForChoice(string caption, string message, CollectionThe assembly file location. Typically the path to the DLL on disk. /// An assembly /// Unable to enter synchronized code to determine assembly loading - public static IAssembly ResolveOrLoadAssembly(string assemblySimpleName, string publicKeyToken, string assemblyFileLocation) { + public static IAssembly ResolveOrLoadAssembly(string assemblySimpleName, string publicKeyToken, string assemblyFileLocation) + { return ResolveOrLoadAssembly(assemblySimpleName, publicKeyToken, assemblyFileLocation, false); } @@ -138,6 +139,13 @@ public static IAssembly LoadAssembly(string assemblySimpleName, string assemblyF { try { + // If we're trying to load Chocolatey.PowerShell (e.g., as a dependency of the licensed extension, + // we may need to alter the load file path. + if (assemblySimpleName == ApplicationParameters.ChocolateyPowerShellAssemblySimpleName) + { + assemblyFileLocation = ApplicationParameters.ChocolateyPowerShellAssemblyLocation; + } + IAssembly tempAssembly; #if FORCE_CHOCOLATEY_OFFICIAL_KEY tempAssembly = Assembly.Load(FileSystem.ReadFileBytes(assemblyFileLocation)); @@ -338,7 +346,7 @@ public static System.Reflection.Assembly ResolveExtensionOrMergedAssembly(object if (Directory.Exists(ApplicationParameters.ExtensionsLocation)) { - bool extensionsFound = false; + var extensionsFound = false; foreach (var extensionDll in Directory.EnumerateFiles(ApplicationParameters.ExtensionsLocation, requestedAssembly.Name + ".dll", SearchOption.AllDirectories)) { extensionsFound = true; @@ -370,7 +378,8 @@ public static System.Reflection.Assembly ResolveExtensionOrMergedAssembly(object // There are things that are ILMerged into Chocolatey. Anything with // the right public key except extensions should use the choco/chocolatey assembly if (!requestedAssembly.Name.EndsWith(".resources", StringComparison.OrdinalIgnoreCase) - && !requestedAssembly.Name.IsEqualTo(ApplicationParameters.LicensedChocolateyAssemblySimpleName)) + && !requestedAssembly.Name.IsEqualTo(ApplicationParameters.LicensedChocolateyAssemblySimpleName) + && !requestedAssembly.Name.IsEqualTo(ApplicationParameters.ChocolateyPowerShellAssemblySimpleName)) { return typeof(ConsoleApplication).Assembly; } @@ -378,7 +387,7 @@ public static System.Reflection.Assembly ResolveExtensionOrMergedAssembly(object return null; } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public static IAssembly resolve_or_load_assembly(string assemblySimpleName, string publicKeyToken, string assemblyFileLocation) => ResolveOrLoadAssembly(assemblySimpleName, publicKeyToken, assemblyFileLocation); @@ -402,6 +411,6 @@ public static IAssembly load_extension(string assemblySimpleName) [Obsolete("This overload is deprecated and will be removed in v3.")] public static System.Reflection.Assembly resolve_extension_or_merged_assembly(object sender, ResolveEventArgs args) => ResolveExtensionOrMergedAssembly(sender, args); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure/registration/Bootstrap.cs b/src/chocolatey/infrastructure/registration/Bootstrap.cs index 65ce247688..c3412b8e09 100644 --- a/src/chocolatey/infrastructure/registration/Bootstrap.cs +++ b/src/chocolatey/infrastructure/registration/Bootstrap.cs @@ -14,20 +14,20 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using chocolatey.infrastructure.app; +using log4net; +using chocolatey.infrastructure.logging; +using ILog = log4net.ILog; + namespace chocolatey.infrastructure.registration { - using System; - using app; - using log4net; - using logging; - using ILog = log4net.ILog; - /// /// Application bootstrapping - sets up logging and errors for the app domain /// public sealed class Bootstrap { - private static readonly ILog _logger = LogManager.GetLogger(typeof (Bootstrap)); + private static readonly ILog _logger = LogManager.GetLogger(typeof(Bootstrap)); /// /// Initializes this instance. @@ -55,10 +55,10 @@ public static void Startup() /// // ReSharper disable InconsistentNaming private static void DomainUnhandledException(object sender, UnhandledExceptionEventArgs e) -// ReSharper restore InconsistentNaming + // ReSharper restore InconsistentNaming { var ex = e.ExceptionObject as Exception; - string exceptionMessage = string.Empty; + var exceptionMessage = string.Empty; if (ex != null) { exceptionMessage = ex.ToString(); @@ -79,7 +79,7 @@ public static void Shutdown() { } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public static void initialize() => Initialize(); @@ -91,6 +91,6 @@ public static void startup() [Obsolete("This overload is deprecated and will be removed in v3.")] public static void shutdown() => Shutdown(); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure/registration/HttpsSecurity.cs b/src/chocolatey/infrastructure/registration/HttpsSecurity.cs index f04347da68..fd0f2cb2df 100644 --- a/src/chocolatey/infrastructure/registration/HttpsSecurity.cs +++ b/src/chocolatey/infrastructure/registration/HttpsSecurity.cs @@ -1,63 +1,63 @@ -namespace chocolatey.infrastructure.registration -{ - using System; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Text; - using System.Threading.Tasks; - - public static class HttpsSecurity - { - /// - /// Resets the and for HTTPS connections - /// in order to ensure that PowerShell scripts we run can't have a persistent effect on these settings across the whole process after they're done running. - /// - public static void Reset() - { - // SystemDefault is used because: - // 1. Most supported operating systems default to / require TLS 1.2 anyway. - // 2. Explicitly *enabling* any less secure protocols leaves us open to TLS downgrade attacks. - // https://en.wikipedia.org/wiki/Downgrade_attack - // 3. Always *requiring* TLS 1.2 or higher on any OS version may cause issues with some folks' internal - // networks which may have older infrastructure that doesn't support it, and they won't have a way - // to make Chocolately CLI work with that infrastructure if we're forcing a TLS version they can't - // support. - // 4. Thus, the only sensible solution (since we don't want to add a configuration value for this) is - // to take the OS-level setting and use that, because if folks set their system up to use certain - // TLS versions, we should probably follow suit, regardless of what their OS version may be. - // - // See https://learn.microsoft.com/en-us/dotnet/framework/network-programming/tls for more information - // and best practices recommendation from the .NET team. - if (ServicePointManager.SecurityProtocol != SecurityProtocolType.SystemDefault) - { - "chocolatey".Log().Warn( - "{0} was set to {1}, resetting to SystemDefault.", - nameof(ServicePointManager.SecurityProtocol), - ServicePointManager.SecurityProtocol); - - ServicePointManager.SecurityProtocol = SecurityProtocolType.SystemDefault; - } - - try - { - // We reset this to ensure that if a package overrides this callback during its script runs, it doesn't affect the rest of - // the actions we need to take for the duration of this process (other packages we're installing, etc.) Setting this to - // null restores the default behaviour of certificate validation instead of whatever custom behaviour has been injected. - if (ServicePointManager.ServerCertificateValidationCallback != null) - { - "chocolatey".Log().Warn( - "{0} was set to '{1}' Removing.", - nameof(ServicePointManager.ServerCertificateValidationCallback), - ServicePointManager.ServerCertificateValidationCallback); - - ServicePointManager.ServerCertificateValidationCallback = null; - } - } - catch (Exception ex) - { - "chocolatey".Log().Warn("Error resetting ServerCertificateValidationCallback: {0}".FormatWith(ex.Message)); - } - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Text; +using System.Threading.Tasks; + +namespace chocolatey.infrastructure.registration +{ + public static class HttpsSecurity + { + /// + /// Resets the and for HTTPS connections + /// in order to ensure that PowerShell scripts we run can't have a persistent effect on these settings across the whole process after they're done running. + /// + public static void Reset() + { + // SystemDefault is used because: + // 1. Most supported operating systems default to / require TLS 1.2 anyway. + // 2. Explicitly *enabling* any less secure protocols leaves us open to TLS downgrade attacks. + // https://en.wikipedia.org/wiki/Downgrade_attack + // 3. Always *requiring* TLS 1.2 or higher on any OS version may cause issues with some folks' internal + // networks which may have older infrastructure that doesn't support it, and they won't have a way + // to make Chocolately CLI work with that infrastructure if we're forcing a TLS version they can't + // support. + // 4. Thus, the only sensible solution (since we don't want to add a configuration value for this) is + // to take the OS-level setting and use that, because if folks set their system up to use certain + // TLS versions, we should probably follow suit, regardless of what their OS version may be. + // + // See https://learn.microsoft.com/en-us/dotnet/framework/network-programming/tls for more information + // and best practices recommendation from the .NET team. + if (ServicePointManager.SecurityProtocol != SecurityProtocolType.SystemDefault) + { + "chocolatey".Log().Warn( + "{0} was set to {1}, resetting to SystemDefault.", + nameof(ServicePointManager.SecurityProtocol), + ServicePointManager.SecurityProtocol); + + ServicePointManager.SecurityProtocol = SecurityProtocolType.SystemDefault; + } + + try + { + // We reset this to ensure that if a package overrides this callback during its script runs, it doesn't affect the rest of + // the actions we need to take for the duration of this process (other packages we're installing, etc.) Setting this to + // null restores the default behaviour of certificate validation instead of whatever custom behaviour has been injected. + if (ServicePointManager.ServerCertificateValidationCallback != null) + { + "chocolatey".Log().Warn( + "{0} was set to '{1}' Removing.", + nameof(ServicePointManager.ServerCertificateValidationCallback), + ServicePointManager.ServerCertificateValidationCallback); + + ServicePointManager.ServerCertificateValidationCallback = null; + } + } + catch (Exception ex) + { + "chocolatey".Log().Warn("Error resetting ServerCertificateValidationCallback: {0}".FormatWith(ex.Message)); + } + } + } +} diff --git a/src/chocolatey/infrastructure/registration/SecurityProtocol.cs b/src/chocolatey/infrastructure/registration/SecurityProtocol.cs index a15a73d9a7..8e196e8e73 100644 --- a/src/chocolatey/infrastructure/registration/SecurityProtocol.cs +++ b/src/chocolatey/infrastructure/registration/SecurityProtocol.cs @@ -14,19 +14,19 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Net; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.logging; + namespace chocolatey.infrastructure.registration { - using System; - using System.Net; - using app.configuration; - using logging; - [Obsolete("This type is deprecated and will be removed in v3.")] public sealed class SecurityProtocol { -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE0060, IDE1006 public static void set_protocol(ChocolateyConfiguration config, bool provideWarning) => HttpsSecurity.Reset(); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE0060, IDE1006 } } diff --git a/src/chocolatey/infrastructure/registration/SimpleInjectorContainer.cs b/src/chocolatey/infrastructure/registration/SimpleInjectorContainer.cs index bc4a61e6a0..1261c869f6 100644 --- a/src/chocolatey/infrastructure/registration/SimpleInjectorContainer.cs +++ b/src/chocolatey/infrastructure/registration/SimpleInjectorContainer.cs @@ -14,20 +14,20 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using chocolatey.infrastructure.app; +using chocolatey.infrastructure.app.registration; +using chocolatey.infrastructure.information; +using chocolatey.infrastructure.licensing; +using chocolatey.infrastructure.logging; +using SimpleInjector; + namespace chocolatey.infrastructure.registration { - using System; - using System.Collections.Generic; - using System.Collections.ObjectModel; - using System.Linq; - using System.Reflection; - using app; - using app.registration; - using chocolatey.infrastructure.information; - using chocolatey.infrastructure.licensing; - using logging; - using SimpleInjector; - /// /// The inversion container /// @@ -38,17 +38,11 @@ public static class SimpleInjectorContainer private const string RegisterComponentsMethod = "RegisterComponents"; #if DEBUG - private static bool _verifyContainer = true; + public static bool VerifyContainer { get; set; } = true; #else - private static bool _verifyContainer = false; + public static bool VerifyContainer { get; set; } = false; #endif - public static bool VerifyContainer - { - get { return _verifyContainer; } - set { _verifyContainer = value; } - } - /// /// Add a component registry class to the container. /// Must have `public void RegisterComponents(Container container)` @@ -85,7 +79,10 @@ private static Container Initialize() LoadComponentRegistry(componentRegistry, container, extensions); } - if (_verifyContainer) container.Verify(); + if (VerifyContainer) + { + container.Verify(); + } return container; } @@ -114,14 +111,14 @@ private static void LoadComponentRegistry(Type componentRegistry, Container cont { var registrations = container.GetCurrentRegistrations(); - object componentClass = Activator.CreateInstance(componentRegistry); + var componentClass = Activator.CreateInstance(componentRegistry); componentRegistry.InvokeMember( RegisterComponentsMethod, BindingFlags.InvokeMethod, null, componentClass, - new Object[] { container } + new object[] { container } ); } } @@ -146,10 +143,10 @@ private static void LoadComponentRegistry(Type componentRegistry, Container cont } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public static void add_component_registry_class(Type componentType) => AddComponentRegistryClass(componentType); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure/registration/SimpleInjectorContainerResolutionBehavior.cs b/src/chocolatey/infrastructure/registration/SimpleInjectorContainerResolutionBehavior.cs index 6b66bf9cee..4c3be31b78 100644 --- a/src/chocolatey/infrastructure/registration/SimpleInjectorContainerResolutionBehavior.cs +++ b/src/chocolatey/infrastructure/registration/SimpleInjectorContainerResolutionBehavior.cs @@ -14,13 +14,13 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Linq; +using System.Reflection; +using SimpleInjector.Advanced; + namespace chocolatey.infrastructure.registration { - using System; - using System.Linq; - using System.Reflection; - using SimpleInjector.Advanced; - /// /// /// diff --git a/src/chocolatey/infrastructure/results/IResult.cs b/src/chocolatey/infrastructure/results/IResult.cs index ebc275240a..fae4c5f919 100644 --- a/src/chocolatey/infrastructure/results/IResult.cs +++ b/src/chocolatey/infrastructure/results/IResult.cs @@ -14,10 +14,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System.Collections.Generic; + namespace chocolatey.infrastructure.results { - using System.Collections.Generic; - /// /// Outcome from some work performed. /// diff --git a/src/chocolatey/infrastructure/results/PackageResult.cs b/src/chocolatey/infrastructure/results/PackageResult.cs index 98230d3541..fc098974f0 100644 --- a/src/chocolatey/infrastructure/results/PackageResult.cs +++ b/src/chocolatey/infrastructure/results/PackageResult.cs @@ -14,18 +14,18 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Linq; +using chocolatey.infrastructure.app.domain; +using NuGet.Packaging; +using NuGet.Packaging.Core; +using NuGet.Protocol.Core.Types; +using NuGet.Protocol; +using NuGet.Versioning; + namespace chocolatey.infrastructure.results { - using System; - using System.Collections.Generic; - using System.Linq; - using app.domain; - using NuGet.Packaging; - using NuGet.Packaging.Core; - using NuGet.Protocol.Core.Types; - using NuGet.Protocol; - using NuGet.Versioning; - /// /// Outcome of package installation /// @@ -135,7 +135,7 @@ public PackageResult(string name, string version, string installLocation, string public PackageIdentity Identity { - get { return new PackageIdentity(Name, NuGetVersion.Parse(Version)); } + get { return new PackageIdentity(Name, NuGetVersion.Parse(Version)); } } } } diff --git a/src/chocolatey/infrastructure/results/Result.cs b/src/chocolatey/infrastructure/results/Result.cs index 6b1e679f64..23e23f4597 100644 --- a/src/chocolatey/infrastructure/results/Result.cs +++ b/src/chocolatey/infrastructure/results/Result.cs @@ -14,12 +14,12 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Linq; + namespace chocolatey.infrastructure.results { - using System; - using System.Collections.Generic; - using System.Linq; - /// /// Outcome from some work performed /// @@ -46,9 +46,9 @@ public ICollection Messages get { return LazyMessages.Value; } } -#pragma warning disable IDE1006 // Naming Styles +#pragma warning disable IDE0022, IDE1006 // Naming Styles [Obsolete("This field is deprecated and will be removed in v3. Use LazyMessages or Messages instead.")] protected readonly Lazy> _messages; -#pragma warning restore IDE1006 // Naming Styles +#pragma warning restore IDE0022, IDE1006 // Naming Styles } } diff --git a/src/chocolatey/infrastructure/rules/IMetadataRule.cs b/src/chocolatey/infrastructure/rules/IMetadataRule.cs index d444e57b93..d441f0d599 100644 --- a/src/chocolatey/infrastructure/rules/IMetadataRule.cs +++ b/src/chocolatey/infrastructure/rules/IMetadataRule.cs @@ -13,13 +13,13 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using chocolatey.infrastructure.app.attributes; +using NuGet.Packaging; + namespace chocolatey.infrastructure.rules { - using System; - using System.Collections.Generic; - using chocolatey.infrastructure.app.attributes; - using NuGet.Packaging; - [MultiService] public interface IMetadataRule { @@ -27,9 +27,9 @@ public interface IMetadataRule IReadOnlyList GetAvailableRules(); -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] IEnumerable validate(NuspecReader reader); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure/services/EventSubscriptionManagerService.cs b/src/chocolatey/infrastructure/services/EventSubscriptionManagerService.cs index 9f931afb37..5dba4c278a 100644 --- a/src/chocolatey/infrastructure/services/EventSubscriptionManagerService.cs +++ b/src/chocolatey/infrastructure/services/EventSubscriptionManagerService.cs @@ -14,15 +14,15 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Reactive.Linq; +using System.Reactive.Subjects; +using chocolatey.infrastructure.events; +using chocolatey.infrastructure.guards; +using chocolatey.infrastructure.logging; + namespace chocolatey.infrastructure.services { - using System; - using System.Reactive.Linq; - using System.Reactive.Subjects; - using events; - using guards; - using logging; - /// /// Implementation of IEventSubscriptionManagerService /// @@ -37,15 +37,22 @@ public void Publish(Event eventMessage) where Event : class, IMessage { Ensure.That(() => eventMessage).NotNull(); - this.Log().Debug(ChocolateyLoggers.Verbose, () => "Sending message '{0}' out if there are subscribers...".FormatWith(typeof (Event).Name)); + this.Log().Debug(ChocolateyLoggers.Verbose, () => "Sending message '{0}' out if there are subscribers...".FormatWith(typeof(Event).Name)); _subject.OnNext(eventMessage); } public IDisposable Subscribe(Action handleEvent, Action handleError, Func filter) where Event : class, IMessage { - if (filter == null) filter = (message) => true; - if (handleError == null) handleError = (ex) => { }; + if (filter == null) + { + filter = (message) => true; + } + + if (handleError == null) + { + handleError = (ex) => { }; + } var subscription = _subject.OfType().AsObservable() .Where(filter) @@ -54,7 +61,7 @@ public IDisposable Subscribe(Action handleEvent, Action return subscription; } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public void publish(Event eventMessage) where Event : class, IMessage => Publish(eventMessage); @@ -62,6 +69,6 @@ public void publish(Event eventMessage) where Event : class, IMessage [Obsolete("This overload is deprecated and will be removed in v3.")] public IDisposable subscribe(Action handleEvent, Action handleError, Func filter) where Event : class, IMessage => Subscribe(handleEvent, handleError, filter); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure/services/IDateTimeService.cs b/src/chocolatey/infrastructure/services/IDateTimeService.cs index e5ba1584fe..7c6ef78029 100644 --- a/src/chocolatey/infrastructure/services/IDateTimeService.cs +++ b/src/chocolatey/infrastructure/services/IDateTimeService.cs @@ -14,10 +14,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; + namespace chocolatey.infrastructure.services { - using System; - /// /// This handles date/time information /// @@ -28,9 +28,9 @@ public interface IDateTimeService /// DateTime? GetCurrentDateTime(); -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] DateTime? get_current_date_time(); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure/services/IEventSubscriptionManagerService.cs b/src/chocolatey/infrastructure/services/IEventSubscriptionManagerService.cs index b90b3ce8ab..3af73630c3 100644 --- a/src/chocolatey/infrastructure/services/IEventSubscriptionManagerService.cs +++ b/src/chocolatey/infrastructure/services/IEventSubscriptionManagerService.cs @@ -14,11 +14,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using chocolatey.infrastructure.events; + namespace chocolatey.infrastructure.services { - using System; - using events; - /// /// Interface for EventSubscriptionManagerService /// @@ -41,12 +41,12 @@ public interface IEventSubscriptionManagerService /// The subscription as Disposable IDisposable Subscribe(Action handleEvent, Action handleError, Func filter) where Event : class, IMessage; -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] void publish(Event eventMessage) where Event : class, IMessage; [Obsolete("This overload is deprecated and will be removed in v3.")] IDisposable subscribe(Action handleEvent, Action handleError, Func filter) where Event : class, IMessage; -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure/services/IRegularExpressionService.cs b/src/chocolatey/infrastructure/services/IRegularExpressionService.cs index 5d626a564c..87103ab21d 100644 --- a/src/chocolatey/infrastructure/services/IRegularExpressionService.cs +++ b/src/chocolatey/infrastructure/services/IRegularExpressionService.cs @@ -14,11 +14,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Text.RegularExpressions; + namespace chocolatey.infrastructure.services { - using System; - using System.Text.RegularExpressions; - /// /// Regular expressions helper /// @@ -33,9 +33,9 @@ public interface IRegularExpressionService /// string Replace(string input, string pattern, MatchEvaluator matchEvaluator); -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] string replace(string input, string pattern, MatchEvaluator matchEvaluator); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure/services/IRuleService.cs b/src/chocolatey/infrastructure/services/IRuleService.cs index e4c211cdf0..e314a36e8c 100644 --- a/src/chocolatey/infrastructure/services/IRuleService.cs +++ b/src/chocolatey/infrastructure/services/IRuleService.cs @@ -13,19 +13,20 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using chocolatey.infrastructure.rules; + namespace chocolatey.infrastructure.services { - using System; - using System.Collections.Generic; - using chocolatey.infrastructure.rules; - public interface IRuleService { + IReadOnlyList GetAllAvailableRules(); IEnumerable ValidateRules(string filePath); -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] IEnumerable validate_rules(string filePath); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure/services/IXmlService.cs b/src/chocolatey/infrastructure/services/IXmlService.cs index eb2aa8389f..e8c965ce25 100644 --- a/src/chocolatey/infrastructure/services/IXmlService.cs +++ b/src/chocolatey/infrastructure/services/IXmlService.cs @@ -14,10 +14,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; + namespace chocolatey.infrastructure.services { - using System; - public interface IXmlService { /// @@ -54,7 +54,7 @@ public interface IXmlService /// Log messages? void Serialize(XmlType xmlType, string xmlFilePath, bool isSilent); -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] XmlType deserialize(string xmlFilePath); @@ -66,6 +66,6 @@ public interface IXmlService [Obsolete("This overload is deprecated and will be removed in v3.")] void serialize(XmlType xmlType, string xmlFilePath, bool isSilent); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure/services/RegularExpressionService.cs b/src/chocolatey/infrastructure/services/RegularExpressionService.cs index 123c6d1132..3ac6cebcde 100644 --- a/src/chocolatey/infrastructure/services/RegularExpressionService.cs +++ b/src/chocolatey/infrastructure/services/RegularExpressionService.cs @@ -14,11 +14,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Text.RegularExpressions; + namespace chocolatey.infrastructure.services { - using System; - using System.Text.RegularExpressions; - /// /// Regular Expressions helper /// @@ -30,10 +30,10 @@ public string Replace(string input, string pattern, MatchEvaluator matchEvaluato return regex.Replace(input, matchEvaluator); } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public string replace(string input, string pattern, MatchEvaluator matchEvaluator) => Replace(input, pattern, matchEvaluator); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure/services/SystemDateTimeService.cs b/src/chocolatey/infrastructure/services/SystemDateTimeService.cs index 6bd0eafd59..5675d5ba54 100644 --- a/src/chocolatey/infrastructure/services/SystemDateTimeService.cs +++ b/src/chocolatey/infrastructure/services/SystemDateTimeService.cs @@ -14,10 +14,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; + namespace chocolatey.infrastructure.services { - using System; - /// /// Uses information from the system /// @@ -28,10 +28,10 @@ public class SystemDateTimeService : IDateTimeService return DateTime.Now; } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public DateTime? get_current_date_time() => GetCurrentDateTime(); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure/services/SystemDateTimeUtcService.cs b/src/chocolatey/infrastructure/services/SystemDateTimeUtcService.cs index cb11d04087..5ee556c523 100644 --- a/src/chocolatey/infrastructure/services/SystemDateTimeUtcService.cs +++ b/src/chocolatey/infrastructure/services/SystemDateTimeUtcService.cs @@ -14,10 +14,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; + namespace chocolatey.infrastructure.services { - using System; - /// /// Uses information from the system /// @@ -28,10 +28,10 @@ public class SystemDateTimeUtcService : IDateTimeService return DateTime.UtcNow; } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public DateTime? get_current_date_time() => GetCurrentDateTime(); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure/services/XmlService.cs b/src/chocolatey/infrastructure/services/XmlService.cs index 3a5e10116f..5323fedb0d 100644 --- a/src/chocolatey/infrastructure/services/XmlService.cs +++ b/src/chocolatey/infrastructure/services/XmlService.cs @@ -14,19 +14,19 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Diagnostics; +using System.IO; +using System.Text; +using System.Xml; +using System.Xml.Serialization; +using chocolatey.infrastructure.cryptography; +using chocolatey.infrastructure.filesystem; +using chocolatey.infrastructure.tolerance; +using chocolatey.infrastructure.synchronization; + namespace chocolatey.infrastructure.services { - using System; - using System.Diagnostics; - using System.IO; - using System.Text; - using System.Xml; - using System.Xml.Serialization; - using cryptography; - using filesystem; - using tolerance; - using synchronization; - /// /// XML interaction /// @@ -149,7 +149,8 @@ public void Serialize(XmlType xmlType, string xmlFilePath, bool isSilen { AutoFlush = true } - ){ + ) + { xmlSerializer.Serialize(streamWriter, xmlType); streamWriter.Flush(); @@ -197,7 +198,7 @@ public void Serialize(XmlType xmlType, string xmlFilePath, bool isSilen increaseRetryByMilliseconds: 200); } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public XmlType deserialize(string xmlFilePath) => Deserialize(xmlFilePath); @@ -213,6 +214,6 @@ public void serialize(XmlType xmlType, string xmlFilePath) [Obsolete("This overload is deprecated and will be removed in v3.")] public void serialize(XmlType xmlType, string xmlFilePath, bool isSilent) => Serialize(xmlType, xmlFilePath, isSilent); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure/synchronization/GlobalMutex.cs b/src/chocolatey/infrastructure/synchronization/GlobalMutex.cs index 892953fc64..aec8a0911b 100644 --- a/src/chocolatey/infrastructure/synchronization/GlobalMutex.cs +++ b/src/chocolatey/infrastructure/synchronization/GlobalMutex.cs @@ -14,15 +14,15 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Security.AccessControl; +using System.Security.Principal; +using System.Threading; +using chocolatey.infrastructure.logging; +using chocolatey.infrastructure.platforms; + namespace chocolatey.infrastructure.synchronization { - using System; - using System.Security.AccessControl; - using System.Security.Principal; - using System.Threading; - using logging; - using platforms; - /// /// global mutex used for synchronizing multiple processes based on appguid /// @@ -83,12 +83,18 @@ public static void Enter(Action action, int timeout) { using (new GlobalMutex(timeout)) { - if (action != null) action.Invoke(); + if (action != null) + { + action.Invoke(); + } } } else { - if (action != null) action.Invoke(); + if (action != null) + { + action.Invoke(); + } } } @@ -107,12 +113,18 @@ public static T Enter(Func func, int timeout) { using (new GlobalMutex(timeout)) { - if (func != null) returnValue = func.Invoke(); + if (func != null) + { + returnValue = func.Invoke(); + } } } else { - if (func != null) returnValue = func.Invoke(); + if (func != null) + { + returnValue = func.Invoke(); + } } return returnValue; @@ -130,7 +142,7 @@ public void Dispose() } } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public static void enter(Action action, int timeout) => Enter(action, timeout); @@ -138,6 +150,6 @@ public static void enter(Action action, int timeout) [Obsolete("This overload is deprecated and will be removed in v3.")] public static T enter(Func func, int timeout) => Enter(func, timeout); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure/tasks/ITask.cs b/src/chocolatey/infrastructure/tasks/ITask.cs index 35d3c5abfd..c091baba53 100644 --- a/src/chocolatey/infrastructure/tasks/ITask.cs +++ b/src/chocolatey/infrastructure/tasks/ITask.cs @@ -14,11 +14,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +using chocolatey.infrastructure.app.attributes; +using System; + namespace chocolatey.infrastructure.tasks { - using chocolatey.infrastructure.app.attributes; - using System; - /// /// Interface for all runners. /// @@ -36,12 +36,12 @@ public interface ITask /// void Shutdown(); -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] void initialize(); [Obsolete("This overload is deprecated and will be removed in v3.")] void shutdown(); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure/tokens/TokenReplacer.cs b/src/chocolatey/infrastructure/tokens/TokenReplacer.cs index db107f4ba1..25f70963ae 100644 --- a/src/chocolatey/infrastructure/tokens/TokenReplacer.cs +++ b/src/chocolatey/infrastructure/tokens/TokenReplacer.cs @@ -14,27 +14,33 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using System.Reflection; +using System.Text.RegularExpressions; + namespace chocolatey.infrastructure.tokens { - using System; - using System.Collections.Generic; - using System.Reflection; - using System.Text.RegularExpressions; - public sealed class TokenReplacer { public static string ReplaceTokens(TConfig configuration, string textToReplace, string tokenPrefix = "[[", string tokenSuffix = "]]") { - if (string.IsNullOrEmpty(textToReplace)) return string.Empty; + if (string.IsNullOrEmpty(textToReplace)) + { + return string.Empty; + } IDictionary dictionary = CreateDictionaryFromConfiguration(configuration); - if (dictionary.Count == 0) return textToReplace; + if (dictionary.Count == 0) + { + return textToReplace; + } var regex = new Regex("{0}(?\\w+){1}".FormatWith(Regex.Escape(tokenPrefix), Regex.Escape(tokenSuffix))); - string output = regex.Replace(textToReplace, m => + var output = regex.Replace(textToReplace, m => { - string key = ""; + var key = ""; var originalKey = m.Groups["key"].Value; key = originalKey.ToLowerSafe(); @@ -43,7 +49,7 @@ public static string ReplaceTokens(TConfig configuration, string textTo return tokenPrefix + originalKey + tokenSuffix; } - string value = dictionary[key]; + var value = dictionary[key]; return value; }); @@ -52,7 +58,10 @@ public static string ReplaceTokens(TConfig configuration, string textTo private static IDictionary CreateDictionaryFromConfiguration(TConfig configuration) { - if (configuration is IDictionary) return configuration as IDictionary; + if (configuration is IDictionary) + { + return configuration as IDictionary; + } var propertyDictionary = new Dictionary(); foreach (PropertyInfo property in configuration.GetType().GetProperties()) @@ -74,7 +83,7 @@ public static IEnumerable GetTokens(string textWithTokens, string tokenP } } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public static string replace_tokens(TConfig configuration, string textToReplace, string tokenPrefix = "[[", string tokenSuffix = "]]") => ReplaceTokens(configuration, textToReplace, tokenPrefix, tokenSuffix); @@ -82,6 +91,6 @@ public static string replace_tokens(TConfig configuration, string textT [Obsolete("This overload is deprecated and will be removed in v3.")] public static IEnumerable get_tokens(string textWithTokens, string tokenPrefix = "[[", string tokenSuffix = "]]") => GetTokens(textWithTokens, tokenPrefix, tokenSuffix); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure/tolerance/FaultTolerance.cs b/src/chocolatey/infrastructure/tolerance/FaultTolerance.cs index b5aa14d20d..438daa1d96 100644 --- a/src/chocolatey/infrastructure/tolerance/FaultTolerance.cs +++ b/src/chocolatey/infrastructure/tolerance/FaultTolerance.cs @@ -14,13 +14,13 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Threading; +using chocolatey.infrastructure.configuration; +using chocolatey.infrastructure.logging; + namespace chocolatey.infrastructure.tolerance { - using System; - using System.Threading; - using configuration; - using logging; - /// /// Provides methods that are able to tolerate faults and recover /// @@ -51,7 +51,10 @@ private static bool InDebugMode() /// Log messages? public static void Retry(int numberOfTries, Action action, int waitDurationMilliseconds = 100, int increaseRetryByMilliseconds = 0, bool isSilent = false) { - if (action == null) return; + if (action == null) + { + return; + } var success = Retry( numberOfTries, @@ -78,15 +81,26 @@ public static void Retry(int numberOfTries, Action action, int waitDurationMilli /// Log messages? public static T Retry(int numberOfTries, Func function, int waitDurationMilliseconds = 100, int increaseRetryByMilliseconds = 0, bool isSilent = false) { - if (function == null) return default(T); - if (numberOfTries == 0) throw new ApplicationException("You must specify a number of tries greater than zero."); + if (function == null) + { + return default(T); + } + + if (numberOfTries == 0) + { + throw new ApplicationException("You must specify a number of tries greater than zero."); + } + var returnValue = default(T); var debugging = InDebugMode(); var logLocation = ChocolateyLoggers.Normal; - if (isSilent) logLocation = ChocolateyLoggers.LogFileOnly; + if (isSilent) + { + logLocation = ChocolateyLoggers.LogFileOnly; + } - for (int i = 1; i <= numberOfTries; i++) + for (var i = 1; i <= numberOfTries; i++) { try { @@ -101,7 +115,7 @@ public static T Retry(int numberOfTries, Func function, int waitDurationMi throw; } - int retryWait = waitDurationMilliseconds + (i*increaseRetryByMilliseconds); + var retryWait = waitDurationMilliseconds + (i * increaseRetryByMilliseconds); var exceptionMessage = debugging ? ex.ToString() : ex.Message; @@ -129,7 +143,10 @@ public static T Retry(int numberOfTries, Func function, int waitDurationMi /// Log messages? public static void TryCatchWithLoggingException(Action action, string errorMessage, bool throwError = false, bool logWarningInsteadOfError = false, bool logDebugInsteadOfError = false, bool isSilent = false) { - if (action == null) return; + if (action == null) + { + return; + } var success = TryCatchWithLoggingException( () => @@ -158,11 +175,18 @@ public static void TryCatchWithLoggingException(Action action, string errorMessa /// The return value from the function public static T TryCatchWithLoggingException(Func function, string errorMessage, bool throwError = false, bool logWarningInsteadOfError = false, bool logDebugInsteadOfError = false, bool isSilent = false) { - if (function == null) return default(T); + if (function == null) + { + return default(T); + } + var returnValue = default(T); var logLocation = ChocolateyLoggers.Normal; - if (isSilent) logLocation = ChocolateyLoggers.LogFileOnly; + if (isSilent) + { + logLocation = ChocolateyLoggers.LogFileOnly; + } try { @@ -194,7 +218,7 @@ public static T TryCatchWithLoggingException(Func function, string errorMe return returnValue; } -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] public static void retry(int numberOfTries, Action action, int waitDurationMilliseconds = 100, int increaseRetryByMilliseconds = 0, bool isSilent = false) => Retry(numberOfTries, action, waitDurationMilliseconds, increaseRetryByMilliseconds, isSilent); @@ -210,6 +234,6 @@ public static void try_catch_with_logging_exception(Action action, string errorM [Obsolete("This overload is deprecated and will be removed in v3.")] public static T try_catch_with_logging_exception(Func function, string errorMessage, bool throwError = false, bool logWarningInsteadOfError = false, bool logDebugInsteadOfError = false, bool isSilent = false) => TryCatchWithLoggingException(function, errorMessage, throwError, logWarningInsteadOfError, logDebugInsteadOfError, isSilent); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure/validations/IValidation.cs b/src/chocolatey/infrastructure/validations/IValidation.cs index 3694d7fcaf..531b85abe3 100644 --- a/src/chocolatey/infrastructure/validations/IValidation.cs +++ b/src/chocolatey/infrastructure/validations/IValidation.cs @@ -14,13 +14,13 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; +using System.Collections.Generic; +using chocolatey.infrastructure.app.configuration; +using chocolatey.infrastructure.app.attributes; + namespace chocolatey.infrastructure.validations { - using System; - using System.Collections.Generic; - using app.configuration; - using chocolatey.infrastructure.app.attributes; - /// /// Interface for all validations /// @@ -34,9 +34,9 @@ public interface IValidation /// The validation results ICollection Validate(ChocolateyConfiguration config); -#pragma warning disable IDE1006 +#pragma warning disable IDE0022, IDE1006 [Obsolete("This overload is deprecated and will be removed in v3.")] ICollection validate(ChocolateyConfiguration config); -#pragma warning restore IDE1006 +#pragma warning restore IDE0022, IDE1006 } } diff --git a/src/chocolatey/infrastructure/xml/XmlCData.cs b/src/chocolatey/infrastructure/xml/XmlCData.cs index 209ec843d0..395d279b49 100644 --- a/src/chocolatey/infrastructure/xml/XmlCData.cs +++ b/src/chocolatey/infrastructure/xml/XmlCData.cs @@ -14,12 +14,12 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System.Xml; +using System.Xml.Schema; +using System.Xml.Serialization; + namespace chocolatey.infrastructure.xml { - using System.Xml; - using System.Xml.Schema; - using System.Xml.Serialization; - /// /// Xml CData autoconversion /// @@ -49,7 +49,10 @@ public static implicit operator XmlCData(string value) /// public static implicit operator string(XmlCData cdata) { - if (cdata != null) return cdata._value.ToStringSafe(); + if (cdata != null) + { + return cdata._value.ToStringSafe(); + } return string.Empty; } diff --git a/tests/Vagrantfile b/tests/Vagrantfile index 83adfb6231..a6bd2bf065 100644 --- a/tests/Vagrantfile +++ b/tests/Vagrantfile @@ -3,6 +3,8 @@ Vagrant.configure("2") do |config| config.vm.box = "StefanScherer/windows_2022" + # Set Hostname to prevent error messages. https://github.com/hashicorp/vagrant/issues/12644 + config.vm.hostname = 'chocolatey-tests' config.vm.boot_timeout = 600 # windows @@ -54,7 +56,7 @@ Vagrant.configure("2") do |config| $null = robocopy c:/chocoRoot c:/code/choco /e /copy:dt /purge Push-Location c:/code/choco Write-Host "($(Get-Date -Format "dddd MM/dd/yyyy HH:mm:ss K")) Files have been copied, beginning build process." - $CakeOutput = ./build.bat 2>&1 + $CakeOutput = ./build.bat --verbosity=diagnostic --target=CI --testExecutionType=none --shouldRunalyze=false --shouldRunNuGet=false 2>&1 if ($LastExitCode -ne 0) { Set-Content c:/vagrant/buildOutput.log -Value $CakeOutput @@ -64,12 +66,22 @@ Vagrant.configure("2") do |config| Write-Host "($(Get-Date -Format "dddd MM/dd/yyyy HH:mm:ss K")) Build complete." SHELL + config.vm.provision "shell", name: "clear-packages", inline: <<-SHELL + Write-Host "($(Get-Date -Format "dddd MM/dd/yyyy HH:mm:ss K")) Clearing the packages directory" + Remove-Item "$env:TEMP/chocolateyTests/packages" -Recurse -Force -ErrorAction SilentlyContinue + SHELL config.vm.provision "shell", name: "test", inline: <<-SHELL + # Copy changed files. + $null = robocopy c:/chocoRoot c:/code/choco /e /copy:dt + # Purge any tests files that have been removed. + $null = robocopy c:/chocoRoot/tests c:/code/choco/tests /e /copy:dt /purge Write-Host "($(Get-Date -Format "dddd MM/dd/yyyy HH:mm:ss K")) Starting Test Execution" Push-Location c:/code/choco # $env:TEST_KITCHEN = 1 $env:VM_RUNNING = 1 - ./Invoke-Tests.ps1 + # The Invoke-Tests file will build the packages if the directory does not exist. + # This will allow to rerun tests without packaging each time. + ./Invoke-Tests.ps1 -SkipPackaging Copy-Item $env:ALLUSERSPROFILE/chocolatey/logs/testInvocations.log C:/vagrant SHELL end diff --git a/tests/helpers/common/Chocolatey/Set-ChocolateyFeature.ps1 b/tests/helpers/common/Chocolatey/Set-ChocolateyFeature.ps1 index 89ae1a7eaa..47829d2b9d 100644 --- a/tests/helpers/common/Chocolatey/Set-ChocolateyFeature.ps1 +++ b/tests/helpers/common/Chocolatey/Set-ChocolateyFeature.ps1 @@ -14,9 +14,9 @@ $action = $PSCmdlet.ParameterSetName $failures = $Name | ForEach-Object { $output = Invoke-Choco feature $action "--name=$_" - if ($output.ExitCode -ne 0) { + if ($output.ExitCode -notin @(0, 2)) { Write-Host "An error occurred setting ($action) feature: $_" - Write-Host ("Chocolatey output: {0}{1}{2}" -f $output.ExitCode, ([Environment]::NewLine), $output.String) + Write-Host ("Chocolatey ExitCode: {0}{1}Chocolatey Output:{1}{2}" -f $output.ExitCode, ([Environment]::NewLine), $output.String) $_ } } diff --git a/tests/packages/add-path/add-path.nuspec b/tests/packages/add-path/add-path.nuspec new file mode 100644 index 0000000000..8021a8069d --- /dev/null +++ b/tests/packages/add-path/add-path.nuspec @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + add-path + + + + 1.0.0 + + + + + + + + add-path (Install) + __REPLACE_AUTHORS_OF_SOFTWARE_COMMA_SEPARATED__ + + https://_Software_Location_REMOVE_OR_FILL_OUT_ + + + + + + + + + + + add-path SPACE_SEPARATED + __REPLACE__ + __REPLACE__MarkDown_Okay + + + + + + + + + + + + + + + + diff --git a/tests/packages/add-path/tools/chocolateyinstall.ps1 b/tests/packages/add-path/tools/chocolateyinstall.ps1 new file mode 100644 index 0000000000..3627a1aecf --- /dev/null +++ b/tests/packages/add-path/tools/chocolateyinstall.ps1 @@ -0,0 +1,17 @@ +$params = Get-PackageParameters +$path = $params["Path"] +$scope = $params["Scope"] + +if (-not $path) { + throw "You must specify the package parameter /Path" +} + +if (-not $scope) { + $scope = "User" +} + +Write-Host "Adding '$path' to PATH at scope $scope" + +Install-ChocolateyPath -PathToInstall $path -PathType $scope + +Write-Host "$scope PATH after install: $env:PATH" \ No newline at end of file diff --git a/tests/packages/add-path/tools/chocolateyuninstall.ps1 b/tests/packages/add-path/tools/chocolateyuninstall.ps1 new file mode 100644 index 0000000000..14bc57b767 --- /dev/null +++ b/tests/packages/add-path/tools/chocolateyuninstall.ps1 @@ -0,0 +1,17 @@ +$params = Get-PackageParameters +$path = $params["Path"] +$scope = $params["Scope"] + +if (-not $path) { + throw "You must specify the package parameter /Path" +} + +if (-not $scope) { + $scope = "User" +} + +Write-Host "Removing '$path' from PATH at scope $scope" + +Uninstall-ChocolateyPath -PathToUninstall $path -PathType $scope + +Write-Host "$scope PATH after removal: $env:PATH" \ No newline at end of file diff --git a/tests/packages/install-chocolateyinstallpackage-tests/chocolateyinstall.ps1 b/tests/packages/install-chocolateyinstallpackage-tests/chocolateyinstall.ps1 new file mode 100644 index 0000000000..b462c377ae --- /dev/null +++ b/tests/packages/install-chocolateyinstallpackage-tests/chocolateyinstall.ps1 @@ -0,0 +1,45 @@ +# This package purposely uses files that don't exists. +# As such, we need to continue on error. +$ErrorActionPreference = 'SilentlyContinue' +$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" +$fileLocation = "$toolsDir\ConsoleApp1" +$exeArgs = @{ + packageName = $env:ChocolateyPackageName + silentArgs = "/exe " + fileType = 'exe' + file = "$fileLocation.exe" +} +$msiArgs = @{ + packageName = $env:ChocolateyPackageName + silentArgs = "/qn " + # msiexec will exit with 1619 when the file doesn't exist. + validExitCodes = @(1619) + fileType = 'msi' + file = "$fileLocation.msi" +} +$msuArgs = @{ + packageName = $env:ChocolateyPackageName + silentArgs = "/quiet " + # wusa will exit with 2 when the file doesn't exist. + validExitCodes = @(2) + fileType = 'msu' + file = "$fileLocation.msu" +} + +# Since the exe doesn't exist, Install-ChocolateyInstallPackage is expected to +# throw an exception. We don't care if it throws, we care that it outputs the +# correct parameters. +try { + Install-ChocolateyInstallPackage @exeArgs +} catch {} +Install-ChocolateyInstallPackage @msiArgs +Install-ChocolateyInstallPackage @msuArgs + +# Set the chocolateyInstallArgument environment variable to mimic Chocolatey +# setting this variable. +$env:chocolateyInstallArguments = '/norestart ' +try { + Install-ChocolateyInstallPackage @exeArgs +} catch {} +Install-ChocolateyInstallPackage @msiArgs +Install-ChocolateyInstallPackage @msuArgs diff --git a/tests/packages/install-chocolateyinstallpackage-tests/install-chocolateyinstallpackage-tests.nuspec b/tests/packages/install-chocolateyinstallpackage-tests/install-chocolateyinstallpackage-tests.nuspec new file mode 100644 index 0000000000..92ca2e653e --- /dev/null +++ b/tests/packages/install-chocolateyinstallpackage-tests/install-chocolateyinstallpackage-tests.nuspec @@ -0,0 +1,15 @@ + + + + + install-chocolateyinstallpackage-tests + Chocolatey Software + 1.0 + Install-ChocolateyInstallPackage tests + Package for the testing of Install-ChocolateyInstallPackage + Package for the testing of Install-ChocolateyInstallPackage. Used by Pester to ensure extra spaces are not added to command lines. + + + + + diff --git a/tests/pester-tests/BundledApplications.Tests.ps1 b/tests/pester-tests/BundledApplications.Tests.ps1 index 3c8e824abe..a348189d5b 100644 --- a/tests/pester-tests/BundledApplications.Tests.ps1 +++ b/tests/pester-tests/BundledApplications.Tests.ps1 @@ -2,14 +2,13 @@ Describe 'Ensuring correct version of is installed' -Tag BundledApplications -ForEach @( @{ Name = 'shimgen' ; Version = '2.0.0' ; ChocolateyVersion = '2.0.0-alpha' ; IsSigned = $true } + @{ Name = 'checksum' ; Version = '0.3.1' ; ChocolateyVersion = '2.0.0-alpha' ; IsSigned = $true } @{ Name = '7z' ; Version = '23.01' ; ChocolateyVersion = '2.2.1-alpha' ; IsSigned = $false } ) -Skip:(-not (Test-ChocolateyVersionEqualOrHigherThan "1.0.0")) { Context ' is correctly installed' -Skip:(-not (Test-ChocolateyVersionEqualOrHigherThan $ChocolateyVersion)) { BeforeAll { # Because we're not modifying the install in any way, there is no need to Initialize-ChocolateyTestInstall $ToolPath = "$env:ChocolateyInstall/tools/$Name.exe" - # TODO: Encapsulate in an environment variable once kitchen-pester has new version - https://github.com/chocolatey/choco/issues/2692 - $Thumbprint = '83AC7D88C66CB8680BCE802E0F0F5C179722764B' } It 'Should be in Chocolatey tools directory' { @@ -18,8 +17,17 @@ Describe 'Ensuring correct version of is installed' -Tag BundledApplicati It 'Should be appropriately signed' -Skip:(-not $IsSigned) { $signature = Get-AuthenticodeSignature -FilePath $ToolPath - $signature.Status | Should -Be 'Valid' - $signature.SignerCertificate.Thumbprint | Should -Be $Thumbprint + + # For non production builds, the official signing certificate is not in play, so need to + # alter the assestion slightly, to account for the fact that UnknownError, is making the + # underlying problem, i.e. "A certificate chain processed, but terminated in a root + # certificate which is not trusted by the trust provider" + if ($signature.SignerCertificate.Issuer -match 'Chocolatey Software, Inc') { + $signature.Status | Should -Be 'UnknownError' + } + elseif ($signature.SignerCertificate.Issuer -match 'DigiCert') { + $signature.Status | Should -Be 'Valid' + } } It 'Should be version ' { diff --git a/tests/pester-tests/chocolatey.Tests.ps1 b/tests/pester-tests/chocolatey.Tests.ps1 index f35721189a..ea441658ac 100644 --- a/tests/pester-tests/chocolatey.Tests.ps1 +++ b/tests/pester-tests/chocolatey.Tests.ps1 @@ -29,8 +29,7 @@ Describe "Ensuring Chocolatey is correctly installed" -Tag Environment, Chocolat } BeforeAll { - # TODO: Both this thumbprint and strong name key should be in an environment variable. Update when new kitchen-pester is available. - https://github.com/chocolatey/choco/issues/2692 - $ChocolateyThumbprint = '83AC7D88C66CB8680BCE802E0F0F5C179722764B' + # TODO: This strong name key should be in an environment variable. Update when new kitchen-pester is available. - https://github.com/chocolatey/choco/issues/2692 $ChocolateyStrongNameKey = '79d02ea9cad655eb' # These lines are part of testing the issue # https://github.com/chocolatey/choco/issues/2233 @@ -118,14 +117,20 @@ Describe "Ensuring Chocolatey is correctly installed" -Tag Environment, Chocolat # This is skipped when not run in CI because it requires signed executables. Context "File signing (<_.FullName>)" -ForEach @($PowerShellFiles; $ExecutableFiles; $StrongNamingKeyFiles) -Skip:((-not $env:TEST_KITCHEN) -or (-not (Test-ChocolateyVersionEqualOrHigherThan "1.0.0"))) { BeforeAll { + # Due to changes in the signing setup, the certificate used to sign PS1 files and the Chocolatey CLI executable MIGHT be different. This ensures that the both certificates are trusted. $FileUnderTest = $_ - $SignerCert = (Get-AuthenticodeSignature (Get-ChocoPath)).SignerCertificate + $Ps1Cert = (Get-AuthenticodeSignature (Join-Path (Split-Path (Split-Path (Get-ChocoPath))) 'helpers/chocolateyScriptRunner.ps1')).SignerCertificate + $ExeCert = (Get-AuthenticodeSignature (Get-ChocoPath)).SignerCertificate $Cert = "$PWD\cert.cer" - # Write out the certificate - [IO.File]::WriteAllBytes($Cert, $SignerCert.export([security.cryptography.x509certificates.x509contenttype]::cert)) + # Write out the exe certificate + [IO.File]::WriteAllBytes($Cert, $ExeCert.export([security.cryptography.x509certificates.x509contenttype]::cert)) # Trust the certificate Import-Certificate -FilePath $Cert -CertStoreLocation 'Cert:\CurrentUser\TrustedPublisher\' Remove-Item -Path $Cert -Force -ErrorAction Ignore + # Write out the ps1 certificate + [IO.File]::WriteAllBytes($Cert, $Ps1Cert.export([security.cryptography.x509certificates.x509contenttype]::cert)) + # Trust the certificate + Import-Certificate -FilePath $Cert -CertStoreLocation 'Cert:\CurrentUser\TrustedPublisher\' } AfterAll { @@ -134,8 +139,17 @@ Describe "Ensuring Chocolatey is correctly installed" -Tag Environment, Chocolat It "Should be signed with our certificate" -Skip:($_.Name -like 'package*.exe') { $authenticodeSignature = Get-AuthenticodeSignature $FileUnderTest - $authenticodeSignature.Status | Should -Be 'Valid' - $authenticodeSignature.SignerCertificate.Thumbprint | Should -Be $ChocolateyThumbprint + + # For non production builds, the official signing certificate is not in play, so need to + # alter the assestion slightly, to account for the fact that UnknownError, is making the + # underlying problem, i.e. "A certificate chain processed, but terminated in a root + # certificate which is not trusted by the trust provider" + if ($authenticodeSignature.SignerCertificate.Issuer -match 'Chocolatey Software, Inc') { + $authenticodeSignature.Status | Should -Be 'UnknownError' + } + elseif ($signature.SignerCertificate.Issuer -match 'DigiCert') { + $authenticodeSignature.Status | Should -Be 'Valid' + } } It "Should be strongly named with our strong name key" -Skip:($_ -notin $StrongNamingKeyFilesToCheck) { @@ -181,20 +195,6 @@ Describe "Ensuring Chocolatey is correctly installed" -Tag Environment, Chocolat # $null = Invoke-Choco install MicrosoftWindowsPowerShellV2 -s windowsfeatures } - # This is Foss only as PowerShell running under version 2 doesn't have .net available and can't import the Licensed DLL. - # Tests on Windows 7 show no issues with running Chocolatey under Windows 7 with PowerShell v2 aside from issues surrounding TLS versions that we cannot resolve without an upgrade to Windows 7. - It "Imports ChocolateyInstaller module successfully in PowerShell v2" -Tag FossOnly { - $command = 'try { $ErrorActionPreference = ''Stop''; Import-Module $env:ChocolateyInstall\helpers\chocolateyInstaller.psm1 } catch { $_ ; exit 1 }' - $result = & powershell.exe -Version 2 -noprofile -command $command - $LastExitCode | Should -BeExactly 0 -Because $result - } - - It "Imports ChocolateyProfile module successfully in PowerShell v2" { - $command = 'try { $ErrorActionPreference = ''Stop''; Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1 } catch { $_ ; exit 1 }' - $result = & powershell.exe -Version 2 -noprofile -command $command - $LastExitCode | Should -BeExactly 0 -Because $result - } - Context "chocolateyScriptRunner.ps1" { BeforeAll { $Command = @' diff --git a/tests/pester-tests/chocolateyProfile.Tests.ps1 b/tests/pester-tests/chocolateyProfile.Tests.ps1 index c9fbf31b92..0064e2432e 100644 --- a/tests/pester-tests/chocolateyProfile.Tests.ps1 +++ b/tests/pester-tests/chocolateyProfile.Tests.ps1 @@ -52,9 +52,13 @@ Describe "Chocolatey Profile" -Tag Chocolatey, Profile, Environment { $Command = "choco pin " $Completions = (TabExpansion2 -inputScript $Command -cursorColumn $Command.Length).CompletionMatches.CompletionText - $Completions[0] | Should -Be "list" - $Completions[1] | Should -Be "add" - $Completions[2] | Should -Be "remove" + $becauseCompletions = ($Completions -Join ", ") + + $Completions[0] | Should -Be "list" -Because $becauseCompletions + $Completions[1] | Should -Be "add" -Because $becauseCompletions + $Completions[2] | Should -Be "remove" -Because $becauseCompletions + $Completions | Should -Contain "--name=''" -Because $becauseCompletions + $Completions | Should -Contain "--version=''" -Because $becauseCompletions } It "Should correctly complete partial completions" -Skip:$ExportNotPresent { @@ -68,18 +72,351 @@ Describe "Chocolatey Profile" -Tag Chocolatey, Profile, Environment { $Command = "choco export " $Completions = (TabExpansion2 -inputScript $Command -cursorColumn $Command.Length).CompletionMatches.CompletionText - $Completions[0] | Should -Be "--include-version-numbers" - $Completions[1] | Should -Be "--output-file-path=''" + $becauseCompletions = ($Completions -Join ", ") + + $Completions[0] | Should -Be "--include-version-numbers" -Because $becauseCompletions + $Completions[1] | Should -Be "--output-file-path=''" -Because $becauseCompletions } It "Should list completions for Template" { $Command = "choco template " $Completions = (TabExpansion2 -inputScript $Command -cursorColumn $Command.Length).CompletionMatches.CompletionText - $Completions[0] | Should -Be "list" - $Completions[1] | Should -Be "info" - $Completions[2] | Should -Be "-?" - $Completions[3] | Should -Be "--name=''" + $becauseCompletions = ($Completions -Join ", ") + + $Completions[0] | Should -Be "list" -Because $becauseCompletions + $Completions[1] | Should -Be "info" -Because $becauseCompletions + $Completions[2] | Should -Be "-?" -Because $becauseCompletions + $Completions | Should -Contain "--name=''" -Because $becauseCompletions + } + + It "Should list completions for upgrade" { + $Command = "choco upgrade " + $Completions = (TabExpansion2 -inputScript $Command -cursorColumn $Command.Length).CompletionMatches.CompletionText + + $becauseCompletions = ($Completions -Join ", ") + + $Completions | Should -Contain "-y" -Because $becauseCompletions + $Completions | Should -Contain "-whatif" -Because $becauseCompletions + $Completions | Should -Contain "--pre" -Because $becauseCompletions + $Completions | Should -Contain "--version=''" -Because $becauseCompletions + $Completions | Should -Contain "--except=''" -Because $becauseCompletions + $Completions | Should -Contain "--params=''" -Because $becauseCompletions + $Completions | Should -Contain "--install-arguments=''" -Because $becauseCompletions + $Completions | Should -Contain "--override-arguments" -Because $becauseCompletions + $Completions | Should -Contain "--ignore-dependencies" -Because $becauseCompletions + $Completions | Should -Contain "--source=''" -Because $becauseCompletions + $Completions | Should -Contain "--source='windowsfeatures'" -Because $becauseCompletions + $Completions | Should -Contain "--user=''" -Because $becauseCompletions + $Completions | Should -Contain "--password=''" -Because $becauseCompletions + $Completions | Should -Contain "--prerelease" -Because $becauseCompletions + $Completions | Should -Contain "--forcex86" -Because $becauseCompletions + $Completions | Should -Contain "--not-silent" -Because $becauseCompletions + $Completions | Should -Contain "--package-parameters=''" -Because $becauseCompletions + $Completions | Should -Contain "--exit-when-reboot-detected" -Because $becauseCompletions + $Completions | Should -Contain "--ignore-detected-reboot" -Because $becauseCompletions + $Completions | Should -Contain "--allow-downgrade" -Because $becauseCompletions + $Completions | Should -Contain "--require-checksums" -Because $becauseCompletions + $Completions | Should -Contain "--use-package-exit-codes" -Because $becauseCompletions + $Completions | Should -Contain "--ignore-package-exit-codes" -Because $becauseCompletions + $Completions | Should -Contain "--skip-automation-scripts" -Because $becauseCompletions + $Completions | Should -Contain "--fail-on-unfound" -Because $becauseCompletions + $Completions | Should -Contain "--fail-on-not-installed" -Because $becauseCompletions + $Completions | Should -Contain "--ignore-checksums" -Because $becauseCompletions + $Completions | Should -Contain "--allow-empty-checksums" -Because $becauseCompletions + $Completions | Should -Contain "--allow-empty-checksums-secure" -Because $becauseCompletions + $Completions | Should -Contain "--download-checksum=''" -Because $becauseCompletions + $Completions | Should -Contain "--download-checksum-type=''" -Because $becauseCompletions + $Completions | Should -Contain "--download-checksum-x64=''" -Because $becauseCompletions + $Completions | Should -Contain "--download-checksum-type-x64=''" -Because $becauseCompletions + $Completions | Should -Contain "--exclude-prerelease" -Because $becauseCompletions + $Completions | Should -Contain "--stop-on-first-package-failure" -Because $becauseCompletions + $Completions | Should -Contain "--use-remembered-options" -Because $becauseCompletions + $Completions | Should -Contain "--ignore-remembered-options" -Because $becauseCompletions + $Completions | Should -Contain "--skip-when-not-installed" -Because $becauseCompletions + $Completions | Should -Contain "--install-if-not-installed" -Because $becauseCompletions + $Completions | Should -Contain "--disable-package-repository-optimizations" -Because $becauseCompletions + $Completions | Should -Contain "--pin" -Because $becauseCompletions + $Completions | Should -Contain "--ignore-pinned" -Because $becauseCompletions + $Completions | Should -Contain "--include-configured-sources" -Because $becauseCompletions + } + + It "Should list completions for rule" { + $Command = "choco rule " + $Completions = (TabExpansion2 -inputScript $Command -cursorColumn $Command.Length).CompletionMatches.CompletionText + + $becauseCompletions = ($Completions -Join ", ") + + $Completions | Should -Contain "--name=''" -Because $becauseCompletions + } + + It "Should list completions for search" { + $Command = "choco search " + $Completions = (TabExpansion2 -inputScript $Command -cursorColumn $Command.Length).CompletionMatches.CompletionText + + $becauseCompletions = ($Completions -Join ", ") + + $Completions | Should -Contain "--id-only" -Because $becauseCompletions + $Completions | Should -Contain "--pre" -Because $becauseCompletions + $Completions | Should -Contain "--exact" -Because $becauseCompletions + $Completions | Should -Contain "--by-id-only" -Because $becauseCompletions + $Completions | Should -Contain "--id-starts-with" -Because $becauseCompletions + $Completions | Should -Contain "--detailed" -Because $becauseCompletions + $Completions | Should -Contain "--approved-only" -Because $becauseCompletions + $Completions | Should -Contain "--not-broken" -Because $becauseCompletions + $Completions | Should -Contain "--source=''" -Because $becauseCompletions + $Completions | Should -Contain "--user=''" -Because $becauseCompletions + $Completions | Should -Contain "--password=''" -Because $becauseCompletions + $Completions | Should -Contain "--prerelease" -Because $becauseCompletions + $Completions | Should -Contain "--include-programs" -Because $becauseCompletions + $Completions | Should -Contain "--page=''" -Because $becauseCompletions + $Completions | Should -Contain "--page-size=''" -Because $becauseCompletions + $Completions | Should -Contain "--order-by-popularity" -Because $becauseCompletions + $Completions | Should -Contain "--download-cache-only" -Because $becauseCompletions + $Completions | Should -Contain "--disable-package-repository-optimizations" -Because $becauseCompletions + $Completions | Should -Contain "--include-configured-sources" -Because $becauseCompletions + } + + It "Should list completions for info" { + $Command = "choco info " + $Completions = (TabExpansion2 -inputScript $Command -cursorColumn $Command.Length).CompletionMatches.CompletionText + + $becauseCompletions = ($Completions -Join ", ") + + $Completions | Should -Contain "--source=''" -Because $becauseCompletions + $Completions | Should -Contain "--local-only" -Because $becauseCompletions + $Completions | Should -Contain "--version=''" -Because $becauseCompletions + $Completions | Should -Contain "--prerelease" -Because $becauseCompletions + $Completions | Should -Contain "--user=''" -Because $becauseCompletions + $Completions | Should -Contain "--password=''" -Because $becauseCompletions + $Completions | Should -Contain "--cert=''" -Because $becauseCompletions + $Completions | Should -Contain "--certpassword=''" -Because $becauseCompletions + $Completions | Should -Contain "--disable-package-repository-optimizations" -Because $becauseCompletions + $Completions | Should -Contain "--include-configured-sources" -Because $becauseCompletions + } + + It "Should list completions for install" { + $Command = "choco install " + $Completions = (TabExpansion2 -inputScript $Command -cursorColumn $Command.Length).CompletionMatches.CompletionText + + $becauseCompletions = ($Completions -Join ", ") + + $Completions | Should -Contain "-y" -Because $becauseCompletions + $Completions | Should -Contain "-whatif" -Because $becauseCompletions + $Completions | Should -Contain "--pre" -Because $becauseCompletions + $Completions | Should -Contain "--version=''" -Because $becauseCompletions + $Completions | Should -Contain "--params=''" -Because $becauseCompletions + $Completions | Should -Contain "--install-arguments=''" -Because $becauseCompletions + $Completions | Should -Contain "--override-arguments" -Because $becauseCompletions + $Completions | Should -Contain "--ignore-dependencies" -Because $becauseCompletions + $Completions | Should -Contain "--source=''" -Because $becauseCompletions + $Completions | Should -Contain "--source='windowsfeatures'" -Because $becauseCompletions + $Completions | Should -Contain "--user=''" -Because $becauseCompletions + $Completions | Should -Contain "--password=''" -Because $becauseCompletions + $Completions | Should -Contain "--prerelease" -Because $becauseCompletions + $Completions | Should -Contain "--forcex86" -Because $becauseCompletions + $Completions | Should -Contain "--not-silent" -Because $becauseCompletions + $Completions | Should -Contain "--package-parameters=''" -Because $becauseCompletions + $Completions | Should -Contain "--exit-when-reboot-detected" -Because $becauseCompletions + $Completions | Should -Contain "--ignore-detected-reboot" -Because $becauseCompletions + $Completions | Should -Contain "--allow-downgrade" -Because $becauseCompletions + $Completions | Should -Contain "--force-dependencies" -Because $becauseCompletions + $Completions | Should -Contain "--require-checksums" -Because $becauseCompletions + $Completions | Should -Contain "--use-package-exit-codes" -Because $becauseCompletions + $Completions | Should -Contain "--ignore-package-exit-codes" -Because $becauseCompletions + $Completions | Should -Contain "--skip-automation-scripts" -Because $becauseCompletions + $Completions | Should -Contain "--ignore-checksums" -Because $becauseCompletions + $Completions | Should -Contain "--allow-empty-checksums" -Because $becauseCompletions + $Completions | Should -Contain "--allow-empty-checksums-secure" -Because $becauseCompletions + $Completions | Should -Contain "--download-checksum=''" -Because $becauseCompletions + $Completions | Should -Contain "--download-checksum-type=''" -Because $becauseCompletions + $Completions | Should -Contain "--download-checksum-x64=''" -Because $becauseCompletions + $Completions | Should -Contain "--download-checksum-type-x64=''" -Because $becauseCompletions + $Completions | Should -Contain "--stop-on-first-package-failure" -Because $becauseCompletions + $Completions | Should -Contain "--disable-package-repository-optimizations" -Because $becauseCompletions + $Completions | Should -Contain "--pin" -Because $becauseCompletions + $Completions | Should -Contain "--include-configured-sources" -Because $becauseCompletions + } + + It "Should list completions for outdated" { + $Command = "choco outdated " + $Completions = (TabExpansion2 -inputScript $Command -cursorColumn $Command.Length).CompletionMatches.CompletionText + + $becauseCompletions = ($Completions -Join ", ") + + $Completions | Should -Contain "--source=''" -Because $becauseCompletions + $Completions | Should -Contain "--user=''" -Because $becauseCompletions + $Completions | Should -Contain "--password=''" -Because $becauseCompletions + $Completions | Should -Contain "--ignore-pinned" -Because $becauseCompletions + $Completions | Should -Contain "--ignore-unfound" -Because $becauseCompletions + $Completions | Should -Contain "--pre" -Because $becauseCompletions + $Completions | Should -Contain "--prerelease" -Because $becauseCompletions + $Completions | Should -Contain "--disable-package-repository-optimizations" -Because $becauseCompletions + $Completions | Should -Contain "--include-configured-sources" -Because $becauseCompletions + } + + It "Should list completions for cache" { + $Command = "choco cache " + $Completions = (TabExpansion2 -inputScript $Command -cursorColumn $Command.Length).CompletionMatches.CompletionText + + $becauseCompletions = ($Completions -Join ", ") + + $Completions[0] | Should -Be "list" -Because $becauseCompletions + $Completions[1] | Should -Be "remove" -Because $becauseCompletions + $Completions[2] | Should -Be "-?" -Because $becauseCompletions + $Completions | Should -Contain "--expired" -Because $becauseCompletions + } + + It "Should list completions for feature" { + $Command = "choco feature " + $Completions = (TabExpansion2 -inputScript $Command -cursorColumn $Command.Length).CompletionMatches.CompletionText + + $becauseCompletions = ($Completions -Join ", ") + + $Completions[0] | Should -Be "list" -Because $becauseCompletions + $Completions[1] | Should -Be "get" -Because $becauseCompletions + $Completions[2] | Should -Be "disable" -Because $becauseCompletions + $Completions[3] | Should -Be "enable" -Because $becauseCompletions + $Completions[4] | Should -Be "-?" -Because $becauseCompletions + $Completions | Should -Contain "--name=''" -Because $becauseCompletions + } + + It "Should list completions for config" { + $Command = "choco config " + $Completions = (TabExpansion2 -inputScript $Command -cursorColumn $Command.Length).CompletionMatches.CompletionText + + $becauseCompletions = ($Completions -Join ", ") + + $Completions[0] | Should -Be "list" -Because $becauseCompletions + $Completions[1] | Should -Be "get" -Because $becauseCompletions + $Completions[2] | Should -Be "set" -Because $becauseCompletions + $Completions[3] | Should -Be "unset" -Because $becauseCompletions + $Completions[4] | Should -Be "-?" -Because $becauseCompletions + $Completions | Should -Contain "--name=''" -Because $becauseCompletions + $Completions | Should -Contain "--value=''" -Because $becauseCompletions + } + + It "Should list completions for source" { + $Command = "choco source " + $Completions = (TabExpansion2 -inputScript $Command -cursorColumn $Command.Length).CompletionMatches.CompletionText + + $becauseCompletions = ($Completions -Join ", ") + + $Completions[0] | Should -Be "list" -Because $becauseCompletions + $Completions[1] | Should -Be "add" -Because $becauseCompletions + $Completions[2] | Should -Be "remove" -Because $becauseCompletions + $Completions[3] | Should -Be "disable" -Because $becauseCompletions + $Completions[4] | Should -Be "enable" -Because $becauseCompletions + $Completions | Should -Contain "-?" -Because $becauseCompletions + $Completions | Should -Contain "--name=''" -Because $becauseCompletions + $Completions | Should -Contain "--source=''" -Because $becauseCompletions + $Completions | Should -Contain "--user=''" -Because $becauseCompletions + $Completions | Should -Contain "--password=''" -Because $becauseCompletions + $Completions | Should -Contain "--priority=''" -Because $becauseCompletions + $Completions | Should -Contain "--bypass-proxy" -Because $becauseCompletions + $Completions | Should -Contain "--allow-self-service" -Because $becauseCompletions + } + + It "Should list completions for apikey" { + $Command = "choco apikey " + $Completions = (TabExpansion2 -inputScript $Command -cursorColumn $Command.Length).CompletionMatches.CompletionText + + $becauseCompletions = ($Completions -Join ", ") + + $Completions | Should -Contain "--source=''" -Because $becauseCompletions + $Completions | Should -Contain "--api-key=''" -Because $becauseCompletions + $Completions | Should -Contain "--remove" -Because $becauseCompletions + } + + It "Should list completions for push" { + $Command = "choco push " + $Completions = (TabExpansion2 -inputScript $Command -cursorColumn $Command.Length).CompletionMatches.CompletionText + + $becauseCompletions = ($Completions -Join ", ") + + $Completions | Should -Contain "--source=''" -Because $becauseCompletions + $Completions | Should -Contain "--api-key=''" -Because $becauseCompletions + $Completions | Should -Contain "--timeout=''" -Because $becauseCompletions + } + + It "Should list completions for pack" { + $Command = "choco pack " + $Completions = (TabExpansion2 -inputScript $Command -cursorColumn $Command.Length).CompletionMatches.CompletionText + + $becauseCompletions = ($Completions -Join ", ") + + $Completions | Should -Contain "--version=''" -Because $becauseCompletions + $Completions | Should -Contain "--output-directory=''" -Because $becauseCompletions + } + + It "Should list completions for new" { + $Command = "choco new " + $Completions = (TabExpansion2 -inputScript $Command -cursorColumn $Command.Length).CompletionMatches.CompletionText + + $becauseCompletions = ($Completions -Join ", ") + + $Completions | Should -Contain "--template-name=''" -Because $becauseCompletions + $Completions | Should -Contain "--output-directory=''" -Because $becauseCompletions + $Completions | Should -Contain "--automaticpackage" -Because $becauseCompletions + $Completions | Should -Contain "--version=''" -Because $becauseCompletions + $Completions | Should -Contain "--maintainer=''" -Because $becauseCompletions + $Completions | Should -Contain "packageversion=''" -Because $becauseCompletions + $Completions | Should -Contain "maintainername=''" -Because $becauseCompletions + $Completions | Should -Contain "maintainerrepo=''" -Because $becauseCompletions + $Completions | Should -Contain "installertype=''" -Because $becauseCompletions + $Completions | Should -Contain "url=''" -Because $becauseCompletions + $Completions | Should -Contain "url64=''" -Because $becauseCompletions + $Completions | Should -Contain "silentargs=''" -Because $becauseCompletions + $Completions | Should -Contain "--use-built-in-template" -Because $becauseCompletions + } + + It "Should list completions for uninstall" { + $Command = "choco uninstall " + $Completions = (TabExpansion2 -inputScript $Command -cursorColumn $Command.Length).CompletionMatches.CompletionText + + $becauseCompletions = ($Completions -Join ", ") + + $Completions | Should -Contain "-y" -Because $becauseCompletions + $Completions | Should -Contain "-whatif" -Because $becauseCompletions + $Completions | Should -Contain "--force-dependencies" -Because $becauseCompletions + $Completions | Should -Contain "--remove-dependencies" -Because $becauseCompletions + $Completions | Should -Contain "--all-versions" -Because $becauseCompletions + $Completions | Should -Contain "--source='windowsfeatures'" -Because $becauseCompletions + $Completions | Should -Contain "--version=''" -Because $becauseCompletions + $Completions | Should -Contain "--uninstall-arguments=''" -Because $becauseCompletions + $Completions | Should -Contain "--override-arguments" -Because $becauseCompletions + $Completions | Should -Contain "--not-silent" -Because $becauseCompletions + $Completions | Should -Contain "--params=''" -Because $becauseCompletions + $Completions | Should -Contain "--package-parameters=''" -Because $becauseCompletions + $Completions | Should -Contain "--exit-when-reboot-detected" -Because $becauseCompletions + $Completions | Should -Contain "--ignore-detected-reboot" -Because $becauseCompletions + $Completions | Should -Contain "--use-package-exit-codes" -Because $becauseCompletions + $Completions | Should -Contain "--ignore-package-exit-codes" -Because $becauseCompletions + $Completions | Should -Contain "--skip-automation-scripts" -Because $becauseCompletions + $Completions | Should -Contain "--use-autouninstaller" -Because $becauseCompletions + $Completions | Should -Contain "--skip-autouninstaller" -Because $becauseCompletions + $Completions | Should -Contain "--fail-on-autouninstaller" -Because $becauseCompletions + $Completions | Should -Contain "--ignore-autouninstaller-failure" -Because $becauseCompletions + $Completions | Should -Contain "--stop-on-first-package-failure" -Because $becauseCompletions + } + + It "Should list completions for list" { + $Command = "choco list " + $Completions = (TabExpansion2 -inputScript $Command -cursorColumn $Command.Length).CompletionMatches.CompletionText + + $becauseCompletions = ($Completions -Join ", ") + + $Completions | Should -Contain "--id-only" -Because $becauseCompletions + $Completions | Should -Contain "--pre" -Because $becauseCompletions + $Completions | Should -Contain "--exact" -Because $becauseCompletions + $Completions | Should -Contain "--by-id-only" -Because $becauseCompletions + $Completions | Should -Contain "--id-starts-with" -Because $becauseCompletions + $Completions | Should -Contain "--detailed" -Because $becauseCompletions + $Completions | Should -Contain "--prerelease" -Because $becauseCompletions + $Completions | Should -Contain "--include-programs" -Because $becauseCompletions + $Completions | Should -Contain "--source=''" -Because $becauseCompletions + $Completions | Should -Contain "--page=''" -Because $becauseCompletions + $Completions | Should -Contain "--page-size=''" -Because $becauseCompletions } } } diff --git a/tests/pester-tests/commands/Install-ChocolateyInstallPackage.Tests.ps1 b/tests/pester-tests/commands/Install-ChocolateyInstallPackage.Tests.ps1 new file mode 100644 index 0000000000..eec4360e65 --- /dev/null +++ b/tests/pester-tests/commands/Install-ChocolateyInstallPackage.Tests.ps1 @@ -0,0 +1,47 @@ +Describe 'Testing Install-ChocolateyInstallPackage' { + BeforeDiscovery { + # These tests are explicitly testing some scenarios that are not immediately + # obvious. The test package sets 'SilentArguments' to a flag with a trailing space. + # This is being tested both with and without Chocolatey adding additional + # arguments. The package also sets the ChocolateyAdditionalArguments + # environment variable to a string also with a trailing space. + # Using exe as an example, that means the arguments passed are expected to be `/exe ` and then `/exe /norestart ` (Note the extra spaces in both instances). + $ExpectedOutput = @( + @{ + OutputWithoutAdditionalArguments = '\["C:\\.*\\lib\\install-chocolateyinstallpackage-tests\\tools\\ConsoleApp1.exe" /exe \]' + OutputWithAdditionalArguments = '\["C:\\.*\\lib\\install-chocolateyinstallpackage-tests\\tools\\ConsoleApp1.exe" /exe /norestart \]' + Type = 'exe' + } + @{ + OutputWithoutAdditionalArguments = '\["C:\\Windows\\System32\\msiexec.exe" /i "C:\\.*\\lib\\install-chocolateyinstallpackage-tests\\tools\\ConsoleApp1.msi" /qn \]' + OutputWithAdditionalArguments = '\["C:\\Windows\\System32\\msiexec.exe" /i "C:\\.*\\lib\\install-chocolateyinstallpackage-tests\\tools\\ConsoleApp1.msi" /qn /norestart \]' + Type = 'msi' + } + @{ + OutputWithoutAdditionalArguments = '\["C:\\Windows\\System32\\wusa.exe" "C:\\.*\\lib\\install-chocolateyinstallpackage-tests\\tools\\ConsoleApp1.msu" /quiet \]' + OutputWithAdditionalArguments = '\["C:\\Windows\\System32\\wusa.exe" "C:\\.*\\lib\\install-chocolateyinstallpackage-tests\\tools\\ConsoleApp1.msu" /quiet /norestart \]' + Type = 'msu' + } + ) + } + + BeforeAll { + Initialize-ChocolateyTestInstall + $PackageUnderTest = 'install-chocolateyinstallpackage-tests' + Restore-ChocolateyInstallSnapshot + $Output = Invoke-Choco install $PackageUnderTest --confirm --debug + } + + AfterAll { + Remove-ChocolateyInstallSnapshot + } + + It 'Exits with Success (0)' { + $Output.ExitCode | Should -Be 0 -Because $Output.String + } + + It 'Output is accurate for installer type ' -ForEach $ExpectedOutput { + $Output.String | Should -MatchExactly $OutputWithoutAdditionalArguments -Because ($Output.Lines | Select-String "ConsoleApp1.$Type") + $Output.String | Should -MatchExactly $OutputWithAdditionalArguments -Because ($Output.Lines | Select-String "ConsoleApp1.$Type") + } +} diff --git a/tests/pester-tests/commands/choco-apikey.Tests.ps1 b/tests/pester-tests/commands/choco-apikey.Tests.ps1 index 5ed9daf81f..9660a61c30 100644 --- a/tests/pester-tests/commands/choco-apikey.Tests.ps1 +++ b/tests/pester-tests/commands/choco-apikey.Tests.ps1 @@ -371,6 +371,41 @@ Describe "choco <_>" -ForEach $Command -Tag Chocolatey, ApiKeyCommand { } } + Context "Adding an apikey when it is already added" { + BeforeAll { + Restore-ChocolateyInstallSnapshot + + # Ensure that the apikey is indeed set + $null = Invoke-Choco apikey add --source "https://somewhere.out/there/" --api-key "123-4567-89" + + $Output = Invoke-Choco apikey add --source "https://somewhere.out/there/" --api-key "123-4567-89" + } + + It "Exits with ExitCode 0" { + $Output.ExitCode | Should -Be 0 -Because $Output.String + } + + It "Changes Nothing" { + $Output.Lines | Should -Contain "Nothing to change. Config already set." + } + + Context "when using enhanced exit codes" { + BeforeAll { + $null = Enable-ChocolateyFeature -Name "useEnhancedExitCodes" + + $Output = Invoke-Choco apikey add --source "https://somewhere.out/there/" --api-key "123-4567-89" + } + + It "Exits with ExitCode 2" { + $Output.ExitCode | Should -Be 2 -Because $Output.String + } + + It "Changes Nothing" { + $Output.Lines | Should -Contain "Nothing to change. Config already set." + } + } + } + # This needs to be the last test in this block, to ensure NuGet configurations aren't being created. Test-NuGetPaths } diff --git a/tests/pester-tests/commands/choco-config.Tests.ps1 b/tests/pester-tests/commands/choco-config.Tests.ps1 index 92868b84a3..3822126ba1 100644 --- a/tests/pester-tests/commands/choco-config.Tests.ps1 +++ b/tests/pester-tests/commands/choco-config.Tests.ps1 @@ -175,6 +175,38 @@ Describe "choco config" -Tag Chocolatey, ConfigCommand { } } + Context "Setting a configuration setting (cacheLocation) with same value that already exists" { + BeforeAll { + $null = Invoke-Choco config set cacheLocation "C:\temp\choco" + + $Output = Invoke-Choco config set cacheLocation "C:\temp\choco" + } + + It "Exits with Success (0)" { + $Output.ExitCode | Should -Be 0 -Because $Output.String + } + + It "Changes Nothing" { + $Output.Lines | Should -Contain "Nothing to change. Config already set." + } + + Context "when using enhanced exit codes" { + BeforeAll { + $null = Enable-ChocolateyFeature -Name "useEnhancedExitCodes" + + $Output = Invoke-Choco config set cacheLocation "C:\temp\choco" + } + + It "Exits with ExitCode 2" { + $Output.ExitCode | Should -Be 2 -Because $Output.String + } + + It "Changes Nothing" { + $Output.Lines | Should -Contain "Nothing to change. Config already set." + } + } + } + Context "Setting a configuration setting not available by default (newConfiguration)" { BeforeAll { $Output = Invoke-Choco config set --name newConfiguration --value some-value @@ -261,6 +293,7 @@ Describe "choco config" -Tag Chocolatey, ConfigCommand { Context "Unsetting a configuration that doesn't exist" { BeforeAll { + $null = Disable-ChocolateyFeature -Name "useEnhancedExitCodes" $Output = Invoke-Choco config unset not-existing [xml]$ConfigFileContent = Get-Content $env:ChocolateyInstall\config\chocolatey.config @@ -275,7 +308,7 @@ Describe "choco config" -Tag Chocolatey, ConfigCommand { $Output.Lines | Should -Contain $expectedLicenseHeader } - It "Displays config value Added" { + It "Changes nothing" { $Output.Lines | Should -Contain "Nothing to change. Config already set." } @@ -283,6 +316,22 @@ Describe "choco config" -Tag Chocolatey, ConfigCommand { $value = $configs.Where{ $_.key -eq "not-existing" } $value | Should -HaveCount 0 } + + Context "when using enhanced exit codes" { + BeforeAll { + $null = Enable-ChocolateyFeature -Name "useEnhancedExitCodes" + + $Output = Invoke-Choco config unset not-existing + } + + It "Exits with ExitCode 2" { + $Output.ExitCode | Should -Be 2 -Because $Output.String + } + + It "Changes Nothing" { + $Output.Lines | Should -Contain "Nothing to change. Config already set." + } + } } # This needs to be the last test in this block, to ensure NuGet configurations aren't being created. diff --git a/tests/pester-tests/commands/choco-feature.Tests.ps1 b/tests/pester-tests/commands/choco-feature.Tests.ps1 index 21322d8b78..48acb6a4ce 100644 --- a/tests/pester-tests/commands/choco-feature.Tests.ps1 +++ b/tests/pester-tests/commands/choco-feature.Tests.ps1 @@ -112,6 +112,76 @@ Describe "choco <_>" -ForEach $Command -Tag Chocolatey, FeatureCommand { } } + Context "Enabling a feature when it is already enabled" { + BeforeAll { + Restore-ChocolateyInstallSnapshot + + # Ensure that the feature is already enabled + $null = Invoke-Choco feature enable --name allowGlobalConfirmation + + $Output = Invoke-Choco feature enable --name allowGlobalConfirmation + } + + It "Exits with ExitCode 0" { + $Output.ExitCode | Should -Be 0 -Because $Output.String + } + + It "Changes Nothing" { + $Output.Lines | Should -Contain "Nothing to change. Config already set." + } + + Context "when using enhanced exit codes" { + BeforeAll { + $null = Enable-ChocolateyFeature -Name "useEnhancedExitCodes" + + $Output = Invoke-Choco feature enable --name allowGlobalConfirmation + } + + It "Exits with ExitCode 2" { + $Output.ExitCode | Should -Be 2 -Because $Output.String + } + + It "Changes Nothing" { + $Output.Lines | Should -Contain "Nothing to change. Config already set." + } + } + } + + Context "Disabling a feature when it is already disabled" { + BeforeAll { + Restore-ChocolateyInstallSnapshot + + # Ensure that the feature is already disabled + $null = Invoke-Choco feature disable --name allowGlobalConfirmation + + $Output = Invoke-Choco feature disable --name allowGlobalConfirmation + } + + It "Exits with ExitCode 0" { + $Output.ExitCode | Should -Be 0 -Because $Output.String + } + + It "Changes Nothing" { + $Output.Lines | Should -Contain "Nothing to change. Config already set." + } + + Context "when using enhanced exit codes" { + BeforeAll { + $null = Enable-ChocolateyFeature -Name "useEnhancedExitCodes" + + $Output = Invoke-Choco feature disable --name allowGlobalConfirmation + } + + It "Exits with ExitCode 2" { + $Output.ExitCode | Should -Be 2 -Because $Output.String + } + + It "Changes Nothing" { + $Output.Lines | Should -Contain "Nothing to change. Config already set." + } + } + } + Context "Disabling usePackageRepositoryOptimizations" { BeforeAll { Restore-ChocolateyInstallSnapshot diff --git a/tests/pester-tests/commands/choco-info.Tests.ps1 b/tests/pester-tests/commands/choco-info.Tests.ps1 index bc3eaa1a47..60c7b40747 100644 --- a/tests/pester-tests/commands/choco-info.Tests.ps1 +++ b/tests/pester-tests/commands/choco-info.Tests.ps1 @@ -12,6 +12,45 @@ Remove-ChocolateyTestInstall } + Context "Should include remembered arguments (including redacted) when using option --local-only" { + BeforeAll { + Initialize-ChocolateyTestInstall -Source $PSScriptRoot\testpackages + + $Setup = Invoke-Choco install installpackage --package-parameters="bob" --password="secure-password" --confirm + + $Setup.ExitCode | Should -Be 0 -Because $Setup.String + + $Output = Invoke-Choco info installpackage --local-only + } + + It "Exits with Success (0)" { + $Output.ExitCode | Should -Be 0 -Because $Output.String + } + + It "Should contain a summary" { + $Output.Lines | Should -Contain "Remembered Package Arguments:" -Because $Output.String + $Output.Lines | Should -Contain "--package-parameters='bob'" -Because $Output.String + $Output.Lines | Should -Contain "--password=[REDACTED ARGUMENT]" -Because $Output.String + } + } + + Context "Should include configured sources" { + BeforeAll { + Initialize-ChocolateyTestInstall -Source $PSScriptRoot\testpackages + Invoke-Choco install installpackage --confirm + + $Output = Invoke-Choco info installpackage --include-configured-sources --debug + } + + It "Exits with Success (0)" { + $Output.ExitCode | Should -Be 0 -Because $Output.String + } + + It "Should mention that configured sources have been included" { + $Output.Lines | Should -Contain "Including sources from chocolatey.config file." -Because $Output.String + } + } + Context "Listing package information when package can be found" { BeforeDiscovery { $infoItems = @( @@ -187,11 +226,11 @@ } It 'Outputs warning about unable to load service index' { - $Output.Lines | Should -Contain "Unable to load the service index for source $InvalidSource." + $Output.Lines | Should -Contain "Unable to load the service index for source $InvalidSource." -Because $Output.String } It 'Output information about the package' { - $Output.String | Should -Match "Title: Chocolatey " + $Output.String | Should -Match "Title: Chocolatey " -Because $Output.String } } diff --git a/tests/pester-tests/commands/choco-install.Tests.ps1 b/tests/pester-tests/commands/choco-install.Tests.ps1 index c5257a4d49..67b40473f2 100644 --- a/tests/pester-tests/commands/choco-install.Tests.ps1 +++ b/tests/pester-tests/commands/choco-install.Tests.ps1 @@ -83,7 +83,153 @@ $PackageUnderTest = "installpackage" - $Output = Invoke-Choco install $PackageUnderTest --confirm + $Output = Invoke-Choco install $PackageUnderTest --debug --confirm + } + + It "Exits with Success (0)" { + $Output.ExitCode | Should -Be 0 -Because $Output.String + } + + It "Installed a package to the lib directory" { + "$env:ChocolateyInstall\lib\$PackageUnderTest" | Should -Exist + } + + # We are skipping this for now, until we have stabilized the directory + # path reporting functionality. There are times that this test will + # fail due to Chocolatey not reporting the path. + # This failure seems to happen randomly, and is therefore not a + # reliable test we can make. + It "Outputs the installation directory (which should exist)" -Skip { + $directoryPath = "$env:ChocolateyInstall\lib\$PackageUnderTest" + $lineRegex = [regex]::Escape($directoryPath) + + $foundPath = $Output.Lines -match $lineRegex + $foundPath | Should -Not -BeNullOrEmpty + $foundPath | Should -Exist + } + + It "Installs the expected version of the package" { + "$env:ChocolateyInstall\lib\$PackageUnderTest\$PackageUnderTest.nuspec" | Should -Exist + [xml]$XML = Get-Content "$env:ChocolateyInstall\lib\$PackageUnderTest\$PackageUnderTest.nuspec" + $XML.package.metadata.version | Should -Be "1.0.0" + } + + It "Creates a Console Shim in the Bin Directory" { + "$env:ChocolateyInstall\bin\console.exe" | Should -Exist + } + + It "Creates a Graphical Shim in the Bin Directory" { + "$env:ChocolateyInstall\bin\graphical.exe" | Should -Exist + } + + It "Does not create a Shim for Ignored Executable in the Bin Directory" { + "$env:ChocolateyInstall\bin\not.installed.exe" | Should -Not -Exist + } + + It "Does not create a Shim for Ignored Executable (with mismatched case) in the Bin Directory" { + "$env:ChocolateyInstall\bin\casemismatch.exe" | Should -Not -Exist + } + + It "Does not create an extensions folder for the package" { + "$env:ChocolateyInstall\extensions\$PackageUnderTest" | Should -Not -Exist + } + + It "Contains the output of the ChocolateyInstall.ps1 script" { + $Output.Lines | Should -Contain "Ya!" + } + + It "Outputs a message showing that installation was successful" { + $Output.String | Should -Match "Chocolatey installed 1/1 packages\." + } + + It "Should mention that package hash verification has been skipped" { + $Output.Lines | Should -Contain "Skipping package hash validation as feature 'usePackageHashValidation' is not enabled." -Because $Output.String + } + } + + Context "Installing a Package (Happy Path) with hash validation enabled" { + BeforeAll { + Restore-ChocolateyInstallSnapshot + + $null = Enable-ChocolateyFeature -Name "usePackageHashValidation" + + $PackageUnderTest = "installpackage" + + $Output = Invoke-Choco install $PackageUnderTest --debug --confirm + } + + It "Exits with Success (0)" { + $Output.ExitCode | Should -Be 0 -Because $Output.String + } + + It "Installed a package to the lib directory" { + "$env:ChocolateyInstall\lib\$PackageUnderTest" | Should -Exist + } + + # We are skipping this for now, until we have stabilized the directory + # path reporting functionality. There are times that this test will + # fail due to Chocolatey not reporting the path. + # This failure seems to happen randomly, and is therefore not a + # reliable test we can make. + It "Outputs the installation directory (which should exist)" -Skip { + $directoryPath = "$env:ChocolateyInstall\lib\$PackageUnderTest" + $lineRegex = [regex]::Escape($directoryPath) + + $foundPath = $Output.Lines -match $lineRegex + $foundPath | Should -Not -BeNullOrEmpty + $foundPath | Should -Exist + } + + It "Installs the expected version of the package" { + "$env:ChocolateyInstall\lib\$PackageUnderTest\$PackageUnderTest.nuspec" | Should -Exist + [xml]$XML = Get-Content "$env:ChocolateyInstall\lib\$PackageUnderTest\$PackageUnderTest.nuspec" + $XML.package.metadata.version | Should -Be "1.0.0" + } + + It "Creates a Console Shim in the Bin Directory" { + "$env:ChocolateyInstall\bin\console.exe" | Should -Exist + } + + It "Creates a Graphical Shim in the Bin Directory" { + "$env:ChocolateyInstall\bin\graphical.exe" | Should -Exist + } + + It "Does not create a Shim for Ignored Executable in the Bin Directory" { + "$env:ChocolateyInstall\bin\not.installed.exe" | Should -Not -Exist + } + + It "Does not create a Shim for Ignored Executable (with mismatched case) in the Bin Directory" { + "$env:ChocolateyInstall\bin\casemismatch.exe" | Should -Not -Exist + } + + It "Does not create an extensions folder for the package" { + "$env:ChocolateyInstall\extensions\$PackageUnderTest" | Should -Not -Exist + } + + It "Contains the output of the ChocolateyInstall.ps1 script" { + $Output.Lines | Should -Contain "Ya!" + } + + It "Outputs a message showing that installation was successful" { + $Output.String | Should -Match "Chocolatey installed 1/1 packages\." + } + + It "Should mention that package hash verification was skipped since local folder source is being used" { + if ((Test-HasNuGetV3Source) -or (-not $env:TEST_KITCHEN)) { + $Output.Lines | Should -Contain "Source does not provide a package hash, skipping package hash validation." -Because $Output.String + } else { + $Output.Lines | Should -Contain "Package hash matches expected hash." -Because $Output.String + } + } + } + + Context "Installing a Package (Happy Path) including configured sources" { + BeforeAll { + Restore-ChocolateyInstallSnapshot + + $PackageUnderTest = "installpackage" + + $Output = Invoke-Choco install $PackageUnderTest --include-configured-sources --debug --confirm } It "Exits with Success (0)" { @@ -141,6 +287,10 @@ It "Outputs a message showing that installation was successful" { $Output.String | Should -Match "Chocolatey installed 1/1 packages\." } + + It "Should mention that configured sources have been included" { + $Output.Lines | Should -Contain "Including sources from chocolatey.config file." -Because $Output.String + } } Context "Installing a Package with Packages.config" { @@ -1230,7 +1380,7 @@ To install a local, or remote file, you may use: } It "Outputs installation to the correct location" { - $Output.Lines | Should -Contain "Software installed to '$($env:ChocolateyInstall)\lib\$PackageUnderTest'" + $Output.Lines | Should -Contain "Deployed to '$($env:ChocolateyInstall)\lib\$PackageUnderTest'" } } @@ -1615,7 +1765,7 @@ To install a local, or remote file, you may use: } It 'Outputs software installation directory' { - $Output.Lines | Should -Contain "Software installed to '$env:ChocolateyInstall\lib\install-chocolateyzip\tools'" -Because $Output.String + $Output.Lines | Should -Contain "Deployed to '$env:ChocolateyInstall\lib\install-chocolateyzip\tools'" -Because $Output.String } It 'Should have cached installed directory in custom cache' { diff --git a/tests/pester-tests/commands/choco-outdated.Tests.ps1 b/tests/pester-tests/commands/choco-outdated.Tests.ps1 index c24de65af2..d269e95e49 100644 --- a/tests/pester-tests/commands/choco-outdated.Tests.ps1 +++ b/tests/pester-tests/commands/choco-outdated.Tests.ps1 @@ -23,6 +23,20 @@ Describe "choco outdated" -Tag Chocolatey, OutdatedCommand { Remove-ChocolateyTestInstall } + Context "Should include configured sources" { + BeforeAll { + $Output = Invoke-Choco outdated --include-configured-sources --debug + } + + It "Exits with Success (0)" { + $Output.ExitCode | Should -Be 0 -Because $Output.String + } + + It "Should mention that configured sources have been included" { + $Output.Lines | Should -Contain "Including sources from chocolatey.config file." -Because $Output.String + } + } + Context "outdated ignore-pinned uses correct enhanced exit codes" -ForEach @( @{ Argument = '' ; ExitCode = 2 } @{ Argument = '--ignore-pinned' ; ExitCode = 0 } diff --git a/tests/pester-tests/commands/choco-pin.Tests.ps1 b/tests/pester-tests/commands/choco-pin.Tests.ps1 index 465b434cf7..7e8f0e0725 100644 --- a/tests/pester-tests/commands/choco-pin.Tests.ps1 +++ b/tests/pester-tests/commands/choco-pin.Tests.ps1 @@ -112,6 +112,24 @@ Describe "choco pin" -Tag Chocolatey, PinCommand { $Output.Lines | Should -Contain "Nothing to change. Pin already set or removed." $CurrentPins | Should -Contain "upgradepackage|1.0.0$listSuffix" } + + Context "when using enhanced exit codes" { + BeforeAll { + $null = Enable-ChocolateyFeature -Name "useEnhancedExitCodes" + + $Output = Invoke-Choco pin add --name upgradepackage + $CurrentPins = Invoke-Choco pin list --LimitOutput | ForEach-Object Lines + } + + It "Exits with ExitCode 2" { + $Output.ExitCode | Should -Be 2 -Because $Output.String + } + + It "Changes Nothing" { + $Output.Lines | Should -Contain "Nothing to change. Pin already set or removed." + $CurrentPins | Should -Contain "upgradepackage|1.0.0$listSuffix" + } + } } Context "Setting a Pin for a non-installed Package" { diff --git a/tests/pester-tests/commands/choco-push.Tests.ps1 b/tests/pester-tests/commands/choco-push.Tests.ps1 index ace34a4e08..63a2a002f6 100644 --- a/tests/pester-tests/commands/choco-push.Tests.ps1 +++ b/tests/pester-tests/commands/choco-push.Tests.ps1 @@ -39,9 +39,9 @@ Describe "choco push" -Tag Chocolatey, PushCommand, ProxySkip -Skip:($null -eq $ } It "Should Report the actual cause of the error" { - $Output.Lines | Should -Contain "Attempting to push $PackageUnderTest.$VersionUnderTest.nupkg to $RepositoryToUse" - $Output.Lines | Should -Contain "An error has occurred. It's possible the package version already exists on the repository or a nuspec element is invalid. See error below..." - $Output.Lines | Should -Contain "Response status code does not indicate success: 409 (Conflict)." + $Output.Lines | Should -Contain "Attempting to push $PackageUnderTest.$VersionUnderTest.nupkg to $RepositoryToUse" -Because $Output.String + $Output.Lines | Should -Contain "An error has occurred. This package version already exists on the repository and cannot be modified." -Because $Output.String + $Output.Lines | Should -Contain "Package versions that are approved, rejected, or exempted cannot be modified." -Because $Output.String } } @@ -69,9 +69,9 @@ Describe "choco push" -Tag Chocolatey, PushCommand, ProxySkip -Skip:($null -eq $ } It "Should Report the actual cause of the error" { - $Output.Lines | Should -Contain "Attempting to push $PackageUnderTest.$VersionUnderTest.nupkg to $RepositoryToUse" - $Output.Lines | Should -Contain "An error has occurred. It's possible the package version already exists on the repository or a nuspec element is invalid. See error below..." - $Output.Lines | Should -Contain "Response status code does not indicate success: 409 (Conflict)." + $Output.Lines | Should -Contain "Attempting to push $PackageUnderTest.$VersionUnderTest.nupkg to $RepositoryToUse" -Because $Output.String + $Output.Lines | Should -Contain "An error has occurred. It's possible the package version already exists on the repository or a nuspec element is invalid. See error below..." -Because $Output.String + $Output.Lines | Should -Contain "Response status code does not indicate success: 409 (This package had an issue pushing: A nuget package's Description property may not be more than 4000 characters long.)." -Because $Output.String } } @@ -99,9 +99,9 @@ Describe "choco push" -Tag Chocolatey, PushCommand, ProxySkip -Skip:($null -eq $ } It "Should Report the actual cause of the error" { - $Output.Lines | Should -Contain "Attempting to push $PackageUnderTest.$VersionUnderTest.nupkg to $RepositoryToUse" - $Output.Lines | Should -Contain "An error has occurred. It's possible the package version already exists on the repository or a nuspec element is invalid. See error below..." - $Output.Lines | Should -Contain "Response status code does not indicate success: 409 (Conflict)." + $Output.Lines | Should -Contain "Attempting to push $PackageUnderTest.$VersionUnderTest.nupkg to $RepositoryToUse" -Because $Output.String + $Output.Lines | Should -Contain "An error has occurred. It's possible the package version already exists on the repository or a nuspec element is invalid. See error below..." -Because $Output.String + $Output.Lines | Should -Contain "Response status code does not indicate success: 409 (This package had an issue pushing: A nuget package's Title property may not be more than 256 characters long.)." -Because $Output.String } } diff --git a/tests/pester-tests/commands/choco-rule.Tests.ps1 b/tests/pester-tests/commands/choco-rule.Tests.ps1 new file mode 100644 index 0000000000..b2fc482eb9 --- /dev/null +++ b/tests/pester-tests/commands/choco-rule.Tests.ps1 @@ -0,0 +1,92 @@ +Import-Module helpers/common-helpers + +Describe "choco rule" -Tag Chocolatey, RuleCommand { + BeforeDiscovery { + } + + BeforeAll { + Remove-NuGetPaths + Initialize-ChocolateyTestInstall + + New-ChocolateyInstallSnapshot + } + + AfterAll { + Remove-ChocolateyTestInstall + } + + Context "Running without subcommand specified" { + BeforeAll { + Restore-ChocolateyInstallSnapshot + + $Output = Invoke-Choco rule + } + + It "Exits with Success (0)" { + $Output.ExitCode | Should -Be 0 -Because $Output.String + } + + It "Displays the rules expected" { + $Output.Lines | Should -Contain 'CHCR0001: A required element is missing or has no content in the package nuspec file.' -Because $Output.String + $Output.Lines | Should -Contain 'CHCR0002: Enabling license acceptance requires a license url.' -Because $Output.String + $Output.Lines | Should -Contain 'CHCU0001: The specified content of the element is not of the expected type and can not be accepted.' -Because $Output.String + $Output.Lines | Should -Contain 'CHCU0002: Unsupported element is used.' -Because $Output.String + } + } + + Context "Running with list subcommand" { + BeforeAll { + Restore-ChocolateyInstallSnapshot + + $Output = Invoke-Choco rule list + } + + It "Exits with Success (0)" { + $Output.ExitCode | Should -Be 0 -Because $Output.String + } + + It "Displays the rules expected" { + $Output.Lines | Should -Contain 'CHCR0001: A required element is missing or has no content in the package nuspec file.' -Because $Output.String + $Output.Lines | Should -Contain 'CHCR0002: Enabling license acceptance requires a license url.' -Because $Output.String + $Output.Lines | Should -Contain 'CHCU0001: The specified content of the element is not of the expected type and can not be accepted.' -Because $Output.String + $Output.Lines | Should -Contain 'CHCU0002: Unsupported element is used.' -Because $Output.String + } + } + + Context "Running with get subcommand specified with no additional parameters" { + BeforeAll { + Restore-ChocolateyInstallSnapshot + + $Output = Invoke-Choco rule get + } + + It "Exits with Failure (1)" { + $Output.ExitCode | Should -Be 1 -Because $Output.String + } + + It "Displays error with correct format" { + $Output.Lines | Should -Contain "A Rule Name (-n|--name) is required when getting information for a specific rule." -Because $Output.String + } + } + + Context "Running with get subcommand specified with --name parameter" { + BeforeAll { + Restore-ChocolateyInstallSnapshot + + $Output = Invoke-Choco rule get --name CHCU0001 + } + + It "Exits with Success (0)" { + $Output.ExitCode | Should -Be 0 -Because $Output.String + } + + It "Displays rule information" { + $Output.Lines | Should -Contain "Name: CHCU0001 | Severity: Error" -Because $Output.String + $Output.Lines | Should -Contain "Summary: The specified content of the element is not of the expected type and can not be accepted." -Because $Output.String + $Output.Lines | Should -Contain "Help URL:" -Because $Output.String + } + } + + # This needs to be the last test in this block, to ensure NuGet configurations aren't being created. + Test-NuGetPaths +} \ No newline at end of file diff --git a/tests/pester-tests/commands/choco-search.Tests.ps1 b/tests/pester-tests/commands/choco-search.Tests.ps1 index 15b4fe5801..2aefee9dd4 100644 --- a/tests/pester-tests/commands/choco-search.Tests.ps1 +++ b/tests/pester-tests/commands/choco-search.Tests.ps1 @@ -64,6 +64,20 @@ Describe "choco <_>" -ForEach $Command -Tag Chocolatey, SearchCommand, FindComma } } + Context "Should include configured sources" { + BeforeAll { + $Output = Invoke-Choco $_ upgradepackage --include-configured-sources --debug + } + + It "Exits with Success (0)" { + $Output.ExitCode | Should -Be 0 -Because $Output.String + } + + It "Should mention that configured sources have been included" { + $Output.Lines | Should -Contain "Including sources from chocolatey.config file." -Because $Output.String + } + } + Context "Searching for a particular package" { BeforeAll { $Output = Invoke-Choco $_ upgradepackage diff --git a/tests/pester-tests/commands/choco-source.Tests.ps1 b/tests/pester-tests/commands/choco-source.Tests.ps1 index 701550edad..36ae2a9866 100644 --- a/tests/pester-tests/commands/choco-source.Tests.ps1 +++ b/tests/pester-tests/commands/choco-source.Tests.ps1 @@ -67,6 +67,45 @@ Describe "choco <_>" -ForEach $Command -Tag Chocolatey, SourceCommand { } } + Context "Add source that already exists" { + BeforeAll { + $null = Disable-ChocolateyFeature -Name "useEnhancedExitCodes" + + # Ensure source is already added + Invoke-Choco $CurrentCommand add --name "already-exists" --source "https://somewhere/out/there/" + + $Output = Invoke-Choco $CurrentCommand add --name "already-exists" --source "https://somewhere/out/there/" + } + + It "Exits with Success (0)" { + $Output.ExitCode | Should -Be 0 -Because $Output.String + } + + It "Displays chocolatey name with version" { + $Output.Lines | Should -Contain $expectedHeader + } + + It "Displays no change made" { + $Output.Lines | Should -Contain "Nothing to change. Config already set." + } + + Context "when using enhanced exit codes" { + BeforeAll { + $null = Enable-ChocolateyFeature -Name "useEnhancedExitCodes" + + $Output = Invoke-Choco $CurrentCommand add --name "already-exists" --source "https://somewhere/out/there/" + } + + It "Exits with ExitCode 2" { + $Output.ExitCode | Should -Be 2 -Because $Output.String + } + + It "Changes Nothing" { + $Output.Lines | Should -Contain "Nothing to change. Config already set." + } + } + } + Context "Add single unauthenticated source with priority" { BeforeAll { $Output = Invoke-Choco $CurrentCommand add --name "dummy-long" --source "https://priority.test.com/api" --priority 1 @@ -304,6 +343,8 @@ Describe "choco <_>" -ForEach $Command -Tag Chocolatey, SourceCommand { Context "Removing missing source" { BeforeAll { + $null = Disable-ChocolateyFeature -Name "useEnhancedExitCodes" + # Make sure the source is removed Invoke-Choco $CurrentCommand remove --name "not-existing" @@ -321,6 +362,22 @@ Describe "choco <_>" -ForEach $Command -Tag Chocolatey, SourceCommand { It "Displays message about no change made" { $Output.Lines | Should -Contain "Nothing to change. Config already set." } + + Context "when using enhanced exit codes" { + BeforeAll { + $null = Enable-ChocolateyFeature -Name "useEnhancedExitCodes" + + $Output = Invoke-Choco $CurrentCommand remove --name "not-existing" + } + + It "Exits with ExitCode 2" { + $Output.ExitCode | Should -Be 2 -Because $Output.String + } + + It "Changes Nothing" { + $Output.Lines | Should -Contain "Nothing to change. Config already set." + } + } } Context "Disabling existing source" { @@ -387,6 +444,8 @@ Describe "choco <_>" -ForEach $Command -Tag Chocolatey, SourceCommand { Context "Disabling missing source" { BeforeAll { + $null = Disable-ChocolateyFeature -Name "useEnhancedExitCodes" + # Ensure source is not available Invoke-Choco $CurrentCommand remove --name "not-existing" @@ -404,10 +463,68 @@ Describe "choco <_>" -ForEach $Command -Tag Chocolatey, SourceCommand { It "Displays no change made" { $Output.Lines | Should -Contain "Nothing to change. Config already set." } + + Context "when using enhanced exit codes" { + BeforeAll { + $null = Enable-ChocolateyFeature -Name "useEnhancedExitCodes" + + $Output = Invoke-Choco $CurrentCommand disable --name "not-existing" + } + + It "Exits with ExitCode 2" { + $Output.ExitCode | Should -Be 2 -Because $Output.String + } + + It "Changes Nothing" { + $Output.Lines | Should -Contain "Nothing to change. Config already set." + } + } + } + + Context "Disabling source that is already disabled" { + BeforeAll { + $null = Disable-ChocolateyFeature -Name "useEnhancedExitCodes" + + # Ensure source is not available + Invoke-Choco $CurrentCommand add --name "already-disabled" --source "https://somewhere/out/there/" + Invoke-Choco $CurrentCommand disable --name "already-disabled" + + $Output = Invoke-Choco $CurrentCommand disable --name "already-disabled" + } + + It "Exits with Success (0)" { + $Output.ExitCode | Should -Be 0 -Because $Output.String + } + + It "Displays chocolatey name with version" { + $Output.Lines | Should -Contain $expectedHeader + } + + It "Displays no change made" { + $Output.Lines | Should -Contain "Nothing to change. Config already set." + } + + Context "when using enhanced exit codes" { + BeforeAll { + $null = Enable-ChocolateyFeature -Name "useEnhancedExitCodes" + + $Output = Invoke-Choco $CurrentCommand disable --name "already-disabled" + } + + It "Exits with ExitCode 2" { + $Output.ExitCode | Should -Be 2 -Because $Output.String + } + + It "Changes Nothing" { + $Output.Lines | Should -Contain "Nothing to change. Config already set." + } + } } Context "Enabling missing source" { BeforeAll { + $null = Disable-ChocolateyFeature -Name "useEnhancedExitCodes" + # Ensure source is not available Invoke-Choco $CurrentCommand remove --name "not-existing" @@ -425,6 +542,62 @@ Describe "choco <_>" -ForEach $Command -Tag Chocolatey, SourceCommand { It "Displays no change made" { $Output.Lines | Should -Contain "Nothing to change. Config already set." } + + Context "when using enhanced exit codes" { + BeforeAll { + $null = Enable-ChocolateyFeature -Name "useEnhancedExitCodes" + + $Output = Invoke-Choco $CurrentCommand enable --name "not-existing" + } + + It "Exits with ExitCode 2" { + $Output.ExitCode | Should -Be 2 -Because $Output.String + } + + It "Changes Nothing" { + $Output.Lines | Should -Contain "Nothing to change. Config already set." + } + } + } + + Context "Enabling source that is already enabled" { + BeforeAll { + $null = Disable-ChocolateyFeature -Name "useEnhancedExitCodes" + + # Ensure source is enable + Invoke-Choco $CurrentCommand add --name "already-enabled" --source "https://somewhere/out/there/" + Invoke-Choco $CurrentCommand enable --name "already-enabled" + + $Output = Invoke-Choco $CurrentCommand enable --name "already-enabled" + } + + It "Exits with Success (0)" { + $Output.ExitCode | Should -Be 0 -Because $Output.String + } + + It "Displays chocolatey name with version" { + $Output.Lines | Should -Contain $expectedHeader + } + + It "Displays no change made" { + $Output.Lines | Should -Contain "Nothing to change. Config already set." + } + + Context "when using enhanced exit codes" { + BeforeAll { + $null = Enable-ChocolateyFeature -Name "useEnhancedExitCodes" + + $Output = Invoke-Choco $CurrentCommand enable --name "already-enabled" + } + + It "Exits with ExitCode 2" { + $Output.ExitCode | Should -Be 2 -Because $Output.String + } + + It "Changes Nothing" { + $Output.Lines | Should -Contain "Nothing to change. Config already set." + } + } } # This needs to be the last test in this block, to ensure NuGet configurations aren't being created. diff --git a/tests/pester-tests/commands/choco-upgrade.Tests.ps1 b/tests/pester-tests/commands/choco-upgrade.Tests.ps1 index befc8dfc84..c0f876b07d 100644 --- a/tests/pester-tests/commands/choco-upgrade.Tests.ps1 +++ b/tests/pester-tests/commands/choco-upgrade.Tests.ps1 @@ -11,6 +11,36 @@ Remove-ChocolateyTestInstall } + Context "Upgrade pinned package using () option" -ForEach @( + @{ Command = '--ignore-pinned' ; Contains = $true } + @{ Command = '' ; Contains = $false } + ) { + BeforeAll { + Restore-ChocolateyInstallSnapshot + + $Package = 'upgradepackage' + + # This test relies on the correct usage of the --pin option on the install + # command, but this is tested elsewhere + $null = Invoke-Choco install $Package --pin --version 1.0.0 --confirm + $null = Invoke-Choco upgrade $Package $Command --confirm + $Output = Invoke-Choco pin list + } + + It "Exits with Success (0)" { + $Output.ExitCode | Should -Be 0 -Because $Output.String + } + + It "Output should include upgraded package, with new pin in place" { + if ($Contains) { + $Output.String | Should -Match "$Package|1.1.0" + } + else { + $Output.String | Should -Match "$Package|1.0.0" + } + } + } + Context "Upgrade package with () specified" -ForEach @( @{ Command = '--pin' ; Contains = $true } @{ Command = '' ; Contains = $false } @@ -73,6 +103,96 @@ } } + Context "Should include configured sources" { + BeforeAll { + Restore-ChocolateyInstallSnapshot + + Enable-ChocolateySource -Name hermes-setup + $null = Invoke-Choco install wget + + $Output = Invoke-Choco upgrade wget --include-configured-sources --debug + } + + It "Exits with Success (0)" { + $Output.ExitCode | Should -Be 0 -Because $Output.String + } + + It "Should mention that configured sources have been included" { + $Output.Lines | Should -Contain "Including sources from chocolatey.config file." -Because $Output.String + } + } + + Context "Attempt to upgrade a package when there isn't an upgrade available" -Tag Internal { + BeforeAll { + Restore-ChocolateyInstallSnapshot + + Enable-ChocolateySource -Name hermes-setup + $null = Invoke-Choco install wget + + $Output = Invoke-Choco upgrade wget + } + + It 'Exits with Success (0)' { + $Output.ExitCode | Should -Be 0 -Because $Output.String + } + + It 'Displays that upgrade was attempted but wasnt required' { + $Output.Lines | Should -Contain "Chocolatey upgraded 0/1 packages." -Because $Output.String + } + + Context "when using enhanced exit codes" { + BeforeAll { + $null = Enable-ChocolateyFeature -Name "useEnhancedExitCodes" + + $Output = Invoke-Choco upgrade wget + } + + It "Exits with ExitCode 2" { + $Output.ExitCode | Should -Be 2 -Because $Output.String + } + + It 'Displays that upgrade was attempted but wasnt required' { + $Output.Lines | Should -Contain "Chocolatey upgraded 0/1 packages." -Because $Output.String + } + } + } + + Context "Attempt to run upgrade all when there isn't any upgrade available" -Tag Internal { + BeforeAll { + Restore-ChocolateyInstallSnapshot + + Enable-ChocolateySource -Name hermes-setup + $null = Invoke-Choco install wget + $null = Invoke-Choco install curl + + $Output = Invoke-Choco upgrade all + } + + It 'Exits with Success (0)' { + $Output.ExitCode | Should -Be 0 -Because $Output.String + } + + It 'Displays that upgrade was attempted but wasnt required' { + $Output.String | Should -MatchExactly "Chocolatey upgraded 0" + } + + Context "when using enhanced exit codes" { + BeforeAll { + $null = Enable-ChocolateyFeature -Name "useEnhancedExitCodes" + + $Output = Invoke-Choco upgrade all + } + + It "Exits with ExitCode 2" { + $Output.ExitCode | Should -Be 2 -Because $Output.String + } + + It 'Displays that upgrade was attempted but wasnt required' { + $Output.String | Should -MatchExactly "Chocolatey upgraded 0" + } + } + } + # We exclude this test when running CCM, as it will install and remove # the firefox package which is used through other tests that will be affected. Context "Upgrading packages while remembering arguments with multiple packages using arguments" -Tag CCMExcluded, Internal, VMOnly { @@ -246,7 +366,7 @@ To upgrade a local, or remote file, you may use: } It 'Outputs software installation directory' { - $Output.Lines | Should -Contain "Software installed to '$env:ChocolateyInstall\lib\install-chocolateyzip\tools'" -Because $Output.String + $Output.Lines | Should -Contain "Deployed to '$env:ChocolateyInstall\lib\install-chocolateyzip\tools'" -Because $Output.String } It 'Should have cached installed directory in custom cache' { @@ -548,7 +668,7 @@ To upgrade a local, or remote file, you may use: } } - Context 'Upgrading a package where parent only contain pre-releases' -Tag Testing { + Context 'Upgrading a package where parent only contain pre-releases' { BeforeAll { Restore-ChocolateyInstallSnapshot diff --git a/tests/pester-tests/features/CygwinSource.Tests.ps1 b/tests/pester-tests/features/CygwinSource.Tests.ps1 new file mode 100644 index 0000000000..90f3b78ef6 --- /dev/null +++ b/tests/pester-tests/features/CygwinSource.Tests.ps1 @@ -0,0 +1,30 @@ +Import-Module helpers/common-helpers + +# This is skipped when not run in CI because it modifies the local system. +Describe "Cygwin Source" -Tag Chocolatey, CygwinSource -Skip:(-not $env:TEST_KITCHEN) { + BeforeAll { + Initialize-ChocolateyTestInstall + New-ChocolateyInstallSnapshot + Enable-ChocolateySource -Name hermes-setup + $null = Invoke-Choco install cygwin + } + + AfterAll { + $null = Invoke-Choco uninstall cygwin --remove-dependencies + Remove-ChocolateyTestInstall + } + + Context "install all" { + BeforeAll { + $Output = Invoke-Choco install all --source=cygwin + } + + It 'Exits with exit code (1)' { + $Output.ExitCode | Should -Be 1 -Because $Output.String + } + + It 'Outputs exception' { + $Output.Lines | Should -Contain "Alternative sources do not allow the use of the 'all' package name/keyword." -Because $Output.String + } + } +} \ No newline at end of file diff --git a/tests/pester-tests/features/PythonSource.Tests.ps1 b/tests/pester-tests/features/PythonSource.Tests.ps1 index d6323c7cbf..2a0aad6b67 100644 --- a/tests/pester-tests/features/PythonSource.Tests.ps1 +++ b/tests/pester-tests/features/PythonSource.Tests.ps1 @@ -27,12 +27,29 @@ Describe "Python Source" -Tag Chocolatey, UpgradeCommand, PythonSource, ProxySki } It 'Exits with correct exit code ()' { - $Output.ExitCode | Should -Be $ExitCode + $Output.ExitCode | Should -Be $ExitCode -Because $Output.String } It 'Outputs properly' { - $Output.Lines | Should -Not:($ExitCode -eq 0) -Contain 'The all keyword is not available for alternate sources' - $Output.Lines | Should -Contain "Chocolatey upgraded $Count/$Count packages." + $Output.Lines | Should -Not:($ExitCode -eq 0) -Contain "Alternative sources do not allow the use of the 'all' package name/keyword." -Because $Output.String + $Output.Lines | Should -Contain "Chocolatey upgraded $Count/$Count packages." -Because $Output.String + } + } + + Context "install all" { + BeforeAll { + # For some reason under kitchen-pester we don't have pip on the path. This might be due to our snapshotting... + Import-Module $env:ChocolateyInstall/helpers/ChocolateyProfile.psm1 + Update-SessionEnvironment + $Output = Invoke-Choco install all --source=python + } + + It 'Exits with exit code (1)' { + $Output.ExitCode | Should -Be 1 -Because $Output.String + } + + It 'Outputs exception' { + $Output.Lines | Should -Contain "Alternative sources do not allow the use of the 'all' package name/keyword." -Because $Output.String } } } diff --git a/tests/pester-tests/features/RubySource.Tests.ps1 b/tests/pester-tests/features/RubySource.Tests.ps1 new file mode 100644 index 0000000000..83aba65f82 --- /dev/null +++ b/tests/pester-tests/features/RubySource.Tests.ps1 @@ -0,0 +1,30 @@ +Import-Module helpers/common-helpers + +# This is skipped when not run in CI because it modifies the local system. +Describe "Ruby Source" -Tag Chocolatey, RubySource -Skip:(-not $env:TEST_KITCHEN) { + BeforeAll { + Initialize-ChocolateyTestInstall + New-ChocolateyInstallSnapshot + Enable-ChocolateySource -Name hermes-setup + $null = Invoke-Choco install ruby.portable + } + + AfterAll { + $null = Invoke-Choco uninstall ruby.portable --remove-dependencies + Remove-ChocolateyTestInstall + } + + Context "install all" { + BeforeAll { + $Output = Invoke-Choco install all --source=ruby + } + + It 'Exits with exit code (1)' { + $Output.ExitCode | Should -Be 1 -Because $Output.String + } + + It 'Outputs exception' { + $Output.Lines | Should -Contain "Alternative sources do not allow the use of the 'all' package name/keyword." -Because $Output.String + } + } +} \ No newline at end of file diff --git a/tests/pester-tests/features/WindowsFeaturesSource.Tests.ps1 b/tests/pester-tests/features/WindowsFeaturesSource.Tests.ps1 new file mode 100644 index 0000000000..53bd633ea0 --- /dev/null +++ b/tests/pester-tests/features/WindowsFeaturesSource.Tests.ps1 @@ -0,0 +1,26 @@ +Import-Module helpers/common-helpers + +Describe "Windows Features Source" -Tag Chocolatey, WindowsFeaturesSource { + BeforeAll { + Initialize-ChocolateyTestInstall + New-ChocolateyInstallSnapshot + } + + AfterAll { + Remove-ChocolateyTestInstall + } + + Context "install all" { + BeforeAll { + $Output = Invoke-Choco install all --source=windowsfeatures + } + + It 'Exits with exit code (1)' { + $Output.ExitCode | Should -Be 1 -Because $Output.String + } + + It 'Outputs exception' { + $Output.Lines | Should -Contain "Alternative sources do not allow the use of the 'all' package name/keyword." -Because $Output.String + } + } +} \ No newline at end of file diff --git a/tests/pester-tests/powershell-commands/Get-EnvironmentVariable.Tests.ps1 b/tests/pester-tests/powershell-commands/Get-EnvironmentVariable.Tests.ps1 new file mode 100644 index 0000000000..0e6c58f98f --- /dev/null +++ b/tests/pester-tests/powershell-commands/Get-EnvironmentVariable.Tests.ps1 @@ -0,0 +1,39 @@ +Describe 'Get-EnvironmentVariable helper function tests' -Tags Cmdlets { + BeforeAll { + Initialize-ChocolateyTestInstall + + $testLocation = Get-ChocolateyTestLocation + Import-Module "$testLocation\helpers\chocolateyInstaller.psm1" + } + + Context 'Gets the named environment variable value at the scope' -ForEach @( + @{ Scope = 'Process' } + @{ Scope = 'User' } + @{ Scope = 'Machine' } + ) { + BeforeDiscovery { + $variables = [Environment]::GetEnvironmentVariables($Scope).Keys | ForEach-Object { @{ Name = $_ } } + } + + It 'Gets the environment variable ""' -TestCases $variables { + $expectedValue = [Environment]::GetEnvironmentVariable($Name, $Scope) + Get-EnvironmentVariable -Name $Name -Scope $Scope | Should -BeExactly $expectedValue + } + } + + Context 'Can retrieve the PATH variable without expanding environment names for the Machine scope' { + BeforeAll { + Install-ChocolateyPath -Path "%systemroot%\test" -PathType Machine + } + + AfterAll { + Uninstall-ChocolateyPath -Path "%systemroot%\test" -PathType Machine + } + + It 'Retrieves the Machine PATH value with un-expanded environment names' { + # We expect there to be an entry similar to the following: "%SystemRoot%\system32", since this + # is there by default in a Windows install + Get-EnvironmentVariable -Name 'PATH' -Scope 'Machine' -PreserveVariables | Should -Match '%systemroot%\\test' + } + } +} \ No newline at end of file diff --git a/tests/pester-tests/powershell-commands/Get-EnvironmentVariableNames.Tests.ps1 b/tests/pester-tests/powershell-commands/Get-EnvironmentVariableNames.Tests.ps1 new file mode 100644 index 0000000000..927b95bc69 --- /dev/null +++ b/tests/pester-tests/powershell-commands/Get-EnvironmentVariableNames.Tests.ps1 @@ -0,0 +1,19 @@ +Describe 'Get-EnvironmentVariable helper function tests' -Tags Cmdlets { + BeforeAll { + Initialize-ChocolateyTestInstall + + $testLocation = Get-ChocolateyTestLocation + Import-Module "$testLocation\helpers\chocolateyInstaller.psm1" + } + + Context 'Gets the named environment variable value at the target scope' -ForEach @( + @{ Scope = 'Process' } + @{ Scope = 'User' } + @{ Scope = 'Machine' } + ) { + It 'Gets the complete list of environment variables in the scope"' -ForEach $variables { + $expectedValue = [Environment]::GetEnvironmentVariables($Scope).Keys + Get-EnvironmentVariableNames -Scope $Scope | Should -Be $expectedValue + } + } +} \ No newline at end of file diff --git a/tests/pester-tests/powershell-commands/Install-ChocolateyPath.Tests.ps1 b/tests/pester-tests/powershell-commands/Install-ChocolateyPath.Tests.ps1 new file mode 100644 index 0000000000..379a73db76 --- /dev/null +++ b/tests/pester-tests/powershell-commands/Install-ChocolateyPath.Tests.ps1 @@ -0,0 +1,86 @@ +Describe 'Install-ChocolateyPath helper function tests' -Tags Cmdlets { + BeforeAll { + Initialize-ChocolateyTestInstall + + $testLocation = Get-ChocolateyTestLocation + Import-Module "$testLocation\helpers\chocolateyInstaller.psm1" + } + + AfterAll { + Remove-Module "chocolateyInstaller" -Force + } + + Context 'Adding and removing PATH values' -ForEach @( + @{ Scope = 'Process' } + @{ Scope = 'User' } + @{ Scope = 'Machine' } + ) { + Context 'Path "<_>"' -ForEach @("C:\test", "C:\tools") { + AfterEach { + Uninstall-ChocolateyPath -Path $_ -Scope $Scope + } + + It 'stores the value in the desired PATH scope' { + Install-ChocolateyPath -Path $_ -Scope $Scope + [Environment]::GetEnvironmentVariable('PATH', $Scope) -split [IO.Path]::PathSeparator | Should -Contain $_ + } + } + } + + Context 'Edge cases' { + AfterEach { + Uninstall-ChocolateyPath -Path "C:\test" -Scope Process + } + + It 'successfully detects that a path is already present when it is missing a trailing slash that is present in PATH' { + Install-ChocolateyPath -Path "C:\test\" -Scope Process + Install-ChocolateyPath -Path "C:\test" -Scope Process + + @($env:PATH -split [IO.Path]::PathSeparator) -match "C:\\test" | Should -HaveCount 1 -Because "Install-ChocolateyPath should not add the same path more than once" + } + + It 'successfully detects that a path is already present when it has a trailing slash that is not present in PATH' { + Install-ChocolateyPath -Path "C:\test" -Scope Process + Install-ChocolateyPath -Path "C:\test\" -Scope Process + + @($env:PATH -split [IO.Path]::PathSeparator) -match "C:\\test" | Should -HaveCount 1 -Because "Install-ChocolateyPath should not add the same path more than once" + } + + It 'allows a subpath of a path already in PATH to be added' { + Install-ChocolateyPath -Path "C:\test" -Scope Process + Install-ChocolateyPath -Path "C:\test\subpath" -Scope Process + + @($env:PATH -split [IO.Path]::PathSeparator) | Should -Contain "C:\test\subpath" + } + } +} + +Describe 'Install-ChocolateyPath end-to-end tests with add-path package modifying PATH' -Tags Cmdlet -ForEach @( + @{ Scope = 'User' } + @{ Scope = 'Machine' } +) { + BeforeAll { + Initialize-ChocolateyTestInstall + $PackageUnderTest = 'add-path' + Restore-ChocolateyInstallSnapshot + $OriginalPath = [Environment]::GetEnvironmentVariable('PATH', $Scope) + $Output = Invoke-Choco install $PackageUnderTest --confirm --params "/Path=C:\test /Scope=$Scope" + } + + AfterAll { + Remove-ChocolateyInstallSnapshot + [Environment]::SetEnvironmentVariable('PATH', $OriginalPath, $Scope) + } + + It 'Exits with Success (0)' { + $Output.ExitCode | Should -Be 0 -Because $Output.String + } + + It 'Shows the path being added and the scope' { + $Output.String | Should -MatchExactly "Adding 'C:\\test' to PATH at scope $Scope" + } + + It 'Correctly modifies the PATH' { + [Environment]::GetEnvironmentVariable("PATH", $Scope) | Should -Match "C:\\test" + } +} \ No newline at end of file diff --git a/tests/pester-tests/powershell-commands/Set-EnvironmentVariable.Tests.ps1 b/tests/pester-tests/powershell-commands/Set-EnvironmentVariable.Tests.ps1 new file mode 100644 index 0000000000..7e67ca9e2a --- /dev/null +++ b/tests/pester-tests/powershell-commands/Set-EnvironmentVariable.Tests.ps1 @@ -0,0 +1,40 @@ +Describe 'Set-EnvironmentVariable helper function tests' -Tags Cmdlets { + BeforeAll { + Initialize-ChocolateyTestInstall + + $testLocation = Get-ChocolateyTestLocation + Import-Module "$testLocation\helpers\chocolateyInstaller.psm1" + } + + Context 'Sets an environment variable value at the target ' -ForEach @( + @{ Scope = 'Process' } + @{ Scope = 'User' } + @{ Scope = 'Machine' } + ) { + BeforeDiscovery { + $variables = @( + @{ Name = "Test"; Value = "TestValue" } + @{ Name = "Environment"; Value = "1234" } + @{ Name = "Variable"; Value = "C:\test\path" } + ) + } + + Describe 'Setting environment variable ' -ForEach $variables { + BeforeAll { + Set-EnvironmentVariable -Name $Name -Value $Value -Scope $Scope + } + + AfterAll { + Set-EnvironmentVariable -Name $Name -Value "" -Scope $Scope + } + + It 'sets the target environment variable in the proper scope' { + [Environment]::GetEnvironmentVariable($Name, $Scope) | Should -BeExactly $Value + } + + It 'propagates the change to the current process' { + Get-Content "Env:\$Name" | Should -BeExactly $Value + } + } + } +} \ No newline at end of file diff --git a/tests/pester-tests/powershell-commands/Test-ProcessAdminRights.Tests.ps1 b/tests/pester-tests/powershell-commands/Test-ProcessAdminRights.Tests.ps1 new file mode 100644 index 0000000000..c8f89cd905 --- /dev/null +++ b/tests/pester-tests/powershell-commands/Test-ProcessAdminRights.Tests.ps1 @@ -0,0 +1,12 @@ +Describe 'Test-ProcessAdminRights helper function tests' -Tags Cmdlets { + BeforeAll { + Initialize-ChocolateyTestInstall + + $testLocation = Get-ChocolateyTestLocation + Import-Module "$testLocation\helpers\chocolateyInstaller.psm1" + } + + It 'should report true in an admin context' { + Test-ProcessAdminRights | Should -BeTrue -Because "We should run these tests exclusively as admin" + } +} \ No newline at end of file diff --git a/tests/pester-tests/powershell-commands/Uninstall-ChocolateyPath.Tests.ps1 b/tests/pester-tests/powershell-commands/Uninstall-ChocolateyPath.Tests.ps1 new file mode 100644 index 0000000000..29dbeec65b --- /dev/null +++ b/tests/pester-tests/powershell-commands/Uninstall-ChocolateyPath.Tests.ps1 @@ -0,0 +1,77 @@ +Describe 'Uninstall-ChocolateyPath helper function tests' -Tags Cmdlets { + BeforeAll { + Initialize-ChocolateyTestInstall + + $testLocation = Get-ChocolateyTestLocation + Import-Module "$testLocation\helpers\chocolateyInstaller.psm1" + } + + Context 'Adding and removing PATH values' -ForEach @( + @{ Scope = 'Process' } + @{ Scope = 'User' } + @{ Scope = 'Machine' } + ) { + Context 'Path "<_>"' -ForEach @("C:\test", "C:\tools") { + BeforeEach { + Install-ChocolateyPath -Path $_ -Scope $Scope + } + + It 'removes a stored PATH value in the desired PATH scope' { + Uninstall-ChocolateyPath -Path $_ -Scope $Scope + [Environment]::GetEnvironmentVariable('PATH', $Scope) -split [IO.Path]::PathSeparator | Should -Not -Contain $_ + } + } + } + + Context 'Edge cases' { + It 'successfully detects that a path is present and removes it when it is missing a trailing slash that is present in PATH' { + Install-ChocolateyPath -Path "C:\test\" -Scope Process + Uninstall-ChocolateyPath -Path "C:\test" -Scope Process + + @($env:PATH -split [IO.Path]::PathSeparator) -match "C:\\test" | Should -BeNullOrEmpty + } + + It 'successfully detects that a path is present and removes it when it has a trailing slash that is not present in PATH' { + Install-ChocolateyPath -Path "C:\test" -Scope Process + Uninstall-ChocolateyPath -Path "C:\test\" -Scope Process + + @($env:PATH -split [IO.Path]::PathSeparator) -match "C:\\test" | Should -BeNullOrEmpty + } + } +} + +Describe 'Uninstall-ChocolateyPath end-to-end tests with add-path package' -Tags Cmdlet -ForEach @( + @{ Scope = 'User' } + @{ Scope = 'Machine' } +) { + BeforeAll { + Initialize-ChocolateyTestInstall + $PackageUnderTest = 'add-path' + Restore-ChocolateyInstallSnapshot + $OriginalPath = [Environment]::GetEnvironmentVariable('PATH', $Scope) + $install = Invoke-Choco install $PackageUnderTest --confirm --params "/Path=C:\test /Scope=$Scope" + + if ($install.ExitCode -ne 0) { + throw "Setup failed, could not install ${PackageUnderTest}: $($install.String)" + } + + $Output = Invoke-Choco uninstall $PackageUnderTest --confirm --params "/Path=C:\test /Scope=$Scope" + } + + AfterAll { + Remove-ChocolateyInstallSnapshot + [Environment]::SetEnvironmentVariable('PATH', $OriginalPath, $Scope) + } + + It 'Exits with Success (0)' { + $Output.ExitCode | Should -Be 0 -Because $Output.String + } + + It 'Shows the path being added and the scope' { + $Output.String | Should -MatchExactly "Removing 'C:\\test' from PATH at scope $Scope" + } + + It 'Correctly modifies the PATH' { + [Environment]::GetEnvironmentVariable("PATH", $Scope) | Should -BeExactly $OriginalPath + } +} \ No newline at end of file diff --git a/tests/pester-tests/powershell-commands/Update-SessionEnvironment.Tests.ps1 b/tests/pester-tests/powershell-commands/Update-SessionEnvironment.Tests.ps1 new file mode 100644 index 0000000000..9f8bcccbc6 --- /dev/null +++ b/tests/pester-tests/powershell-commands/Update-SessionEnvironment.Tests.ps1 @@ -0,0 +1,29 @@ +Describe 'Update-SessionEnvironment helper function tests' -Tag Cmdlets { + BeforeAll { + Initialize-ChocolateyTestInstall + + $testLocation = Get-ChocolateyTestLocation + Import-Module "$testLocation\helpers\chocolateyInstaller.psm1" + } + + Context 'Refreshing environment' { + BeforeAll { + [Environment]::SetEnvironmentVariable("Test", "user-value", "User") + [Environment]::SetEnvironmentVariable("Test2", "machine-value", "Machine") + $env:Test3 = "process-value" + } + + It 'successfully refreshes values into the process' { + Update-SessionEnvironment + $env:Test | Should -BeExactly 'user-value' + $env:Test2 | Should -BeExactly 'machine-value' + $env:Test3 | Should -BeExactly 'process-value' + } + + AfterAll { + [Environment]::SetEnvironmentVariable("Test", [string]::Empty, "User") + [Environment]::SetEnvironmentVariable("Test2", [string]::Empty, "Machine") + $env:Test3 = '' + } + } +} \ No newline at end of file diff --git a/update-cmdlet-documentation.ps1 b/update-cmdlet-documentation.ps1 new file mode 100644 index 0000000000..b5d033bf8c --- /dev/null +++ b/update-cmdlet-documentation.ps1 @@ -0,0 +1,163 @@ +<# +.SYNOPSIS +Generates Markdown documentation for the Chocolatey.PowerShell portion of Chocolatey's installer module commands. + +.DESCRIPTION +Use this script when modifying or adding commands into the Chocolatey.PowerShell project. +You will need the chocolatey/docs repository cloned locally in order to use this script. +When all documentation files this script is monitoring have been filled out (contain no remaining {{ template tokens }}), this script will generate/update the external help xml files for PowerShell. +#> +[CmdletBinding()] +param( + # Specify the path to the chocolatey/docs repository root locally. Defaults to ../docs + [Parameter()] + [string] + $DocsRepositoryPath = "$PSScriptRoot/../docs", + + # Specify the new commands' names to generate new documentation pages for them. + [Parameter()] + [Alias('NewCommands')] + [string[]] + $NewCommand, + + # Opens any new or incomplete files in the default editor for Markdown (.md) files for editing. + [Parameter()] + [switch] + $OpenUnfinished +) + +if (-not (Get-Module -ListAvailable PlatyPS)) { + Write-Warning "PlatyPS module not found, attempting to install from PSGallery" + Install-Module PlatyPS -Scope CurrentUser +} + +$documentationPath = Join-Path $DocsRepositoryPath -ChildPath "src\content\docs\en-us\create\cmdlets" +if (-not (Test-Path $DocsRepositoryPath)) { + throw "PowerShell commands docs folder was not found at '$documentationPath'. Please clone the chocolatey/docs repository locally first, and/or provide the path to the repo root as -DocsRepositoryPath to this script." +} + +$dllPath = "$PSScriptRoot/code_drop/temp/_PublishedLibs/Chocolatey.PowerShell/Chocolatey.PowerShell.dll" + +if (-not (Test-Path $dllPath)) { + throw "Please run this repository's build.ps1 file before trying to build markdown help for this module." +} + +# Rename .mdx to .md and transform anything platyps doesn't like and can't handle +$renamedFiles = Get-ChildItem -Path $documentationPath -Filter '*.md*' | + Where-Object Name -notlike "index.*" | + Rename-Item -NewName { $_.BaseName + ".md" } -PassThru | + ForEach-Object { + $content = Get-Content -Path $_.FullName + $content = $content | ForEach-Object { + # replace xref with markdown-ish link so platyPS can process things + if ($_ -match ']+?>') { + $xml = [xml]$_ + $label = $xml.Xref.title + $xref = $xml.Xref.value + $anchor = $xml.Xref.anchor + $classes = $xml.Xref.classes + + if ($anchor -and $classes) { + "[${label}](xref:${xref}#${anchor},${classes})" + } + elseif ($classes) { + "[${label}](xref:${xref},${classes})" + } + elseif ($anchor) { + "[${label}](xref:${xref}#${anchor})" + } + else { + "[${label}](xref:${xref})" + } + + } + else { + $_ + } + } + $content | Set-Content -Path $_.FullName + } + +# Import the module .dll to generate / update help from. +Import-Module $dllPath + +if (-not (Get-Module Chocolatey.PowerShell)) { + throw "The Chocolatey.PowerShell module was not able to be loaded, exiting documentation generation." +} + +$newOrUpdatedFiles = [System.Collections.Generic.HashSet[System.IO.FileSystemInfo]] @( + if ($NewCommand) { + New-MarkdownHelp -Command $NewCommand -OutputFolder "$PSScriptRoot\docs" -ExcludeDontShow + } + + Update-MarkdownHelp -Path $documentationPath -ExcludeDontShow +) + +$incompleteFiles = $newOrUpdatedFiles | Select-String '\{\{[^}]+}}' | Select-Object -ExpandProperty Path + +if ($incompleteFiles) { + Write-Warning "The following files contain {{ template tokens }} from PlatyPS that must be replaced with help content before they are committed to the repository:" + $incompleteFiles | Write-Warning + + if ($OpenUnfinished) { + $incompleteFiles | Invoke-Item + } + + Write-Warning "Run this script again once these files have been updated in order to generate the XML help documentation for the module." +} +else { + New-ExternalHelp -Path $documentationPath -OutputPath "$PSScriptRoot/src/Chocolatey.PowerShell" -Force +} + +$newOrUpdatedFiles = $newOrUpdatedFiles | + Rename-Item -NewName { $_.BaseName + ".mdx" } -PassThru | + ForEach-Object { + $content = Get-Content -Path $_.FullName + + $frontMatterBounds = 0 + $content = $content | ForEach-Object { + if ($_ -match '\[(?[^\]]+)\]\(xref:(?[^#,]+)(#(?[^,]+))?,(?[^)]+)\)') { + # replace any lines that are an xref link with the html/xml format that astro uses + $xml = [xml]::new() + $node = $xml.CreateElement('Xref') + $title = $xml.CreateAttribute('title') + $title.Value = $matches['name'] + $null = $node.Attributes.Append($title) + + $target = $xml.CreateAttribute('value') + $target.Value = $matches['xref'] + $null = $node.Attributes.Append($target) + + if ($matches['anchor']) { + $anchor = $xml.CreateAttribute('anchor') + $anchor.Value = $matches['anchor'] + $null = $node.Attributes.Append($anchor) + } + + $classes = $xml.CreateAttribute('classes') + $classes.Value = $matches['classes'] + $null = $node.Attributes.Append($classes) + + $node.OuterXml + } + else { + # after the second --- where we exit the frontmatter, add the xref import to the document + $_ + + if ($_ -eq '---') { + $frontMatterBounds++ + + if ($frontMatterBounds -eq 2) { + "import Xref from '@components/Xref.astro';" + } + } + } + } + + $content | Set-Content -Path $_.FullName + + $_ + } + +# Output the new/updated files so calling user knows what files the script has touched. +$newOrUpdatedFiles \ No newline at end of file