diff --git a/.build.custom/ilmerge.replace.build b/.build.custom/ilmerge.replace.build index 4670bb8c28..d22a82aaa4 100644 --- a/.build.custom/ilmerge.replace.build +++ b/.build.custom/ilmerge.replace.build @@ -73,7 +73,7 @@ - + diff --git a/.github/ISSUE_TEMPLATE/zChocoReportIssue.md b/.github/ISSUE_TEMPLATE/zChocoReportIssue.md new file mode 100644 index 0000000000..121c021176 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/zChocoReportIssue.md @@ -0,0 +1,42 @@ +--- +name: Choco.exe - Report Issue +about: Did you find unexpected behavior? +--- + +Ensure you have read over Submitting Issues - +https://github.com/chocolatey/choco#submitting-issues + +Please check to see if your issue already exists with a quick search of the issues. Start with one relevant term and then add if you get too many results. + +NOTE: Keep in mind we have an etiquette regarding communication that we expect folks to observe when they are looking for support in the Chocolatey community. https://github.com/chocolatey/choco/blob/master/README.md#etiquette-regarding-communication +--> + +### What You Are Seeing? + +### What is Expected? + +### How Did You Get This To Happen? (Steps to Reproduce) + +### Output Log + + + +
+Full Log Output + +

+ +~~~sh +PLACE LOG CONTENT HERE - WE NEED _ALL_ DETAILED OUTPUT BASED ON THE ABOVE TO BE ABLE TO PROVIDE SUPPORT (YOU WILL FIND THAT IN THE $env:ChocolateyInstall\logs\chocolatey.log between the `=====`) +~~~ + +

+ +
\ No newline at end of file diff --git a/.gitignore b/.gitignore index c3ef908a0f..301537b097 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ code_drop obj src/packages /.vscode/ +.vs *.suo *.sln.docstates diff --git a/.uppercut b/.uppercut index cb75e8b2c1..98a14d6038 100644 --- a/.uppercut +++ b/.uppercut @@ -17,12 +17,12 @@ - + - + diff --git a/CHANGELOG.md b/CHANGELOG.md index 3957225b31..9654e1ae56 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,76 @@ # Chocolatey Open Source CHANGELOG - This covers changes for the "chocolatey" and "chocolatey.lib" packages, which are available as FOSS. **NOTE**: If you have a licensed edition of Chocolatey ("chocolatey.extension"), refer to this in tandem with [Chocolatey Licensed CHANGELOG](https://github.com/chocolatey/choco/blob/master/CHANGELOG_LICENSED.md). -## [0.10.8](https://github.com/chocolatey/choco/issues?q=milestone%3A0.10.8+is%3Aclosed) (August 30, 2017) +## 0.10.12 - (Unreleased) +### Bug Fixes + * Fix - Uninstall-ChocolateyZipPackage - Corrected issue with null passed to Test-Path - see [#1546](https://github.com/chocolatey/choco/issues/1546) and [#1550](https://github.com/chocolatey/choco/issues/1550) + * Fix - Get-ChocolateyWebFile - Setting Security Protocol to SSL3 is not supported with PowerShell 6.0.3 - see [#1623](https://github.com/chocolatey/choco/issues/1623) + +### Improvements + * Performance of `choco outdated` command - see [#1397](https://github.com/chocolatey/choco/issues/1397) + * Added ability to get consistent hash of ConfigFileSettings class - see [#1612](https://github.com/chocolatey/choco/issues/1612) + + +## [0.10.11](https://github.com/chocolatey/choco/issues?q=milestone%3A0.10.11+is%3Aclosed) (May 4, 2018) +### BUG FIXES + * Fix - AutoUninstaller - Captures registry snapshot escaping quotes - unable to find path for uninstall - see [#1540](https://github.com/chocolatey/choco/issues/1540) + * Fix - Installation/Setup - Use of Write-Host in Install-ChocolateyPath.ps1 prevents non-interactive installation of Chocolatey itself - see [#1560](https://github.com/chocolatey/choco/issues/1560) + * Fix - Logging - GUID in software name: "Chocolatey had an error formatting string" - see [#1543](https://github.com/chocolatey/choco/issues/1543) +### IMPROVEMENTS + * [Security] RAR Extraction with older 7zip uses uninitialized memory (CVE-2018-10115) - see [#1557](https://github.com/chocolatey/choco/issues/1557) + * Tab Completion - Modify profile if file exists but is empty - see [#991](https://github.com/chocolatey/choco/issues/991) + + +## [0.10.10](https://github.com/chocolatey/choco/issues?q=milestone%3A0.10.10+is%3Aclosed) (April 12, 2018) +### BUG FIXES + * Fix - Installing Chocolatey 0.10.9 results in an exit code of 1 - see [#1529](https://github.com/chocolatey/choco/issues/1529) + * Fix - Proxy bypass list with "*" will return regex quantifier parsing errors - see [#1532](https://github.com/chocolatey/choco/issues/1532) + * Fix - NuGet cache folders - choco should always attempt to remove and should find in the cacheLocation when set - see [#1527](https://github.com/chocolatey/choco/issues/1527) + +### IMPROVEMENTS + * Logging - Exclusive File Lock on Non-Essential Logs - see [#1531](https://github.com/chocolatey/choco/issues/1531) + + +## [0.10.9](https://github.com/chocolatey/choco/issues?q=milestone%3A0.10.9+is%3Aclosed) (March 25, 2018) +The vendored 7Zip had a couple of security findings that necessitated a release. There is also a lot of goodness going into this release as well. We've fixed XDT transforms not to keep extra data around (requiring manual fixes). We've resolved some issues surrounding compatibility with Get-PackageParameters in the chocolatey-core.extension package and what's now built into Chocolatey. That should now work appropriately, and the built-in method should be preferred, so if you are using `--package-parameters-sensitive`, those will be added as well when you do have the chocolatey-core.extension package also installed. + +We've also brought in the long desired logging with no colorization. You can set that as a switch or globally with a feature flipper. With outdated/upgrade, you can now ignore unfound packages along with already skipping pinned packages. That will help you reduce your output to only the things it finds upgrades for that can be upgraded. + +### BUG FIXES + * [Security] Fix - Pro/Business - Logging - Get-PackageParameters should not log sensitive params - see [#1460](https://github.com/chocolatey/choco/issues/1460) + * Fix - XDT transform causes xml file to have extra data in it (unusable until manually fixed) - see [#1482](https://github.com/chocolatey/choco/issues/1482) + * Fix - Escape package registry information to reduce unreadable files - see [#1505](https://github.com/chocolatey/choco/issues/1505) + * Fix - Uninstall-ChocolateyZipPackage is unable to find zip contents file - see [#1415](https://github.com/chocolatey/choco/issues/1415) + * Fix - Get-PackageParameters - Resolve differences between chocolatey.core-extension and built-in method - see [#1490](https://github.com/chocolatey/choco/issues/1490) + * Fix - Get-PackageParameters - force built-in method to be preferred over chocolatey-core.extension method - see [#1476](https://github.com/chocolatey/choco/issues/1476) + * Fix - Get-PackageParameters should handle urls - see [#1459](https://github.com/chocolatey/choco/issues/1459) + * Fix - Setting output directory with proper quoting can result in "The given path's format is not supported." - see [#1517](https://github.com/chocolatey/choco/issues/1517) + * Fix - Logging - PowerShell script contents logging should not error if they have contents mistaken for log formatting - see [#1489](https://github.com/chocolatey/choco/issues/1489) + * Fix - Incorrect documentation for Install-ChocolateyInstallPackage - see [#1416](https://github.com/chocolatey/choco/issues/1416) + * [API] Fix - Logging - Loggers should always be checked for initialization - see [#1447](https://github.com/chocolatey/choco/issues/1447) + * Fix - Pro/Business - Expired licenses should not cause Chocolatey errors - see [#1500](https://github.com/chocolatey/choco/issues/1500) + +### IMPROVEMENTS + * [Security] RAR extraction with older 7zip can cause memory corruption (CVE-2018-5996) / ZIP Shrink vulnerability (CVE-2017-17969) - see [#1478](https://github.com/chocolatey/choco/issues/1478) + * Provide friendly error messages on well-known exit codes - see [#1526](https://github.com/chocolatey/choco/issues/1526) + * Capture password securely during validation when only the user name has been provided - see [#1524](https://github.com/chocolatey/choco/issues/1524) + * Outdated/Upgrade - Option/feature to ignore unfound packages - see [#1398](https://github.com/chocolatey/choco/issues/1398) + * Installation/Setup: run choco once to initialize the config file - see [#1401](https://github.com/chocolatey/choco/issues/1401) + * Logging - Log access denied for config file to log file only - see [#1445](https://github.com/chocolatey/choco/issues/1445) + * Ability to pick x64/x86 runtime binaries for shimming by architecture without needing PowerShell scripts - see [#1365](https://github.com/chocolatey/choco/issues/1365) + * Logging - Add '--no-color' as a global option and 'logWithoutColor' feature - see [#100](https://github.com/chocolatey/choco/issues/100) + * Reset colors after abnormal exit - see [#474](https://github.com/chocolatey/choco/issues/474) + * [API] Logging - Set logging levels debug/verbose/trace - see [#1448](https://github.com/chocolatey/choco/issues/1448) + * [API] Logging - Sync already logged items when setting custom logging - see [#1446](https://github.com/chocolatey/choco/issues/1446) + * [API] Fix - Ensure one instantiation of GetChocolatey at a time - see [#1400](https://github.com/chocolatey/choco/issues/1400) + * Pro/Business - Uninstall - Keep stored package information by default - see [#1399](https://github.com/chocolatey/choco/issues/1399) + * Pro/Business - Logging - See licensing logging output - see [#1488](https://github.com/chocolatey/choco/issues/1488) + + +## [0.10.8](https://github.com/chocolatey/choco/issues?q=milestone%3A0.10.8+is%3Aclosed) (August 30, 2017) With this release, Package Parameters are fully supported from both the user side and the packaging side. Check out [the documentation](https://chocolatey.org/docs/helpers-get-packageparameters) and check out the [walkthrough](https://chocolatey.org/docs/how-to-parse-package-parameters-argument) on how to use package parameters in your packaging. Note if you are pushing packages to the community repository, you must continue to take a dependency on the `chocolatey-core.extension` as a polyfill for older versions until at least six months after a new feature is released. What you can do with logging has greatly increased your ability to have more power over how it works and deeper output to determine errors (we've expanded `--trace` [#1379](https://github.com/chocolatey/choco/issues/1379)). This release also gives packagers and users more power when working with the AutoUninstaller - opt-out ([#1257](https://github.com/chocolatey/choco/issues/1257)) and passing arguments to the uninstaller ([#1133](https://github.com/chocolatey/choco/issues/1133)). @@ -13,11 +78,9 @@ What you can do with logging has greatly increased your ability to have more pow Another noteworthy addition is the ability to pass custom properties to Choco like you would do with `nuget pack`, allowing better integration with packages you manage in Visual Studio ([#1313](https://github.com/chocolatey/choco/issues/1313)). ### FEATURES - -* Function - Get-PackageParameters - see [#1393](https://github.com/chocolatey/choco/issues/1393) + * Function - Get-PackageParameters - see [#1393](https://github.com/chocolatey/choco/issues/1393) ### BUG FIXES - * Fix - "Value cannot be null" running choco outdated - see [#1383](https://github.com/chocolatey/choco/issues/1383) * Fix - Package parameters are ignored on when install directly points to nupkg/nuspec - see [#1155](https://github.com/chocolatey/choco/issues/1155) * Fix - Logging - log4net Logger location (the code location logging) is incorrect - see [#1377](https://github.com/chocolatey/choco/issues/1377) @@ -26,7 +89,6 @@ Another noteworthy addition is the ability to pass custom properties to Choco li * [API] Fix - Config output is being set to Regular Output - see [#1396](https://github.com/chocolatey/choco/issues/1396) ### IMPROVEMENTS - * [Security][POSH Host] Implement Read-Host -AsSecureString- see [#1335](https://github.com/chocolatey/choco/issues/1335) * AutoUninstaller - Opt-out from packages - see [#1257](https://github.com/chocolatey/choco/issues/1257) * AutoUninstaller - Use Uninstall Arguments and Override Arguments if provided - see [#1133](https://github.com/chocolatey/choco/issues/1133) @@ -43,17 +105,14 @@ Another noteworthy addition is the ability to pass custom properties to Choco li ## [0.10.7](https://github.com/chocolatey/choco/issues?q=milestone%3A0.10.7+is%3Aclosed) (June 8, 2017) - ### BREAKING CHANGES - * Set requested execution level back to asInvoker while determining more advanced elevated scenarios - see [#1324](https://github.com/chocolatey/choco/issues/1324) - After much deliberation with the community, we're moving execution policy back to the default of `asInvoker` to make it work like it did prior to 0.10.4. However we are leaving it open for you to change it to whatever execution level you want by keeping the manifest external from choco.exe. We will be looking more at advanced scenarios - the discussion is at [#1307](https://github.com/chocolatey/choco/issues/1307). If you don't have a GitHub account, feel free to start a thread on the mailing list (and if you are a customer, you have private channels to voice your opinions on this change). + After much deliberation with the community, we're moving execution policy back to the default of `asInvoker` to make it work like it did prior to 0.10.4. However we are leaving it open for you to change it to whatever execution level you want by keeping the manifest external from choco.exe. We will be looking more at advanced scenarios - the discussion is at [#1307](https://github.com/chocolatey/choco/issues/1307). If you don't have a GitHub account, feel free to start a thread on the mailing list (and if you are a customer, you have private channels to voice your opinions on this change). - Moving to "asInvoker" means that Chocolatey will not ask for elevated privileges prior to execution, so you will need to remember to do that yourself. If you go to `$env:ChocolateyInstall`, you will find `choco.exe.manifest`, and you have freedom to adjust the execution level as you see fit. There is one catch, you will need to do it on every install/upgrade of Chocolatey until [#1206](https://github.com/chocolatey/choco/issues/1206) is implemented. + Moving to "asInvoker" means that Chocolatey will not ask for elevated privileges prior to execution, so you will need to remember to do that yourself. If you go to `$env:ChocolateyInstall`, you will find `choco.exe.manifest`, and you have freedom to adjust the execution level as you see fit. There is one catch, you will need to do it on every install/upgrade of Chocolatey until [#1206](https://github.com/chocolatey/choco/issues/1206) is implemented. ### BUG FIXES - * Fix - Add file/file64 not as aliases, but use them to set url/url64 if empty - see [#1323](https://github.com/chocolatey/choco/issues/1323) * Fix - Automatic Uninstaller doesn't split multiple paths - see [#1327](https://github.com/chocolatey/choco/issues/1327) * Fix - choco list / search / info - fails with local directory source - see [#1325](https://github.com/chocolatey/choco/issues/1325) @@ -62,14 +121,11 @@ Another noteworthy addition is the ability to pass custom properties to Choco li * Fix - Deserializing failures on package info files should not fail the choco run - see [#1328](https://github.com/chocolatey/choco/issues/1328) ### IMPROVEMENTS - * Use `$packageArgs` in default template for uninstall script - see [#1330](https://github.com/chocolatey/choco/issues/1330) ## [0.10.6.1](https://github.com/chocolatey/choco/issues?q=milestone%3A0.10.6.1+is%3Aclosed) (June 3, 2017) - ### BUG FIXES - * Fix - shimgen fails with unrecognized option: '/errorendlocation' in .NET 4.0 only environments - see [#1321](https://github.com/chocolatey/choco/issues/1321) * Fix - Do not fail extracting resources at runtime - see [#1318](https://github.com/chocolatey/choco/issues/1318) * Fix - Silently fail when deleting choco.exe.old - see [#1319](https://github.com/chocolatey/choco/issues/1319) @@ -80,7 +136,6 @@ Another noteworthy addition is the ability to pass custom properties to Choco li This release includes fixes and adjustments to the API to make it more usable. Search / List has also been improved with the data that it returns when verbose/detailed, along with info always returning a package with information instead of erroring sometimes. The search results from the community package repository now match what you see on the website. ### BUG FIXES - * Fix - choco.exe.manifest is ignored because it is extracted AFTER first choco.exe access - see [#1292](https://github.com/chocolatey/choco/issues/1292) * Fix - Chocolatey config changes in 0.10.4+ - The process cannot access the file because it is being used by another process - see [#1241](https://github.com/chocolatey/choco/issues/1241) * Fix - PowerShell sees authenticode hash as changed in scripts that are UTF8 (w/out BOM) that contain unicode characters - see [#1225](https://github.com/chocolatey/choco/issues/1225) @@ -99,7 +154,6 @@ This release includes fixes and adjustments to the API to make it more usable. S * Pro/Business - [API] Fix - Ensure DLL can work with licensed code - see [#1287](https://github.com/chocolatey/choco/issues/1287) ### IMPROVEMENTS - * Default package push url now uses push subdomain - see [#1285](https://github.com/chocolatey/choco/issues/1285) * Report process id in the log files - see [#1239](https://github.com/chocolatey/choco/issues/1239) * choco info / list / search - Include summary on detailed view - see [#1253](https://github.com/chocolatey/choco/issues/1253) @@ -120,13 +174,10 @@ This release includes fixes and adjustments to the API to make it more usable. S ## [0.10.5](https://github.com/chocolatey/choco/issues?q=milestone%3A0.10.5+is%3Aclosed) (March 30, 2017) - ### BUG FIXES - * Fix - Start-ChocolateyProcessAsAdmin errors when running PowerShell scripts - see [#1220](https://github.com/chocolatey/choco/issues/1220) ### IMPROVEMENTS - * Show machine readable output with `choco outdated -r` - see [#1222](https://github.com/chocolatey/choco/issues/1222) @@ -145,23 +196,21 @@ This also marks the first release that uses the [Chocolatey Software digital cer Another major feature released in preview is [using remembered arguments on upgrade](https://github.com/chocolatey/choco/issues/797). This is in preview in 0.10.4 and will be turned to 'on' automatically in a future release. We are going to be continually making it better and won't turn it on by default until it is ready. If you want to turn it on and start using it, once you have 0.10.4 installed, run `choco feature enable -n useRememberedArgumentsForUpgrades`. You can also do this per command with `--use-remembered-arguments`. You can also turn it off per command with `--ignore-remembered-arguments`. We've also really described a lot of important considerations and thoughts related to using this so there are no surprises. Please do read the issue notes at length if you plan to use this feature to reduce confusion. ### BREAKING CHANGES - * Run with highestAvailable Execution Level by default - see [#1054](https://github.com/chocolatey/choco/issues/1054) - One longstanding request with Chocolatey was to have it always request admin privileges before running. This has been a hope that it would cut down on the accidental runs of Chocolatey in a command shell that is not elevated and needing to open one that is elevated. This UAC (User account control) setting is handled by something called an application manifest (app.manifest). We had it set to "asInvoker", or run with the context of the user that ran the command. We've moved this to "highestAvailable", which means if you are a non-admin, it will just run under your context, but if you are an admin in a non-elevated shell, it will ask for elevated permissions to run. There is also "requireAdministrator", which locks execution down to administrators only. + One longstanding request with Chocolatey was to have it always request admin privileges before running. This has been a hope that it would cut down on the accidental runs of Chocolatey in a command shell that is not elevated and needing to open one that is elevated. This UAC (User account control) setting is handled by something called an application manifest (app.manifest). We had it set to "asInvoker", or run with the context of the user that ran the command. We've moved this to "highestAvailable", which means if you are a non-admin, it will just run under your context, but if you are an admin in a non-elevated shell, it will ask for elevated permissions to run. There is also "requireAdministrator", which locks execution down to administrators only. - Moving to "highestAvailable" allows for that asking of privileges that you are used to, up front before it runs. However one additional thing we did here was give you more control over this setting now. We used to embed the app manifest into choco.exe. We now set it next to choco.exe (base install under `$env:ChocolateyInstall`, you will find `choco.exe.manifest`) so you have more freedom to adjust those execution levels as you see fit. There is one catch, you will need to do it on every install/upgrade of Chocolatey until [#1206](https://github.com/chocolatey/choco/issues/1206) is implemented. + Moving to "highestAvailable" allows for that asking of privileges that you are used to, up front before it runs. However one additional thing we did here was give you more control over this setting now. We used to embed the app manifest into choco.exe. We now set it next to choco.exe (base install under `$env:ChocolateyInstall`, you will find `choco.exe.manifest`) so you have more freedom to adjust those execution levels as you see fit. There is one catch, you will need to do it on every install/upgrade of Chocolatey until [#1206](https://github.com/chocolatey/choco/issues/1206) is implemented. * When a prerelease is installed, it should upgrade to latest prerelease unless excluded - typically seen in choco upgrade all - see [#686](https://github.com/chocolatey/choco/issues/686) - When you run `choco upgrade all`, it never catches the prereleases. However if you run `choco upgrade all --pre`, it may upgrade some of your stable installs to prereleases. Neither of these situations are desirable. So by default, we've made it so that `choco upgrade all` just does the right thing, which is to upgrade your stable releases to the latest stable release and your prerelease packages will upgrade to the absolute latest available, whether that be stable or prerelease. If you need to change the behavior back to the old way for upgrade all, simply add the `--exclude-prerelease` option. + When you run `choco upgrade all`, it never catches the prereleases. However if you run `choco upgrade all --pre`, it may upgrade some of your stable installs to prereleases. Neither of these situations are desirable. So by default, we've made it so that `choco upgrade all` just does the right thing, which is to upgrade your stable releases to the latest stable release and your prerelease packages will upgrade to the absolute latest available, whether that be stable or prerelease. If you need to change the behavior back to the old way for upgrade all, simply add the `--exclude-prerelease` option. * Fix - Passing Allow Downgrade To upgrade against a prerelease may downgrade it to last stable version - see [#1212](https://github.com/chocolatey/choco/issues/1212) - This is a bug fix that was allowing a prerelease to be downgraded accidentally to the last stable version if you ran `choco upgrade somepackage --allow-downgrade` without a particular version and without `--pre`. Now while this would be less affected with #686 above, it could still happen. It's a bug. The only reason this was marked as breaking change is that someone could be depending on the buggy behavior. So heads up, this bug is now fixed. If you are attempting to downgrade, make sure you specify the version you want it to go down to. + This is a bug fix that was allowing a prerelease to be downgraded accidentally to the last stable version if you ran `choco upgrade somepackage --allow-downgrade` without a particular version and without `--pre`. Now while this would be less affected with #686 above, it could still happen. It's a bug. The only reason this was marked as breaking change is that someone could be depending on the buggy behavior. So heads up, this bug is now fixed. If you are attempting to downgrade, make sure you specify the version you want it to go down to. ### FEATURES - * [Security][Preview] Use Remembered Arguments for a Package During Upgrades - You must opt in for this to work - see [#797](https://github.com/chocolatey/choco/issues/797) * Show download progress for the packages themselves - see [#1134](https://github.com/chocolatey/choco/issues/1134) * Set Explicit Proxy Bypass List / Bypass On Local - see [#1165](https://github.com/chocolatey/choco/issues/1165) @@ -169,7 +218,6 @@ Another major feature released in preview is [using remembered arguments on upgr * Add File64 to Install-ChocolateyInstallPackage and Get-ChocolateyUnzip - see [#1187](https://github.com/chocolatey/choco/issues/1187) ### BUG FIXES - * [Security] Fix - PowerShell sees authenticode hash as changed in scripts that were signed with Unix Line Endings (`LF`) - unable to use `AllSigned` - see [#1203](https://github.com/chocolatey/choco/issues/1203) * [Security] Fix - chocolatey setup - Use https for downloading .NET Framework 4x if not installed - see [#1112](https://github.com/chocolatey/choco/issues/1112) * Fix - chocolatey.config gets corrupted when multiple processes access simultaneously - see [#1047](https://github.com/chocolatey/choco/issues/1047) @@ -206,7 +254,6 @@ Another major feature released in preview is [using remembered arguments on upgr * Fix - Pro/Business - Synchronized packages with DLLs are attempted to be imported by Chocolatey's PowerShell Extensions Loader - see [#1041](https://github.com/chocolatey/choco/issues/1041) ### IMPROVEMENTS - * [Security] Username and password for `choco apikey` not encrypted in output - see [#1106](https://github.com/chocolatey/choco/issues/1106) * [Security] Sign Binaries / Authenticode Signatures with Chocolatey Software digital certificate - see [#1214](https://github.com/chocolatey/choco/issues/1214) * Setting commandExecutionTimeout to 0 means never time out - see [#1202](https://github.com/chocolatey/choco/issues/1202) @@ -243,51 +290,44 @@ Another major feature released in preview is [using remembered arguments on upgr ## [0.10.3](https://github.com/chocolatey/choco/issues?q=milestone%3A0.10.3+is%3Aclosed) (October 7, 2016) - ### BREAKING CHANGES - * Fix - Do Not Check `$LastExitCode` - Only error a package install if script errors or set a different exit code when it is specifically set - see [#1000](https://github.com/chocolatey/choco/issues/1000) -Starting in v0.9.10, Chocolatey started checking `$LASTEXITCODE` in addition to the script command success as a way to be more helpful in determining package failures. This meant it offered the ability to capture when a script exited with `Exit 1` and handle that accordingly. However that really has never been a recommended scenario for returning errors from scripts and is not seen in the wild anywhere so it is believed that those that may be affected are very few. + Starting in v0.9.10, Chocolatey started checking `$LASTEXITCODE` in addition to the script command success as a way to be more helpful in determining package failures. This meant it offered the ability to capture when a script exited with `Exit 1` and handle that accordingly. However that really has never been a recommended scenario for returning errors from scripts and is not seen in the wild anywhere so it is believed that those that may be affected are very few. -Checking `$LastExitCode` checks the last executable's exit code when the script specifically does not call `Exit` (which is . This can lead to very perplexing failures, such as running a successful xcopy that exits with `2` and seeing package failures without understanding why. Since it is not typically recommended to call `Exit` to return a value from PowerShell because of issues with different hosts, it's less of a concern to only look at explicit failures. For folks that may need it, allow failing a package again by the last external command exit code or `exit` from a PowerShell script. Note that it is not recommended to use exit with a number to return from PowerShell scripts. Instead you should use `$env:ChocolateyExitCode` or `Set-PowerShellExitCode` (first available in v0.9.10) to ensure proper setting of the exit code. + Checking `$LastExitCode` checks the last executable's exit code when the script specifically does not call `Exit` (which is . This can lead to very perplexing failures, such as running a successful xcopy that exits with `2` and seeing package failures without understanding why. Since it is not typically recommended to call `Exit` to return a value from PowerShell because of issues with different hosts, it's less of a concern to only look at explicit failures. For folks that may need it, allow failing a package again by the last external command exit code or `exit` from a PowerShell script. Note that it is not recommended to use exit with a number to return from PowerShell scripts. Instead you should use `$env:ChocolateyExitCode` or `Set-PowerShellExitCode` (first available in v0.9.10) to ensure proper setting of the exit code. -If you need the prior behavior, please turn on the feature `scriptsCheckLastExitCode`. + If you need the prior behavior, please turn on the feature `scriptsCheckLastExitCode`. ### BUG FIXES - * Fix - chocolateybeforemodify runs after modifying (moving) chocolatey lib package files - see [#995](https://github.com/chocolatey/choco/issues/995) * Fix - The refreshenv command throws an error about Write-FunctionCallLogMessage when ran in PowerShell on 0.10.2 - see [#996](https://github.com/chocolatey/choco/issues/996) ## [0.10.2](https://github.com/chocolatey/choco/issues?q=milestone%3A0.10.2+is%3Aclosed) (September 30, 2016) - We're dubbing this the "Every Joe" release in honor of a friend that just lost his fight with brain cancer. If you want to help further research, please make a donation to a cancer research association of your choosing (e.g. the [American Brain Tumor Assocation](http://www.abta.org/thank-you.html)). A couple of important fixes/enhancements in this release. Most of the improvements are about providing better feedback to you and fixing minor issues. The big one surrounds when packages set a download path for a file using `$env:TEMP`, choco will ensure that the file can still be found for later use. ### BUG FIXES - -* Fix - Downloaded file is at old `$env:TEMP\chocolatey\chocolatey` location, but install calls with just `$env:TEMP\chocolatey\` location - see [#969](https://github.com/chocolatey/choco/issues/969) -* Fix - [Pro/Business] UseOriginalLocation fails when there is no 64bit file - see [#972](https://github.com/chocolatey/choco/issues/972) -* Fix - Do not use unparsed options as package names - see [#983](https://github.com/chocolatey/choco/issues/983) + * Fix - Downloaded file is at old `$env:TEMP\chocolatey\chocolatey` location, but install calls with just `$env:TEMP\chocolatey\` location - see [#969](https://github.com/chocolatey/choco/issues/969) + * Fix - [Pro/Business] UseOriginalLocation fails when there is no 64bit file - see [#972](https://github.com/chocolatey/choco/issues/972) + * Fix - Do not use unparsed options as package names - see [#983](https://github.com/chocolatey/choco/issues/983) ### IMPROVEMENTS - -* Start-ChocolateyProcessAsAdmin enhancements - see [#977](https://github.com/chocolatey/choco/issues/977) -* Log PowerShell function calls better - see [#976](https://github.com/chocolatey/choco/issues/976) -* Allow environment variables in some config settings - see [#971](https://github.com/chocolatey/choco/issues/971) -* [Pro/Business] Provide license type to environment variables - see [#968](https://github.com/chocolatey/choco/issues/968) -* Note that chocolateyUninstall.ps1 may no longer required in template - see [#982](https://github.com/chocolatey/choco/issues/982) -* Provide guidance when licensed only options are passed to FOSS - see [#984](https://github.com/chocolatey/choco/issues/984) -* Rollback automatically when a user cancels an operation - see [#985](https://github.com/chocolatey/choco/issues/985) -* Explain how to workaround a failing uninstall - see [#573](https://github.com/chocolatey/choco/issues/573) -* Remove extra forward slashes in url - see [#986](https://github.com/chocolatey/choco/issues/986) -* Side by side uninstall enhancements - see [#992](https://github.com/chocolatey/choco/issues/992) + * Start-ChocolateyProcessAsAdmin enhancements - see [#977](https://github.com/chocolatey/choco/issues/977) + * Log PowerShell function calls better - see [#976](https://github.com/chocolatey/choco/issues/976) + * Allow environment variables in some config settings - see [#971](https://github.com/chocolatey/choco/issues/971) + * [Pro/Business] Provide license type to environment variables - see [#968](https://github.com/chocolatey/choco/issues/968) + * Note that chocolateyUninstall.ps1 may no longer required in template - see [#982](https://github.com/chocolatey/choco/issues/982) + * Provide guidance when licensed only options are passed to FOSS - see [#984](https://github.com/chocolatey/choco/issues/984) + * Rollback automatically when a user cancels an operation - see [#985](https://github.com/chocolatey/choco/issues/985) + * Explain how to workaround a failing uninstall - see [#573](https://github.com/chocolatey/choco/issues/573) + * Remove extra forward slashes in url - see [#986](https://github.com/chocolatey/choco/issues/986) + * Side by side uninstall enhancements - see [#992](https://github.com/chocolatey/choco/issues/992) ## [0.10.1](https://github.com/chocolatey/choco/issues?q=milestone%3A0.10.1+is%3Aclosed) (September 19, 2016) - We're dubbing this the "Shhh! Keep that secret please" release. We've found that when passing in passwords and other sensitive arguments, those items can end up in the logs in clear text. We've addressed this in [#948](https://github.com/chocolatey/choco/issues/948) and [#953](https://github.com/chocolatey/choco/issues/953). When it comes to passing sensitive arguments through to native installers, you can set up environment variables with those sensitive args and pass those arguments directly through to `Start-ChocolateyProcessAsAdmin`. If you prefer a better experience, the licensed version allows passing sensitive options directly through choco.exe as `--install-arguments-sensitive` and `--package-parameters-sensitive`. Read more in the [Licensed CHANGELOG](https://github.com/chocolatey/choco/blob/master/CHANGELOG_LICENSED.md). Perhaps the biggest improvement in this release is that Chocolatey will automatically look to see if it can download binaries over HTTPS when provided an HTTP url. If so, Chocolatey will switch to downloading the binaries over SSL. This provides better security in downloading and knowing you are getting the binary from the source location instead of a possible man in the middle location, especially when the package does not provide checksums for verification. @@ -295,14 +335,12 @@ Perhaps the biggest improvement in this release is that Chocolatey will automati Another improvement you may not even notice, but we think you will love is that Chocolatey now supports TLS v1.2 transport which presents a nice transparent increase in security. You will need to have at least .NET Framework 4.5 installed to take advantage of this feature. ### FEATURES - * [Security] Support TLS v1.2 - see [#458](https://github.com/chocolatey/choco/issues/458) * [Security] Attempt to download packages via HTTPS connection - see [#746](https://github.com/chocolatey/choco/issues/746) * [Security] Pro/Business - Pass sensitive arguments to installers - see [#948](https://github.com/chocolatey/choco/issues/948) * Search (and info) by version - see [#935](https://github.com/chocolatey/choco/issues/935) ### BUG FIXES - * [Security] Fix - Passwords in command line options are logged in clear text - see [#953](https://github.com/chocolatey/choco/issues/953) * [Security] Fix - For PowerShell v2 - if switch down to SSLv3 protocol fails, go back to original protocol - see [#958](https://github.com/chocolatey/choco/issues/958) * Fix - Unzipping to ProgramFiles/System32 is Subject to File System Redirection - see [#960](https://github.com/chocolatey/choco/issues/960) @@ -320,7 +358,6 @@ Another improvement you may not even notice, but we think you will love is that * Fix - Start-ChocolateyProcessAsAdmin Module Import for PowerShell causes errors - see [#901](https://github.com/chocolatey/choco/issues/901) ### IMPROVEMENTS - * Transactional Install - Improve concurrent operations (pending) - see [#943](https://github.com/chocolatey/choco/issues/943) * Uninstall-ChocolateyPackage should set unrecognized fileType to exe - see [#964](https://github.com/chocolatey/choco/issues/964) * Powershell functions - Allow access to package title, not only ID - see [#925](https://github.com/chocolatey/choco/issues/925) @@ -339,7 +376,6 @@ What was planned for 0.9.10.4 is now 0.10.0. This is due partly to a breaking ch 0.10.0 carries the fixes for 0.9.10.4 and includes a major security enhancement (checksum requirement). ### BREAKING CHANGES - * [Security] Checksum requirement and enhancements - see [#112](https://github.com/chocolatey/choco/issues/112) Checksums in package scripts are meant as a measure to validate the originally intended downloaded resources used in the creation of a package are the same files that are received at a future date. This also ensures that the same files that are checked by all parts of moderation (if applicable) are the same files that are received by users for a package. This is seen mostly on the community repository because it is public and packages are subject to copyright laws (distribution rights), which typically requires the package scripts to download software from the official distribution locations. The Chocolatey framework has had the ability to use checksums in package scripts since [July 2014](https://chocolatey.org/packages/chocolatey/0.9.8.24#releasenotes). @@ -360,15 +396,12 @@ You can also disable the feature `allowEmptyChecksumsSecure` to enforce checksum **Other things I should know?** Users also now have the ability to pass their own checksums and checksumtypes into the install. See https://chocolatey.org/docs/commands-install / https://chocolatey.org/docs/commands-upgrade. ### KNOWN ISSUES - * [Known Issues](https://github.com/chocolatey/choco/labels/Bug) ### FEATURES - * Pro/Business - Download a package without installing it - see [#108](https://github.com/chocolatey/choco/issues/108) ### BUG FIXES - * Fix - Installing choco on Windows 10 Vagrant box stops Vagrant from being able to manage the box - see [#834](https://github.com/chocolatey/choco/issues/834) * Fix - 64bit 7z.exe on 32bit system in chocolatey\tools - see [#836](https://github.com/chocolatey/choco/issues/836) * Fix - [POSH Host] PowerShell exit code does not reset between packages in a single run - see [#854](https://github.com/chocolatey/choco/issues/854) @@ -391,7 +424,6 @@ You can also disable the feature `allowEmptyChecksumsSecure` to enforce checksum * Fix - DISM /all doesn't run anywhere but Windows 6.2 -- no dependencies get installed - see [#897](https://github.com/chocolatey/choco/issues/897) ### IMPROVEMENTS - * Do not install tab completion (edit of profile) under certain conditions - see [#833](https://github.com/chocolatey/choco/issues/833) * Choco install with packages.config should print out the packages to install - see [#878](https://github.com/chocolatey/choco/issues/878) * Larger default log file size and retention - see [#852](https://github.com/chocolatey/choco/issues/852) @@ -402,9 +434,7 @@ You can also disable the feature `allowEmptyChecksumsSecure` to enforce checksum ## [0.9.10.3](https://github.com/chocolatey/choco/issues?q=milestone%3A0.9.10.3+is%3Aclosed) (June 23, 2016) - ### BUG FIXES - * Fix - Ignore ValidPackage Exit Codes for Real - see [#827](https://github.com/chocolatey/choco/issues/827) * Fix - Cache folder running under SYSTEM account should be C:\Windows\TEMP - see [#826](https://github.com/chocolatey/choco/issues/826) * Fix - Built-in 7zip doesn't behave properly - see [#775](https://github.com/chocolatey/choco/issues/775) @@ -413,32 +443,25 @@ You can also disable the feature `allowEmptyChecksumsSecure` to enforce checksum * Fix - Silent Args being passed as a string array cause package failure - see [#808](https://github.com/chocolatey/choco/issues/808) ### IMPROVEMENTS - * Hold pending check for 10 seconds / provide means of explicitly overriding the transactional install cleanup - see [#822](https://github.com/chocolatey/choco/issues/822) * Pro/Business - Add runtime skip option to allow skipping the virus scanner - see [#786](https://github.com/chocolatey/choco/issues/786) ## [0.9.10.2](https://github.com/chocolatey/choco/issues?q=milestone%3A0.9.10.2+is%3Aclosed) (June 19, 2016) - ### BUG FIXES - * Fix - Chocolatey Licensed is unable to find 0.9.10.x (only 0.9.10.0) - see [#814](https://github.com/chocolatey/choco/issues/814) * Fix - Logging is broken in some packages due to new TEMP directory - see [#813](https://github.com/chocolatey/choco/issues/813) * [API] Fix - When performing an Install/Uninstall/Upgrade operation through the API, an error is throw for "chocolatey.resources" - see [#811](https://github.com/chocolatey/choco/issues/811) ### IMPROVEMENTS - * Ensure log file path exists - and fix the log file arguments if necessary - see [#758](https://github.com/chocolatey/choco/issues/758) ## [0.9.10.1](https://github.com/chocolatey/choco/issues?q=milestone%3A0.9.10.1+is%3Aclosed) (June 18, 2016) - ### BUG FIXES - * Fix - Cannot bind argument to parameter 'exitCode' because it is null - see [#810](https://github.com/chocolatey/choco/issues/810) ### IMPROVEMENTS - * [Security] Upgrade to 7zip 16.02 to overcome CVE-2016-2334/CVE-2016-2335 - see [#812](https://github.com/chocolatey/choco/issues/812) @@ -465,7 +488,6 @@ We redesigned our `choco new` default packaging template and we've made managing There are 150 tickets closed for this release! We've included remediation steps for when a breaking change affects you. Mostly if you have been using Chocolatey in a recommended way, you won't even notice any adverse changes. There are a number of things we thought to highlight, and quite a few security enhancements coming in this release (look for the [Security] tag on the ticket summary). ### BREAKING CHANGES - * Only fail automation scripts (chocolateyInstall.ps1) if the script returns non-zero exit code - see [#445](https://github.com/chocolatey/choco/issues/445) The 0.9.8 series would only fail a package with terminating errors. The 0.9.9 series took that a bit further and started failing packages if anything wrote to stderr. It turns out that is a bad idea. Only when PowerShell exits with non-zero (which comes with terminating errors) should the package fail due to this. If you need the old behavior of the 0.9.9 series, you can get it back with a switch (`--fail-on-standard-error` and its aliases) and/or a feature flip (`failOnStandardError`). @@ -488,11 +510,9 @@ If you were using any of the functions in a non-recommended way or not compliant This further restricts the default installation location by removing all permissions and inheritance of permissions, explicitly giving Administrator/LocalSystem to Full access, and Users are granted Read and Execute. In prior installations, we ensured Modify access to the installing user, but that has been removed for security reasons. Should you need the previous behavior, set `$env:ChocolateyInstallAllowCurrentUser="true"`. ### KNOWN ISSUES - * [Known Issues](https://github.com/chocolatey/choco/labels/Bug) ### FEATURES - * Alternative Sources - see [#14](https://github.com/chocolatey/choco/issues/14) * [POSH Host] Use Internal PowerShell Host - see [#8](https://github.com/chocolatey/choco/issues/8) * Run a script before uninstall/upgrade (chocolateyBeforeModify.ps1) to allow for things like services to shutdown - see [#268](https://github.com/chocolatey/choco/issues/268) @@ -515,7 +535,6 @@ This further restricts the default installation location by removing all permiss * Pro/Business - Sync "choco installed status" with "Windows installed status" - see [#567](https://github.com/chocolatey/choco/issues/567) ### BUG FIXES - * [Security] Fix - Only load the Chocolatey PowerShell module from a known location - see [#560](https://github.com/chocolatey/choco/issues/560) * [Security] Fix - Package source authentication at http://location/path doesn't also use http://location/ (base url) - see [#466](https://github.com/chocolatey/choco/issues/466) * [Security] Fix - When defining a proxy without credentials - proxy password is shown in plain text - see [#503](https://github.com/chocolatey/choco/issues/503) @@ -578,7 +597,6 @@ This further restricts the default installation location by removing all permiss * Fix - Running choco new creates a bad nuspec - see [#801](https://github.com/chocolatey/choco/issues/801) ### IMPROVEMENTS - * AutoUninstaller is on by default - see [#308](https://github.com/chocolatey/choco/issues/308) * Use the actual download file name instead of providing one - see [#435](https://github.com/chocolatey/choco/issues/435) * Unset Configuration Values - see [#551](https://github.com/chocolatey/choco/issues/551) @@ -652,16 +670,12 @@ This further restricts the default installation location by removing all permiss ## [0.9.9.12](https://github.com/chocolatey/choco/issues?q=milestone%3A0.9.9.12+is%3Aclosed) (March 18, 2016) - ### BUG FIXES - * Fix - PowerShell "Collection is read-only" - see [#659](https://github.com/chocolatey/choco/issues/659) ## [0.9.9.11](https://github.com/chocolatey/choco/issues?q=milestone%3A0.9.9.11+is%3Aclosed) (October 6, 2015) - ### BUG FIXES - * Fix - Pin list is broken - see [#452](https://github.com/chocolatey/choco/issues/452) @@ -670,7 +684,6 @@ This further restricts the default installation location by removing all permiss Not to be confused with 0.9.10 (this is not that version). This fixes a small but extremely significant issue with relation to configuration managers and other tools that use choco. ### BUG FIXES - * Fix - List output for other tools messed up in 0.9.9.9 (pipe separator missing) - see [#450](https://github.com/chocolatey/choco/issues/450) * Fix - accidentally escaped characters in "new" -help - see [#447](https://github.com/chocolatey/choco/issues/447) @@ -680,13 +693,11 @@ Not to be confused with 0.9.10 (this is not that version). This fixes a small bu With this release you can completely configure choco from the command line (including the priority of sources). Choco now allows you to create [custom package templates](https://github.com/chocolatey/choco/issues/76). Choco has [proper proxy support](https://github.com/chocolatey/choco/issues/243) now. We also squashed up some bugs, like the infinite download loop that happens if the connection is lost. We've also improved the installation experience of Chocolatey itself, [unpacking all of the required setup files in the chocolatey package](https://github.com/chocolatey/choco/issues/347) and improving the messaging output during the bootstrapping process. Chocolatey also [doesn't try to write config updates every command](https://github.com/chocolatey/choco/issues/364), unless something actually changes in the config file. And last but not least for mentions, the issue of [choco not recognizing itself as needing upgraded after being installed by the bootstrapper](https://github.com/chocolatey/choco/issues/414) is now fixed. ### FEATURES - * Config Command - see [#417](https://github.com/chocolatey/choco/issues/417) * Create Custom Package Templates - see [#76](https://github.com/chocolatey/choco/issues/76) * Proxy Support - see [#243](https://github.com/chocolatey/choco/issues/243) ### BUG FIXES - * Fix - [Security] Remove rollback should validate it exists in choco install backup directory - see [#387](https://github.com/chocolatey/choco/issues/387) * Fix - Ensure chocolatey is installed into the lib folder during initial install - see [#414](https://github.com/chocolatey/choco/issues/414) * Fix - Infinite loop downloading files if connection is lost - see [#285](https://github.com/chocolatey/choco/issues/285) @@ -703,7 +714,6 @@ With this release you can completely configure choco from the command line (incl * Fix - Export cmdlets for automation scripts - see [#422](https://github.com/chocolatey/choco/issues/422) ### IMPROVEMENTS - * [Security] Add SHA-2 (sha256 / sha512) to checksum - see [#113](https://github.com/chocolatey/choco/issues/113) * Sources should have explicit priority order- see [#71](https://github.com/chocolatey/choco/issues/71) * Unpack the powershell files just before packaging up the nupkg (Installing chocolatey meta) - see [#347](https://github.com/chocolatey/choco/issues/347) @@ -721,14 +731,11 @@ With this release you can completely configure choco from the command line (incl ## [0.9.9.8](https://github.com/chocolatey/choco/issues?q=milestone%3A0.9.9.8+is%3Aclosed) (June 26, 2015) - ### BUG FIXES - * Fix - [Security] choco install -y C: deletes all files - see [#341](https://github.com/chocolatey/choco/issues/341) * Fix - Read-Host halts scripts rather than prompt for input - see [#219](https://github.com/chocolatey/choco/issues/219) ### IMPROVEMENTS - * Download Progress Bar is Missing - see [#56](https://github.com/chocolatey/choco/issues/56) @@ -743,14 +750,12 @@ The first big feature is enhancing the nuspec. I mentioned this I know, but *now The second is Xml Document Transformations (XDT), which I think many folks are aware of but may not realize what it can provide. [NuGet has allowed transformations for quite awhile](https://docs.nuget.org/Create/Configuration-File-and-Source-Code-Transformations) to allow you to make changes to an `app.config`/`web.config` on install/uninstall. We are following in similar footsteps to allow you to do similar when installing/upgrading packages. We will look for `*.install.xdt` files in the package (doesn't matter where) and they will apply to configuration files with the same name in the package. This means that during upgrades we won't overwrite configuration files during upgrades that have opted into this feature. It allows you to give users a better experience during upgrades because they won't need to keep making the same changes to the xml config files each time they upgrade your package. ### FEATURES - * Allow XDT Configuration Transforms - see [#331](https://github.com/chocolatey/choco/issues/331) * Prevent reboots - see [#316](https://github.com/chocolatey/choco/issues/316) * Enhance the nuspec - first wave - see [#205](https://github.com/chocolatey/choco/issues/205) * Uninstaller Service Enhancements - see [#305](https://github.com/chocolatey/choco/issues/305) ### BUG FIXES - * When uninstall fails, do not continue removing files - see [#315](https://github.com/chocolatey/choco/issues/315) * Do not run autouninstaller if the package result is already a failure - see [#323](https://github.com/chocolatey/choco/issues/323) * Fix - Auto Uninstaller can fail if chocolateyUninstall.ps1 uninstalls prior to it running - see [#304](https://github.com/chocolatey/choco/issues/304) @@ -764,7 +769,6 @@ The second is Xml Document Transformations (XDT), which I think many folks are a * Fix - A pin is not created for existing installations (prior to new choco) - see [#60](https://github.com/chocolatey/choco/issues/60) ### IMPROVEMENTS - * Allow upgrade to always install missing packages - see [#300](https://github.com/chocolatey/choco/issues/300) * Enhance Templates - see [#296](https://github.com/chocolatey/choco/issues/296) * Always log debug output to the log file - see [#319](https://github.com/chocolatey/choco/issues/319) @@ -772,16 +776,15 @@ The second is Xml Document Transformations (XDT), which I think many folks are a * Use %systemroot% in place of %windir%. PATH exceed 2048 breaks choco - see [#252](https://github.com/chocolatey/choco/issues/252) * Add fault tolerance to registry snapshot checks - see [#337](https://github.com/chocolatey/choco/issues/337) + ## [0.9.9.6](https://github.com/chocolatey/choco/issues?q=milestone%3A0.9.9.6+is%3Aclosed) (May 16, 2015) Some really large fixes this release, especially removing all files that are installed to the package directory if they haven't changed, including ensuring that the nupkg file is always removed on successful uninstalls. The really big add some folks are going to like is the new outdated command. Some more variables that were misused have been brought back, which allows some packages (like Atom) to be installed again without issue. If you can believe some people never read these, we decided to add a note to the installer prompt to let people know about -y. ### FEATURES - * Outdated Command - Use `choco outdated` to see outdated packages - see [#170](https://github.com/chocolatey/choco/issues/170) ### BUG FIXES - * Fix - NotSilent Switch Not Working - see [#281](https://github.com/chocolatey/choco/issues/281) * Fix - Silent installation of choco without admin is not possible - see [#274](https://github.com/chocolatey/choco/issues/274) * Fix - Package resolves to latest version from any source - see [#279](https://github.com/chocolatey/choco/issues/279) @@ -793,20 +796,17 @@ Some really large fixes this release, especially removing all files that are ins * Fix - Auto uninstaller strips off "/" and "-" in arguments - see [#212](https://github.com/chocolatey/choco/issues/212) ### IMPROVEMENTS - * Uninstall removes all installed files if unchanged - see [#121](https://github.com/chocolatey/choco/issues/121) * Auto uninstaller should convert /I to /X for Msi Uninstalls - see [#271](https://github.com/chocolatey/choco/issues/271) * Bring back more variables for feature parity - see [#267](https://github.com/chocolatey/choco/issues/267) * Mention -y in the prompt - see [#265](https://github.com/chocolatey/choco/issues/265) -## [0.9.9.5](https://github.com/chocolatey/choco/issues?q=milestone%3A0.9.9.5+is%3Aclosed) (April 20, 2015) +## [0.9.9.5](https://github.com/chocolatey/choco/issues?q=milestone%3A0.9.9.5+is%3Aclosed) (April 20, 2015) ### BREAKING CHANGES - * Renamed short option `p` to `i` for list --include-programs so that `p` could be ubiquitous for password across commands that optionally can pass a password - see [#240](https://github.com/chocolatey/choco/issues/240) ### BUG FIXES - * Fix - Secure Sources Not Working - see [#240](https://github.com/chocolatey/choco/issues/240) * Fix - Generate-BinFile / Remove-BinFile - see [#230](https://github.com/chocolatey/choco/issues/230) * Fix - cpack should only include files from nuspec - see [#232](https://github.com/chocolatey/choco/issues/232) @@ -819,7 +819,6 @@ Some really large fixes this release, especially removing all files that are ins * Fix - spelling error in "package has been upgradeed successfully" - see [#64](https://github.com/chocolatey/choco/issues/64) ### IMPROVEMENTS - * Api Key and Source matching could be more intuitive - see [#228](https://github.com/chocolatey/choco/issues/238) * Remove warning about allowGlobalConfirmation being enabled - see [#237](https://github.com/chocolatey/choco/issues/237) * Include log file path when saying 'See the log for details' - see [#187](https://github.com/chocolatey/choco/issues/187) @@ -828,20 +827,17 @@ Some really large fixes this release, especially removing all files that are ins * Remove the warning note about skipping, and instead show the warning when selecting skip - see [#183](https://github.com/chocolatey/choco/issues/183) * Do not print PowerShell install/update scripts by default - see [#182](https://github.com/chocolatey/choco/issues/182) -## [0.9.9.4](https://github.com/chocolatey/choco/issues?q=milestone%3A0.9.9.4+is%3Aclosed) (March 30, 2015) +## [0.9.9.4](https://github.com/chocolatey/choco/issues?q=milestone%3A0.9.9.4+is%3Aclosed) (March 30, 2015) ### BUG FIXES - * Fix - The term 'false' is not recognized as the name of a cmdlet - see [#215](https://github.com/chocolatey/choco/issues/215) ### IMPROVEMENTS - * Some packages use non-API variables like $installArguments - see [#207](https://github.com/chocolatey/choco/issues/207) -## [0.9.9.3](https://github.com/chocolatey/choco/issues?q=milestone%3A0.9.9.3+is%3Aclosed) (March 29, 2015) +## [0.9.9.3](https://github.com/chocolatey/choco/issues?q=milestone%3A0.9.9.3+is%3Aclosed) (March 29, 2015) ### BUG FIXES - * Fix - Install .NET Framework immediately during install - see [#168](https://github.com/chocolatey/choco/issues/168) * Fix - Do not error on Set-Acl during install/upgrade - see [#163](https://github.com/chocolatey/choco/issues/163) * Fix - Do not escape curly braces in powershell script - see [#208](https://github.com/chocolatey/choco/issues/208) @@ -850,30 +846,27 @@ Some really large fixes this release, especially removing all files that are ins * Fix - Uninstaller errors on short path to msiexec - see [#211](https://github.com/chocolatey/choco/issues/211) ### IMPROVEMENTS - * Some packages use non-API variables like $installArguments - see [#207](https://github.com/chocolatey/choco/issues/207) * Add Generate-BinFile to Helpers (widely used but never part of API) - see [#145](https://github.com/chocolatey/choco/issues/145) * Add Remove-BinFile to Helpers - see [#195](https://github.com/chocolatey/choco/issues/195) * Get-ChocolateyWebFile should create path if it doesn't exist - see [#167](https://github.com/chocolatey/choco/issues/167) -## [0.9.9.2](https://github.com/chocolatey/choco/issues?q=milestone%3A0.9.9.2+is%3Aclosed) (March 6, 2015) +## [0.9.9.2](https://github.com/chocolatey/choco/issues?q=milestone%3A0.9.9.2+is%3Aclosed) (March 6, 2015) ### BUG FIXES - * Fix - Allow passing install arguments again (regression in 0.9.9 series) - see [#150](https://github.com/chocolatey/choco/issues/150) * Fix - Allow apostrophes to be used as quotes - quoting style that worked with previous client - see [#141](https://github.com/chocolatey/choco/issues/141) * Fix - Shims write errors to stderr - see [#142](https://github.com/chocolatey/choco/issues/142) and [ShimGen #14](https://github.com/chocolatey/shimgen/issues/14) ### IMPROVEMENTS - * Upgrade `-r` should always return a value - see [#153](https://github.com/chocolatey/choco/issues/153) -## [0.9.9.1](https://github.com/chocolatey/choco/issues?q=milestone%3A0.9.9.1+is%3Aclosed) (March 3, 2015) +## [0.9.9.1](https://github.com/chocolatey/choco/issues?q=milestone%3A0.9.9.1+is%3Aclosed) (March 3, 2015) ### BUG FIXES - * Fix - Get-BinRoot broken - see [#144](https://github.com/chocolatey/choco/issues/144) + ## [0.9.9](https://github.com/chocolatey/choco/issues?q=milestone%3A0.9.9+is%3Aclosed) (March 3, 2015) This also includes issues that were being tracked in the old Chocolatey repository: [Chocolatey 0.9.9](https://github.com/chocolatey/chocolatey/issues?q=is%3Aclosed+label%3Av0.9.9). @@ -887,7 +880,6 @@ We also fixed and improved a bunch of things, so we feel the trade off is well w We'll try to capture everything here that you should know about. Please call `choco -?` or `choco.exe -h` to get started. ### KNOWN ISSUES - * [Known Issues](https://github.com/chocolatey/choco/labels/Bug) * TEMPORARY `install all` is missing - this is expected to be back in 0.9.10 - see [#23](https://github.com/chocolatey/choco/issues/23) * Alternative sources (`webpi`,`ruby`,`python`,`cygwin`, `windowsfeature`) do not work yet. This is expected to be fixed in 0.9.10 - see [#14](https://github.com/chocolatey/choco/issues/14) @@ -895,7 +887,6 @@ We'll try to capture everything here that you should know about. Please call `ch * See [Feature Parity](https://github.com/chocolatey/choco/labels/FeatureParity) for items not yet reimplemented from older PowerShell Chocolatey client (v0.9.8.32 and below). ### BREAKING CHANGES - * [Security] **Prompt for confirmation**: For security reasons, we now stop for confirmation before changing the state of the system on most commands. You can pass `-y` to confirm any prompts or set a value in the config that will globally confirm - see [#52](https://github.com/chocolatey/choco/issues/52) (**NOTE**: This is one of those additional switches we were talking about) * [Security] If your default installation is still at `c:\Chocolatey`, this version will force a move to ProgramData and update the environment settings - see [#7](https://github.com/chocolatey/choco/issues/7) * **Configuration Breaking Changes:** @@ -911,13 +902,12 @@ We'll try to capture everything here that you should know about. Please call `ch 1. Read the above about apikey changes 2. Read above about dependency resolution changes. * **Deprecated/Removed Commands:** - 1. `installmissing` has been removed. It was deprecated awhile ago, so this should not be a surprise. + 1. `installmissing` and 'cinstm' have been removed. They were deprecated awhile ago, so this should not be a surprise. For equivalent functionality see the plain install/cinst commands. 2. `choco version` has been deprecated and will be removed in v1. Use `choco upgrade pkgName --noop` or `choco upgrade pkgName -whatif` instead. 3. `Write-ChocolateySuccess`, `Write-ChocolateyFailure` have been deprecated. 4. `update` is now `upgrade`. `update` has been deprecated and will be removed/replaced in v1. Update will be reincarnated later for a different purpose. **Hint**: It rhymes with smackage pindexes. ### FEATURES - * In app documentation! Use `choco -?`, `choco -h` or `choco commandName -?` to learn about each command, complete with examples! * WhatIf/Noop mode for all commands (`--noop` can also be specified as `-whatif`) - see [Chocolatey #263](https://github.com/chocolatey/chocolatey/issues/263) and [Default Options and Switches](https://chocolatey.org/docs/commands-reference#how-to-pass-options-switches) * Performs like a package manager, expect to see queries failing because of unmet dependency issues. @@ -932,7 +922,6 @@ We'll try to capture everything here that you should know about. Please call `ch 1. `Install-ChocolateyShortcut` - see [Chocolatey #238](https://github.com/chocolatey/chocolatey/pull/238), [Chocolatey #235](https://github.com/chocolatey/chocolatey/issues/235) and [Chocolatey #218](https://github.com/chocolatey/chocolatey/issues/218) ### BUG FIXES - Probably a lot of bug fixes that may not make it here, but here are the ones we know about. * Fix - Cannot upgrade from prerelease to same version released - see [Chocolatey #122](https://github.com/chocolatey/chocolatey/issues/122) @@ -952,7 +941,6 @@ Probably a lot of bug fixes that may not make it here, but here are the ones we * Fix - Certain installs and updates fail with a "process with an Id of xxxx is not running" error - see [Chocolatey #603](https://github.com/chocolatey/chocolatey/issues/603) ### IMPROVEMENTS - * [Security] Allow keeping `c:\chocolatey` install directory with environment variable - see [#17](https://github.com/chocolatey/choco/issues/17) * [Security] Require switch on unofficial build - see [#36](https://github.com/chocolatey/choco/issues/36) * Install script updates - see [#7](https://github.com/chocolatey/choco/issues/7) @@ -975,82 +963,68 @@ Probably a lot of bug fixes that may not make it here, but here are the ones we * Shims now have gui (`--shimgen-gui`) and exit (`--shimgen-exit`) switches - see [ShimGen #13](https://github.com/chocolatey/shimgen/issues/13) and [ShimGen #12](https://github.com/chocolatey/shimgen/issues/12) * Dat help menu tho. I mean srsly guise - see [Chocolatey #641](https://github.com/chocolatey/chocolatey/issues/641) -## [0.9.8.33](https://github.com/chocolatey/chocolatey/issues?q=label%3Av0.9.8.33+is%3Aclosed) (Feb 11, 2015) - -FEATURES: +## [0.9.8.33](https://github.com/chocolatey/chocolatey/issues?q=label%3Av0.9.8.33+is%3Aclosed) (Feb 11, 2015) +### FEATURES * Dynamically export helpers (this fixes helpers that were not visible before) - [#628](https://github.com/chocolatey/chocolatey/pull/628) -IMPROVEMENTS: - +### IMPROVEMENTS * Accept `-y` as a parameter, Add warning about -y for 0.9.9. * Company name misspelled in shims - [#673](https://github.com/chocolatey/chocolatey/issues/673) and [shimgen #9](https://github.com/chocolatey/shimgen/issues/9) -## [0.9.8.32](https://github.com/chocolatey/chocolatey/issues?labels=v0.9.8.32&page=1&state=closed) (January 22, 2015) - -BUG FIXES: +## [0.9.8.32](https://github.com/chocolatey/chocolatey/issues?labels=v0.9.8.32&page=1&state=closed) (January 22, 2015) +### BUG FIXES * Fix - Chocolatey-Install should return non-zero exit code if chocolateyInstall.ps1 fails - [#568](https://github.com/chocolatey/chocolatey/issues/568) & [#658](https://github.com/chocolatey/chocolatey/pull/658) -## [0.9.8.31](https://github.com/chocolatey/chocolatey/issues?labels=v0.9.8.31&page=1&state=closed) (January 7, 2015) - -BUG FIXES: +## [0.9.8.31](https://github.com/chocolatey/chocolatey/issues?labels=v0.9.8.31&page=1&state=closed) (January 7, 2015) +### BUG FIXES * Fix - Shim doesn't always shift off the first argument - [#655](https://github.com/chocolatey/chocolatey/issues/655) & [ShimGen #7](https://github.com/chocolatey/shimgen/issues/7) * Fix - If executable isn't available, fallback to default icon - [#579](https://github.com/chocolatey/chocolatey/issues/579) -## [0.9.8.30](https://github.com/chocolatey/chocolatey/issues?labels=v0.9.8.30&page=1&state=closed) (January 6, 2015) - -FEATURES: +## [0.9.8.30](https://github.com/chocolatey/chocolatey/issues?labels=v0.9.8.30&page=1&state=closed) (January 6, 2015) +### FEATURES * Use icon of the executable with generated shim - [#579](https://github.com/chocolatey/chocolatey/issues/579) & [ShimGen #2](https://github.com/chocolatey/shimgen/issues/2) -BUG FIXES: - +### BUG FIXES * Fix - Shims don't correctly handle spaces in path to shim - [#654](https://github.com/chocolatey/chocolatey/issues/654) & [ShimGen #5](https://github.com/chocolatey/shimgen/issues/5) -## [0.9.8.29](https://github.com/chocolatey/chocolatey/issues?labels=v0.9.8.29&page=1&state=closed) (January 2, 2015) - -FEATURES: +## [0.9.8.29](https://github.com/chocolatey/chocolatey/issues?labels=v0.9.8.29&page=1&state=closed) (January 2, 2015) +### FEATURES * Use icon of the executable with generated shim - [#579](https://github.com/chocolatey/chocolatey/issues/579) & [ShimGen #2](https://github.com/chocolatey/shimgen/issues/2) * Allow setting custom temp download location - [#307](https://github.com/chocolatey/chocolatey/issues/307) -IMPROVEMENTS: - +### IMPROVEMENTS * Don't assume $env:TEMP or $env:UserProfile are set - [#647](https://github.com/chocolatey/chocolatey/issues/647) * Remove Kickstarter message. -## [0.9.8.28](https://github.com/chocolatey/chocolatey/issues?labels=v0.9.8.28&page=1&state=closed) (November 4, 2014) - -BREAKING CHANGES: +## [0.9.8.28](https://github.com/chocolatey/chocolatey/issues?labels=v0.9.8.28&page=1&state=closed) (November 4, 2014) +### BREAKING CHANGES * You may need to update your saved API key for chocolatey, due to [#599](https://github.com/chocolatey/chocolatey/issues/599) we have switched push to ensure https. -BUG FIXES: - +### BUG FIXES * Fix - Shim argument parsing needs fixed for quoting - [ShimGen #1](https://github.com/chocolatey/shimgen/issues/1) * Fix - Forcing x86 does not use 32bit checksum - [#535](https://github.com/chocolatey/chocolatey/issues/535) * Fix - Powershell v2 fails to download SSLv3 files - [#531](https://github.com/chocolatey/chocolatey/issues/531) * Fix - Get-ChocolateyUnzip fails due to Wait-Process exception - [#571](https://github.com/chocolatey/chocolatey/issues/571) -IMPROVEMENTS: - +### IMPROVEMENTS * Use default credentials for internet if available - [#577](https://github.com/chocolatey/chocolatey/issues/577) * Add moderation message on push - [#600](https://github.com/chocolatey/chocolatey/issues/600) * Restrict all calls to chocolatey.org to HTTPS - [#599](https://github.com/chocolatey/chocolatey/issues/599) * Batch fallback should quote path for spaces - [#558](https://github.com/chocolatey/chocolatey/issues/558) ## [0.9.8.27](https://github.com/chocolatey/chocolatey/issues?labels=v0.9.8.27&page=1&state=closed) (July 13, 2014) - -BUG FIXES: - +### BUG FIXES * Fix - Posh v3+ Ignores -Wait when run from cmd.exe - [#516](https://github.com/chocolatey/chocolatey/pull/516) -## [0.9.8.26](https://github.com/chocolatey/chocolatey/issues?labels=v0.9.8.26&page=1&state=closed) (July 12, 2014) - -BUG FIXES: +## [0.9.8.26](https://github.com/chocolatey/chocolatey/issues?labels=v0.9.8.26&page=1&state=closed) (July 12, 2014) +### BUG FIXES * Fix - Allow spaces in arguments to chocolatey again - Regenerate chocolatey included shims to take advantage of shimgen fixes - [#507](https://github.com/chocolatey/chocolatey/issues/507) * Fix - Default path has changed, causing running without closing shell to have issues again - [#510](https://github.com/chocolatey/chocolatey/issues/510) * Fix - Working directory of shimgen generated files points to path target executable is in (GUI apps only) - [#508](https://github.com/chocolatey/chocolatey/issues/508) @@ -1058,27 +1032,23 @@ BUG FIXES: * Fix - Install error throws another error due to true instead of $true - [#514](https://github.com/chocolatey/chocolatey/pull/514) * Fix - Posh v3+ Ignores -Wait when run from cmd.exe - [#516](https://github.com/chocolatey/chocolatey/pull/516) -IMPROVEMENTS: - +### IMPROVEMENTS * Allow to pass shimgen specific parameters - [#509](https://github.com/chocolatey/chocolatey/issues/509) * Issue warning if user is not running an elevated shell - [#519](https://github.com/chocolatey/chocolatey/issues/519) -## [0.9.8.25](https://github.com/chocolatey/chocolatey/issues?labels=v0.9.8.25&page=1&state=closed) (July 7, 2014) - -BUG FIXES: +## [0.9.8.25](https://github.com/chocolatey/chocolatey/issues?labels=v0.9.8.25&page=1&state=closed) (July 7, 2014) +### BUG FIXES * Fix - Shims that require admin may fail on UAC enforced machines (System.ComponentModel.Win32Exception: The requested operation requires elevation) - [#505](https://github.com/chocolatey/chocolatey/issues/505) * Fix - Do not check content-length if there isn't a content-length returned from Get-WebHeaders - [#504](https://github.com/chocolatey/chocolatey/issues/504) -## [0.9.8.24](https://github.com/chocolatey/chocolatey/issues?labels=v0.9.8.24&page=1&state=closed) (July 3, 2014) - -BREAKING CHANGES: +## [0.9.8.24](https://github.com/chocolatey/chocolatey/issues?labels=v0.9.8.24&page=1&state=closed) (July 3, 2014) +### BREAKING CHANGES * Enhancement - Default install to C:\ProgramData\chocolatey - [#452](https://github.com/chocolatey/chocolatey/issues/452) & [#494](https://github.com/chocolatey/chocolatey/issues/494) * Don't allow $binroot to be set to c:\ - [#434](https://github.com/chocolatey/chocolatey/issues/434) - this is meant to be temporary while other pieces are fixed. -FEATURES: - +### FEATURES * Checksum downloaded files - [#427](https://github.com/chocolatey/chocolatey/issues/427) * Replace Batch Redirector with Shims - [#372](https://github.com/chocolatey/chocolatey/issues/372) * New Helper - Get-UACEnabled - [#451](https://github.com/chocolatey/chocolatey/issues/451) @@ -1088,8 +1058,7 @@ FEATURES: * `-quiet` parameter that silences almost all output / allow shutting off real write-host - [#416](https://github.com/chocolatey/chocolatey/pull/416) & [#411](https://github.com/chocolatey/chocolatey/issues/411) * New Helpers - Test-ProcessAdminRights, Get-EnvironmentVariableNames, Get-EnvironmentVariable, Set-EnvironmentVariable - [#486](https://github.com/chocolatey/chocolatey/pull/486) -BUG FIXES: - +### BUG FIXES * Fix - Cannot bind argument to parameter 'Path' because it is an empty string - [#371](https://github.com/chocolatey/chocolatey/issues/371) * Fix - clist -source webpi doesn't prompt for admin access - [#293](https://github.com/chocolatey/chocolatey/issues/293) * Fix - Get-ChocolateyUnzip silently fails due to incorrect usage of System32 (File System Redirector Issues) - [#476](https://github.com/chocolatey/chocolatey/pull/476) & [#455](https://github.com/chocolatey/chocolatey/issues/455) @@ -1104,8 +1073,7 @@ BUG FIXES: * Fix - Resolve issue with DISM "missing" or with the 32-bit DISM being called on a 64-bit system - [#393](https://github.com/chocolatey/chocolatey/pull/393) * Fix - Do NOT throw if missing a chocolateyuninstall.ps1 - [#499](https://github.com/chocolatey/chocolatey/issues/499) -IMPROVEMENTS: - +### IMPROVEMENTS * Do not download if file already cached - [#428](https://github.com/chocolatey/chocolatey/issues/428) & [#109](https://github.com/chocolatey/chocolatey/pull/109) * If *.ignore file failes to create, do not fail the process - [#380](https://github.com/chocolatey/chocolatey/issues/380) * Validate downloaded file is the right size - [#429](https://github.com/chocolatey/chocolatey/issues/429) @@ -1123,39 +1091,31 @@ IMPROVEMENTS: * Simplify Chocolatey-Update - [#493](https://github.com/chocolatey/chocolatey/issues/493) * Update to Nuget.exe 2.8.2 - [#379](https://github.com/chocolatey/chocolatey/issues/379) -## [0.9.8.23](https://github.com/chocolatey/chocolatey/issues?labels=v0.9.8.23&page=1&state=closed) (November 11, 2013) - -BUG FIXES: +## [0.9.8.23](https://github.com/chocolatey/chocolatey/issues?labels=v0.9.8.23&page=1&state=closed) (November 11, 2013) +### BUG FIXES * Fix - Chocolatey 0.9.8.22 incorrectly reports version as alpha1 [#368](https://github.com/chocolatey/chocolatey/issues/368) * Fix - Some chocolatey commands with no arguments error [#369](https://github.com/chocolatey/chocolatey/issues/369) ## [0.9.8.22](https://github.com/chocolatey/chocolatey/issues?labels=v0.9.8.22&page=1&state=closed) (November 10, 2013) - -BREAKING CHANGES: - +### BREAKING CHANGES * To use spaces and quotes, one should now use single quotation marks. It works best in both powershell and cmd. -FEATURES: - +### FEATURES * Enhancement - Add switch to force x86 when packages have both versions - [#365](https://github.com/chocolatey/chocolatey/issues/365) * Enhancement - Allow passing parameters to packages - [#159](https://github.com/chocolatey/chocolatey/issues/159) -BUG FIXES: - +### BUG FIXES * Fix - Chocolatey 0.9.8.21 errors when using spaces or quotes with chocolatey or with batch redirect files. - [#367](https://github.com/chocolatey/chocolatey/issues/367) ## [0.9.8.21](https://github.com/chocolatey/chocolatey/issues?labels=v0.9.8.21&page=1&state=closed) (November 7, 2013) - -BREAKING CHANGES: - +### BREAKING CHANGES * Enhancement - For local package searching, use choco list -lo or choco search -lo. The execution speed is greatly increased. cver for local has been deprecated. - [#276](https://github.com/chocolatey/chocolatey/issues/276) * Breaking - Chocolatey default source no longer includes Nuget official feed. This will help improve response time and greatly increase relevant results. - [#349](https://github.com/chocolatey/chocolatey/issues/349) -FEATURES: - +### FEATURES * Enhancement - Support for Server Core - [#59](https://github.com/chocolatey/chocolatey/issues/59) * Enhancement - Add a switch for ignoring dependencies on install `-ignoredependencies` - [#131](https://github.com/chocolatey/chocolatey/issues/131) * Command - `choco` is now a default term @@ -1163,8 +1123,7 @@ FEATURES: * Function - `Get-ProcessorBits` - tells you whether a processor is x86 or x64. This functionality was in chocolatey already but has been globalized for easy access. - [#231](https://github.com/chocolatey/chocolatey/issues/231) & [#229](https://github.com/chocolatey/chocolatey/issues/229) * Function - `Get-BinRoot` - Gives package maintainers the ability to call one command that gets them the tools/bin root. This gives you the location where folks want certain packages installed. - [#359](https://github.com/chocolatey/chocolatey/pull/359) -IMPROVEMENTS: - +### IMPROVEMENTS * Enhancement - Install multiple packages by specifying them all on the same line - [#191](https://github.com/chocolatey/chocolatey/issues/191) * Enhancement - Install .NET Framework 4.0 requirement if not already installed - [#255](https://github.com/chocolatey/chocolatey/issues/255) * Enhancement - Refresh command line PATH after installs - partial to [#134](https://github.com/chocolatey/chocolatey/issues/134) - Previously we were just doing it in chocolatey with [#158](https://github.com/chocolatey/chocolatey/issues/158) @@ -1177,8 +1136,7 @@ IMPROVEMENTS: * Enhancement - Pass through exit codes from binned batch files - https://github.com/chocolatey/chocolatey/issues/360 * Enhancement - Support MSU file type - https://github.com/chocolatey/chocolatey/pull/348 -BUG FIXES: - +### BUG FIXES * Fix - Treat installation failures appropriately - [#10](https://github.com/chocolatey/chocolatey/issues/10) * Fix - Using newer versions of nuget breaks chocolatey - [#303](https://github.com/chocolatey/chocolatey/issues/303) * Fix - Chocolatey incorrectly reports 64 bit urls when downloading anything - [#331](https://github.com/chocolatey/chocolatey/issues/331) @@ -1191,9 +1149,7 @@ BUG FIXES: ## [0.9.8.20](https://github.com/chocolatey/chocolatey/issues?labels=v0.9.8.20&page=1&state=closed) (December 11, 2012) - -FEATURES: - +### FEATURES * Command - Windows Feature feed - [#150](https://github.com/chocolatey/chocolatey/pull/150) * Function - Add function to install environment variables - [#149](https://github.com/chocolatey/chocolatey/pull/149) * Function - Function to associate file extensions with installed executables - [#146](https://github.com/chocolatey/chocolatey/pull/146) @@ -1202,8 +1158,7 @@ FEATURES: * Command - Sources command - [#138](https://github.com/chocolatey/chocolatey/pull/138) * Command - Provide a way to list all the installed packages - [#125](https://github.com/chocolatey/chocolatey/issues/125) -IMPROVEMENTS: - +### IMPROVEMENTS * Enhancement - Added FTP support for the chocolatey file downloader. - [#137](https://github.com/chocolatey/chocolatey/pull/137) * Enhancement - Block installer exe from being "bin"-ed - [#174](https://github.com/chocolatey/chocolatey/issues/174) * Enhancement - Making the unzip process silent - [#180](https://github.com/chocolatey/chocolatey/pull/180) @@ -1217,38 +1172,32 @@ IMPROVEMENTS: * Enhancement - Chocolatey-Version Remote Check - [#119](https://github.com/chocolatey/chocolatey/pull/119) * Enhancement - Write every unzip path/file to a text file - [#114](https://github.com/chocolatey/chocolatey/pull/114) -BUG FIXES: - +### BUG FIXES * Fix - "Execution of NuGet not detected" error. - [#151](https://github.com/chocolatey/chocolatey/pull/151) * Fix - chocolatey.bat can't find chocolatey.cmd - [#152](https://github.com/chocolatey/chocolatey/issues/152) * Fix - `chocolatey version all` prints only the last package's information - [#183](https://github.com/chocolatey/chocolatey/pull/183) * Fix - Issue with $processor.addresswidth var - [#121](https://github.com/chocolatey/chocolatey/pull/121) -## [0.9.8.19](https://github.com/chocolatey/chocolatey/issues?labels=v0.9.8.19&page=1&state=closed) (July 2, 2012) - -FEATURES: +## [0.9.8.19](https://github.com/chocolatey/chocolatey/issues?labels=v0.9.8.19&page=1&state=closed) (July 2, 2012) +### FEATURES * Enhancement - Allow community extensions - [#115](https://github.com/chocolatey/chocolatey/issues/115) -BUG FIXES: - +### BUG FIXES * Fix - PowerShell v3 doesn't like foreach loop (prefers ForEach-Object) - [#116](https://github.com/chocolatey/chocolatey/pull/116) * Fix - Cannot install Python packages on Windows 8 - [#117](https://github.com/chocolatey/chocolatey/issues/117) -## [0.9.8.18](https://github.com/chocolatey/chocolatey/issues?labels=v0.9.8.18&sort=created&direction=desc&state=closed&page=1) (June 16, 2012) - -BUG FIXES: +## [0.9.8.18](https://github.com/chocolatey/chocolatey/issues?labels=v0.9.8.18&sort=created&direction=desc&state=closed&page=1) (June 16, 2012) +### BUG FIXES * Fix - 0.9.8.17 installer doesn't create chocolatey folder if it doesn't exist - [#112](https://github.com/chocolatey/chocolatey/issues/112) -## [0.9.8.17](https://github.com/chocolatey/chocolatey/issues?labels=v0.9.8.17&sort=created&direction=desc&state=closed&page=1) (June 15, 2012) - -FEATURES: +## [0.9.8.17](https://github.com/chocolatey/chocolatey/issues?labels=v0.9.8.17&sort=created&direction=desc&state=closed&page=1) (June 15, 2012) +### FEATURES * Enhancement - Support for naive uninstall - [#96](https://github.com/chocolatey/chocolatey/issues/96) -IMPROVEMENTS: - +### IMPROVEMENTS * Enhancement - Sources specified through config (or nuget.config) - [#101](https://github.com/chocolatey/chocolatey/pull/101) * Enhancement - Chocolatey should support multiple sources - [#82](https://github.com/chocolatey/chocolatey/issues/82) * Enhancement - Use Cygwin as a package source - [#93](https://github.com/chocolatey/chocolatey/pull/93) @@ -1260,8 +1209,7 @@ IMPROVEMENTS: * Enhancement - Add a -debug switch - [#85](https://github.com/chocolatey/chocolatey/issues/85) * Enhancement - Improve pipelining of cver by returning an object - [#94](https://github.com/chocolatey/chocolatey/pull/94) -BUG FIXES: - +### BUG FIXES * Fix - Packages.config source now uses chocolatey/nuget sources by default instead of empty - [#79](https://github.com/chocolatey/chocolatey/issues/79) * Fix - Executable batch links not created for "prerelease" versions - [#88](https://github.com/chocolatey/chocolatey/issues/88) * Fix - Issue where latest version is not returned - [#92](https://github.com/chocolatey/chocolatey/pull/92) @@ -1269,61 +1217,52 @@ BUG FIXES: * Fix - During install PowerShell session gets bad $env:ChocolateyInstall variable - [#80](https://github.com/chocolatey/chocolatey/issues/80) * Fix - Build path with spaces now works - [#102](https://github.com/chocolatey/chocolatey/pull/102) -## 0.9.8.16 (February 27, 2012) - -BUG FIXES: +## [0.9.8.16](https://github.com/chocolatey/chocolatey/issues?labels=v0.9.8.16&sort=created&direction=desc&state=closed&page=1) (February 27, 2012) +### BUG FIXES * Small fix to installer for upgrade issues from 0.9.8.15 -## [0.9.8.15](https://github.com/chocolatey/chocolatey/issues?labels=v0.9.8.15&sort=created&direction=desc&state=closed&page=1) (February 27, 2012) - -**BREAKING CHANGES:** +## [0.9.8.15](https://github.com/chocolatey/chocolatey/issues?labels=v0.9.8.15&sort=created&direction=desc&state=closed&page=1) (February 27, 2012) +### BREAKING CHANGES * Enhancement - Chocolatey's default folder is now C:\Chocolatey (and no longer C:\NuGet) - [#58](https://github.com/chocolatey/chocolatey/issues/58) * Enhancement - Use -force to reinstall existing packages - [#45](https://github.com/chocolatey/chocolatey/issues/45) -FEATURES: - +### FEATURES * Enhancement - Install now supports **all** with a custom package source to install every package from a source! - [#46](https://github.com/chocolatey/chocolatey/issues/46) -IMPROVEMENTS: - +### IMPROVEMENTS * Enhancement - Support Prerelease flag for Install - [#71](https://github.com/chocolatey/chocolatey/issues/71) * Enhancement - Support Prerelease flag for Update/Version - [#72](https://github.com/chocolatey/chocolatey/issues/72) * Enhancement - Support Prerelease flag in List - [#74](https://github.com/chocolatey/chocolatey/issues/74) -BUG FIXES: - +### BUG FIXES * Fix - Parsing the wrong version when trying to update - [#73](https://github.com/chocolatey/chocolatey/issues/73) -## [0.9.8.14](https://github.com/chocolatey/chocolatey/issues?labels=v0.9.8.14&sort=created&direction=desc&state=closed&page=1) (February 6, 2012) - -IMPROVEMENTS: +## [0.9.8.14](https://github.com/chocolatey/chocolatey/issues?labels=v0.9.8.14&sort=created&direction=desc&state=closed&page=1) (February 6, 2012) +### IMPROVEMENTS * Enhancement - Pass ValidExitCodes to Install Helpers - [#54](https://github.com/chocolatey/chocolatey/issues/54) * Enhancement - Add 64-bit url to Install-ChocolateyZipPackage - [#48](https://github.com/chocolatey/chocolatey/issues/48) * Enhancement - Add 64-bit url to Install-ChocolateyPowershellCommand - [#57](https://github.com/chocolatey/chocolatey/issues/57) * Enhancement - Make the main helpers work with files not coming over HTTP - [#51](https://github.com/chocolatey/chocolatey/issues/51) * Enhancement - Upgrade NuGet.exe to 1.6.0 to take advantage of prerelease packaging - [#64](https://github.com/chocolatey/chocolatey/issues/64) -BUG FIXES: - +### BUG FIXES * Fix - The packages.config feature has broken naming packages with '.config' - [#56](https://github.com/chocolatey/chocolatey/issues/56) * Fix - CList includes all versions without adding the switch - [#60](https://github.com/chocolatey/chocolatey/issues/60) * Fix - When NuGet.exe failes to run due to .NET Framework 4.0 not installed, chocolatey should report that. - [#65](https://github.com/chocolatey/chocolatey/issues/65) -## [0.9.8.13](https://github.com/chocolatey/chocolatey/issues?labels=0.9.8.13&sort=created&direction=desc&state=closed&page=1) (January 8, 2012) - -FEATURES: +## [0.9.8.13](https://github.com/chocolatey/chocolatey/issues?labels=0.9.8.13&sort=created&direction=desc&state=closed&page=1) (January 8, 2012) +### FEATURES * New Command! Enhancement - Integration with Ruby Gems (`cgem packageName` or `cinst packageName -source ruby`) - [#29](https://github.com/chocolatey/chocolatey/issues/29) * New Command! Enhancement - Integration with Web PI (`cwebpi packageName` or `cinst packageName -source webpi`) - [#28](https://github.com/chocolatey/chocolatey/issues/28) * Enhancement - Call chocolatey install with packages.config file (thanks AnthonyMastrean!) - [#31](https://github.com/chocolatey/chocolatey/issues/31) and [#43](https://github.com/chocolatey/chocolatey/pull/43) and [#50](https://github.com/chocolatey/chocolatey/issues/50) * New Command! Enhancement - Chocolatey Push (`chocolatey push packageName.nupkg` or `cpush packageName.nupkg`) - [#36](https://github.com/chocolatey/chocolatey/issues/36) * New Command! Enhancement - Chocolatey Pack (`chocolatey pack [packageName.nuspec]` or `cpack [packageName.nuspec]`) - [#35](https://github.com/chocolatey/chocolatey/issues/35) -IMPROVEMENTS: - +### IMPROVEMENTS * Enhancement - @datachomp feature - Override Installer Arguments `chocolatey install packageName -installArgs "args to override" -override` or `cinst packageName -ia "args to override" -o`) - [#40](https://github.com/chocolatey/chocolatey/issues/40) * Enhancement - @datachomp feature - Append Installer Arguments (`chocolatey install packageName -installArgs "args to append"` or `cinst packageName -ia "args to append"`) - [#39](https://github.com/chocolatey/chocolatey/issues/39) * Enhancement - Run installer in not silent mode (`chocolatey install packageName -notSilent` or `cinst packageName -notSilent`) - [#42](https://github.com/chocolatey/chocolatey/issues/42) @@ -1331,222 +1270,186 @@ IMPROVEMENTS: * Enhancement - List command should allow the All or AllVersions switch - [#38](https://github.com/chocolatey/chocolatey/issues/38) * Enhancement - Any install will create the ChocolateyInstall environment variable so that installers can take advantage of it - [#30](https://github.com/chocolatey/chocolatey/issues/30) -BUG FIXES: - +### BUG FIXES * Fixing an issue on proxy display message (Thanks jasonmueller!) - [#44](https://github.com/chocolatey/chocolatey/pull/44) * Fixing the source path to allow for spaces (where chocolatey is installed) - [#33](https://github.com/chocolatey/chocolatey/issues/33) * Fixing the culture to InvariantCulture to eliminate the turkish "I" issue - [#22](https://github.com/chocolatey/chocolatey/issues/22) -## 0.9.8.12 (November 20, 2011) - -IMPROVEMENTS: +## 0.9.8.12 (November 20, 2011) +### IMPROVEMENTS * Enhancement - Reducing the number of window pop ups - [#25](https://github.com/chocolatey/chocolatey/issues/25) -BUG FIXES: - +### BUG FIXES * Fixed an issue with write-host and write-error overrides that happens in the next version of powershell - [#24](https://github.com/chocolatey/chocolatey/pull/24) * Fixing an issue that happens when powershell is not on the path - [#23](https://github.com/chocolatey/chocolatey/issues/23) * Fixing the replacement of capital ".EXE" in addition to lowercase ".exe" when creating batch redirects - [#26](https://github.com/chocolatey/chocolatey/issues/26) -## 0.9.8.11 (October 4, 2011) - -BUG FIXES: +## 0.9.8.11 (October 4, 2011) +### BUG FIXES * Fixing an update issue if the package only exists on chocolatey.org - [#16](https://github.com/chocolatey/chocolatey/issues/16) * Fixing an issue with install missing if the package never existed - [#13](https://github.com/chocolatey/chocolatey/issues/13) -## 0.9.8.10 (September 17, 2011) - -FEATURES: +## 0.9.8.10 (September 17, 2011) +### FEATURES * New Helper! Install-ChocolateyPowershellCommand - install a powershell script as a command - [#11](https://github.com/chocolatey/chocolatey/issues/11) -## 0.9.8.9 (September 10, 2011) - -BUG FIXES: +## 0.9.8.9 (September 10, 2011) +### BUG FIXES * Reinstalls an existing package if -version is passed (first surfaced in 0.9.8.7 w/NuGet 1.5) - [#9](https://github.com/chocolatey/chocolatey/issues/9) -## 0.9.8.8 (September 10, 2011) - -BUG FIXES: +## 0.9.8.8 (September 10, 2011) +### BUG FIXES * Fixing version comparison - [#4](https://github.com/chocolatey/chocolatey/issues/4) * Fixed package selector to not select like named packages (i.e. ruby.devkit when getting information about ruby) - [#3](https://github.com/chocolatey/chocolatey/issues/3) -## 0.9.8.7 (September 2, 2011) - -IMPROVEMENTS: +## 0.9.8.7 (September 2, 2011) +### IMPROVEMENTS * Added proxy support based on [#1](https://github.com/chocolatey/chocolatey/issues/1) * Updated to work with NuGet 1.5 - [#2](https://github.com/chocolatey/chocolatey/issues/2) -## 0.9.8.6 (July 27, 2011) - -BUG FIXES: +## 0.9.8.6 (July 27, 2011) +### BUG FIXES * Fixed a bug introduced in 0.9.8.5 - Start-ChocolateyProcessAsAdmin erroring out when setting machine path as a result of trying to log the message. -## 0.9.8.5 (July 27, 2011) - -IMPROVEMENTS: +## 0.9.8.5 (July 27, 2011) +### IMPROVEMENTS * Improving Run-ChocolateyProcessAsAdmin to allow for running entire functions as administrator by importing helpers to that command if using PowerShell. * Updating some of the notes. -BUG FIXES: - +### BUG FIXES * Fixed bug in installer when User Environment Path is null. -## 0.9.8.4 (July 27, 2011) - -BUG FIXES: +## 0.9.8.4 (July 27, 2011) +### BUG FIXES * Fixed a small issue with the Install-ChocolateyDesktopLink -## 0.9.8.3 (July 7, 2011) - -**BREAKING CHANGES:** +## 0.9.8.3 (July 7, 2011) +### BREAKING CHANGES * Chocolatey no longer runs the entire powershell script as an administrator. With the addition of the Start-ChocolateyProcessAsAdmin, this is how you will get to administrative tasks outside of the helpers. -FEATURES: - +### FEATURES * New chocolatey command! InstallMissing allows you to install a package only if it is not already installed. Shortcut is 'cinstm'. * New Helper! Install-ChocolateyPath - give it a path for out of band items that are not imported to path with chocolatey * New Helper! Start-ChocolateyProcessAsAdmin - this allows you to run processes as administrator * New Helper! Install-ChocolateyDesktopLink - put shortcuts on the desktop -IMPROVEMENTS: - +### IMPROVEMENTS * NuGet updated to v1.4 * Much of the error handling is improved. There are two new Helpers to call (ChocolateySuccess and Write-ChocolateyFailure). * Chocolatey no longer needs administrative rights to install itself. -## 0.9.8.2 (May 21, 2011) - -FEATURES: +## 0.9.8.2 (May 21, 2011) +### FEATURES * You now have the option of a custom installation folder. Thanks Jason Jarrett! -## 0.9.8.1 (May 18, 2011) - -BUG FIXES: +## 0.9.8.1 (May 18, 2011) +### BUG FIXES * General fix to bad character in file. Fixed selection for update as well. -## 0.9.8 (May 4, 2011) - -**BREAKING CHANGES:** +## 0.9.8 (May 4, 2011) +### BREAKING CHANGES * A dependency will not reinstall once it has been installed. To have it reinstall, you can install it directly (or delete it from the repository and run the core package). -IMPROVEMENTS: - +### IMPROVEMENTS * Shortcuts have been added: 'cup' for 'chocolatey update', 'cver' for 'chocolatey version', and 'clist' for 'chocolatey list'. * Update only runs if newer version detected. * Calling update with no arguments will update chocolatey. * Calling update with all will update your entire chocolatey repository. -## 0.9.7.3 (April 30, 2011) - -BUG FIXES: +## 0.9.7.3 (April 30, 2011) +### BUG FIXES * Fixing Install-ChocolateyZipPackage so that it works again. -## 0.9.7.2 (April 29, 2011) - -BUG FIXES: +## 0.9.7.2 (April 29, 2011) +### BUG FIXES * Fixing an underlying issue with not having silent arguments for exe files. -## 0.9.7.1 (April 29, 2011) - -BUG FIXES: +## 0.9.7.1 (April 29, 2011) +### BUG FIXES * Fixing an introduced bug where the downloader didn't get the file name passed to it. -## 0.9.7 (April 29, 2011) - -FEATURES: +## 0.9.7 (April 29, 2011) +### FEATURES * New helper added Install-ChocolateyInstallPackage - this was previously part of the download & install and has been broken out. * New chocolatey command! Version allows you to see if a package you have installed is the most up to date. Leave out package and it will check for chocolatey itself. -IMPROVEMENTS: - +### IMPROVEMENTS * The powershell module is automatically loaded, so packages no longer need to import the module. This means one line chocolateyInstall.ps1 files! * Error handling is improved. * Silent installer override for msi has been removed to allow for additional arguments that need to be passed. -## 0.9.6.4 (April 26, 2011) - -IMPROVEMENTS: +## 0.9.6.4 (April 26, 2011) +### IMPROVEMENTS * Remove powershell execution timeout. -## 0.9.6.3 (April 25, 2011) - -FEATURES: +## 0.9.6.3 (April 25, 2011) +### FEATURES * New Helper added Install-ChocolateyZipPackage - this wraps the two upper commands into one smaller command and addresses the file name bug. -## 0.9.6.2 (April 25, 2011) - -BUG FIXES: +## 0.9.6.2 (April 25, 2011) +### BUG FIXES * Addressed a small bug in getting back the file name from the helper. -## 0.9.6.1 (April 23, 2011) - -IMPROVEMENTS: +## 0.9.6.1 (April 23, 2011) +### IMPROVEMENTS * Adding in ability to find a dependency when the version doesn't exist. -## 0.9.6 (April 23, 2011) - -IMPROVEMENTS: +## 0.9.6 (April 23, 2011) +### IMPROVEMENTS * Can execute powershell and chocolatey without having to change execution rights to powershell system wide. -FEATURES: - +### FEATURES * New Helper added - Get-ChocolateyWebFile - downloads a file from a url and gives you back the location of the file once complete. * New Helper added - Get-ChocolateyZipContents - unzips a file to a directory of your choosing. -## 0.9.5 (April 21, 2011) - -FEATURES: +## 0.9.5 (April 21, 2011) +### FEATURES * Helper for native installer added (Install-ChocolateyPackage). Reduces the amount of powershell necessary to download and install a native package to two lines from over 25. -IMPROVEMENTS: - +### IMPROVEMENTS * Helper outputs progress during download. * Dependency runner is complete. -## 0.9.4 (April 10, 2011) - -IMPROVEMENTS: +## 0.9.4 (April 10, 2011) +### IMPROVEMENTS * List command has a filter. * Package license acceptance terms notated. -## 0.9.3 (April 4, 2011) - -IMPROVEMENTS: +## 0.9.3 (April 4, 2011) +### IMPROVEMENTS * You can now pass -source and -version to install command. -## 0.9.2 (April 4, 2011) - -FEATURES: +## 0.9.2 (April 4, 2011) +### FEATURES * List command added. -## 0.9.1 (March 30, 2011) - -IMPROVEMENTS: +## 0.9.1 (March 30, 2011) +### IMPROVEMENTS * Shortcut for 'chocolatey install' - 'cinst' now available. diff --git a/CHANGELOG_LICENSED.md b/CHANGELOG_LICENSED.md index fb03cde93c..eb6a2a4bee 100644 --- a/CHANGELOG_LICENSED.md +++ b/CHANGELOG_LICENSED.md @@ -4,15 +4,158 @@ This covers changes for the "chocolatey.extension" package, where the licensed e **NOTE**: If you have a licensed edition of Chocolatey, refer to this in tandem with [Chocolatey Open source CHANGELOG](https://github.com/chocolatey/choco/blob/master/CHANGELOG.md). -## 1.12.2 (August 31, 2017) +## 1.12.12 (June 12, 2018) +### FEATURES + * Package Upload UI - Ability to right click on a nupkg, and access UI for selecting where package is pushed to + +### BUG FIXES + * Package Synchronizer (Choco Sync): + * Fix - Do not sync out packages that were Chocolatey-managed packages + * Windows Service Management Functions: + * Fix - Adding domain user to Administrators fails with "A member could not be added to or removed from the local group because the member does not exist" + * Fix - Expired Chocolatey License causes error on package installations + * Fix - Incorrectly setting UserAgent property + * Package Internalizer (Choco Download): + * Fix - Append Original Location not capturing params when on last line + * Fix - Output directory option does not remove surrounding quotes + * Fix - Incorrect version number is used to generate dependent packages when `--version` is passed to internalizer + * Package Builder UI: + * Fix - Generate button is not enabled for MSP License + +### IMPROVEMENTS + * Countdown - Allow turning off warnings with a feature + * Self-Service / Background Mode: + * Do not show ChocolateyLocalAdmin user on logon screen + * Ensure captured password at runtime makes it to the background service + * Add Package Internalizer (download) to available commands + +## 1.12.11 (February 1, 2018) +**NOTE**: We've identified an issue with Self-Service interactive and UAC - we are working on a fix. Please see [#36](https://github.com/chocolatey/chocolatey-licensed-issues/issues/36) and subscribe for details. + +A few nice things going into this release with Package Reducer/Optimize coming out of preview, Package Internalizer allowing you to specify variable overrides + +### BREAKING CHANGES + * Package Reducer is now on by default + +When we first released package reducer, it was in a preview mode to allow for folks to opt in to test it and find issues. Now we are turning it on by default. If you should experience issues with it, please contact support to file an issue (provide a zipped log as well). To turn it off should you not want to use it, you can just run `choco feature disable --name=reduceInstalledPackageSpaceUsage`. + +### BUG FIXES + * Self-Service / Background Mode: + * Fix - Work with empty sessions. Self-service users were incorrectly bypassing background service when their active session doesn't have a name, which has become common with Windows 10. + * Fix - Allow self-service to work when the current working directory is different from system drive or a mapped drive. Also allow it to be set to locations where any user would not have a permissions error. + * Package Internalizer (Choco Download): + * Fix - When a variable is set to the contents of a file, work with that appropriately. A good example of this is `$data` variable in [dotnetcore-runtime](https://github.com/dotnetcore-chocolatey/dotnetcore-chocolateypackages/blob/d5960c11dda388cc7f7ab6438eee8984774f7662/dotnetcore-runtime.install/tools/ChocolateyInstall.ps1#L4) package. + * Fix - Allow setting variable when there is a comment on the same line following the set. An example of this is in the [Firefox](https://github.com/chocolatey/chocolatey-coreteampackages/blob/91f4e51f5c8503ca962c22a2f087b96d22ae0e9f/automatic/firefox/tools/chocolateyInstall.ps1#L26) package. + * Package Builder (Choco New): + * Fix - Package Builder UI should recognize Architect and MSP editions and correctly set the UI for use with them. + * Fix - Extract icon from the proper location for the file. + +### IMPROVEMENTS + * Package Internalizer (Choco Download): + * Override variables in the installation script. When you see something like `$locale` being set and you want to override it to your own value for internalization, you can pass that variable name and value as a key value pair. As an example, try `choco download thunderbird --internalize locale=en-US` versus `choco download thunderbird --internalize locale=es-ES`. + * Package Reducer - `choco optimize` command out of preview. + * Package Builder (Choco New): + * Extract icons from MSIs as well. + * Package Builder UI logo animzation should match chocolatey website. + + +## 1.12.10 (December 18, 2017) ### FEATURES + * Run background service interactively - sometimes you install applications that are unattended but cannot be silent. + +If you want self-service to interactively manage installations, run `choco feature enable --name=useBackgroundServiceInteractively`. This requires that you use the `ChocolateyLocalAdmin` account with the Chocolatey-managed password as passwords are not stored and the service would need to produce that at runtime. There are some security considerations and why this is not turned on by default. Please see [interactive self-service consideration](https://chocolatey.org/docs/features-agent-service#interactive-self-service-consideration). + +### BUG FIXES + * Windows Service Management Functions: + * Fix - Adding user to Administrators no longer fails with "Network path was not found" when there are domain users and local users in the administrators group. + * Package Builder (Choco New): + * Fix - Create packages from non-admin (instead of access denied error). + * Fix - Don't attempt to generate an icon unless a file for that icon exists. + +### IMPROVEMENTS + * Package Builder (Choco New): + * Right click create package w/out GUI should pause on error. This allows a user to see any errors instead of closing quickly. + * Do not generate template files if not using the default template. + + +## 1.12.9 (November 10, 2017) +### BUG FIXES + * Fix: Changes in 1.12.7 restrict some install/upgrade licensed functionality from loading. + * Windows Service Management Functions: + * Fix - Domain Users should be found by domain context. + * Fix - Throw Error if unable to ensure user or administrators membership. + * Fix - Domain Users should not attempt to generate password. + * Package Synchronizer (Choco Sync): + * Fix - syncing new items use "sync" as user name when capturing information for Package Audit. + * Package Builder (Choco New): + * Fix - additional directories from programs and features not cleared each time. + +### IMPROVEMENTS + * Package Builder (Choco New): + * Show Install Arguments in Nuspec with MSI Properties. + * Extract icon from Programs and Features. + * Extract icon from exe files. + + +## 1.12.8 (October 25, 2017) +### BUG FIXES + * Fix - "The registered delegate for type IEnumerable threw an exception. Unable to find suitable location for change.exe." + +## 1.12.7 (October 25, 2017) +### BUG FIXES + * Fix - "ERROR: The term 'Invoke-ChocolateyProcessCmdlet' is not recognized as the name of a cmdlet, function, script file, or operable program" on upgrade all. + + +## 1.12.6 (October 24, 2017) +### BUG FIXES + * Fix - `change.exe` could not be found when running Chocolatey GUI over RDP (Terminal Services). + * Self-Service / Background Mode: + * Fix - Set USER_CONTEXT environment variable to contain the user context information. + +### IMPROVEMENTS + * `Install-ChocolateyInstallPackage` - pass in answer file (`-AnswerFile`) to provide to stdin. + + +## 1.12.5 (September 28, 2017) +### BUG FIXES + * Windows Service Management Functions: + * Fix - Do not save created user prior to setting complex password. + + +## 1.12.4 (September 27, 2017) +### BUG FIXES + * Self-Service / Background Mode: + * Fix - Ensure that it configures and works appropriately with Chocolatey API (and the Chocolatey GUI). + +### IMPROVEMENTS + * Self-Service / Background Mode: + * Allow commands to be configurable. Covered in more detail at https://chocolatey.org/docs/features-agent-service#setup. + + +## 1.12.3 (September 8, 2017) +### BUG FIXES + * [Security] Fix - Hide admin only repositories from non-administrators with all Chocolatey commands. + * Windows Service Management Functions: + * Fix - Empty username causes errors. Will now set to what the configuration of Chocolatey is determining. + * Package Internalizer (Choco Download): + * Fix - Pass multiple package names to download/internalize (`choco download pkg1 pkg2 pkgN`). + * Self-Service / Background Mode: + * Fix - Don't display background services messages when background mode is not configured. + * Package Reducer: + * Fix - Package reducer fails the install when there is no package information. + +### IMPROVEMENTS + * choco sync is now out of preview. + + +## 1.12.2 (August 31, 2017) +### FEATURES * [Security] choco source/list - Administrator only visible repositories. Hide repositories from non-administrators who are using Chocolatey (C4B). * choco pin - Provide a reason when pinning to be seen in outdated by others (C4B). ### BUG FIXES - * Package Synchronizer (Automatic Sync): * Fix - Ignore HKCU pkg on sync when different user instead of removing the package. * Package Builder (Choco New): @@ -22,7 +165,6 @@ This covers changes for the "chocolatey.extension" package, where the licensed e * Fix - Download CDN Cache - If original url was switch to TLS/SSL by choco, the cache check doesn't override for the file on the CDN. ### IMPROVEMENTS - * [Security] Runtime - Allow locking down all Chocolatey use to Administrators only (don't allow non-admins to run choco at all) - added as feature flip (see `choco feature list`). * Package Internalizer (Choco Download): * Pass multiple package names to download/internalize (`choco download pkg1 pkg2 pkgN`). @@ -31,7 +173,7 @@ This covers changes for the "chocolatey.extension" package, where the licensed e * Allow upgrading services without a restart - pass `-DoNotReinstallService` to `Install-ChocolateyWindowsService`. * Package Synchronizer (Choco Sync): * Specify package name when syncing by id (`--id="'Display Name*'" --package-id=package-id`). - * installation - Disable install of context menus with `--params "'/NoContextMenu'"`. Currently only new installs (removal on upgrade will come in a future release). + * Installation - Disable install of context menus with `--params "'/NoContextMenu'"`. Currently only new installs (removal on upgrade will come in a future release). * Package Builder (Choco New): * When an MSI has external files, ensure to copy those into the packaging as well. Requires same folder structure that would be used at install time successfully. * Package Reducer: @@ -39,11 +181,9 @@ This covers changes for the "chocolatey.extension" package, where the licensed e ## 1.12.1 (July 13, 2017) - Among the bug fixes, we've brought Package Internalizer to the MSP edition of Chocolatey. ### BUG FIXES - * Fix - Configuration item is not serialized, causing issues with installs with packages.config and ChocolateyGUI. * Package Synchronizer (Choco Sync): * Fix - syncing new items should capture audit information for Package Audit. @@ -53,14 +193,11 @@ Among the bug fixes, we've brought Package Internalizer to the MSP edition of Ch * Fix - do not configure background service unless it applies. ### IMPROVEMENTS - * Package Internalizer is now available for MSP edition as well. ## 1.12.0 (July 10, 2017) - ### FEATURES - * Package Reducer / Optimize (All licensed editions) - Reduce Space Usage for Chocolatey Installations If you have a significant number of Chocolatey packages you manage, you may notice that you also may have a pretty significant space usage under the Chocolatey lib directory. Package reducer automatically decreases the size of nupkg files to around 5KB and removes installers and zips automatically from your package install directories. This may allow you to save GBs of usage for a large amount of packages being managed. @@ -74,7 +211,6 @@ Among the bug fixes, we've brought Package Internalizer to the MSP edition of Ch To learn more about Package Audit, please see https://chocolatey.org/docs/features-package-audit. ### IMPROVEMENTS - * Package Internalizer (Choco Download): * Option (`--internalize-all-urls`) to internalize any url in a package (not just if the package scripts contain known-compatible known functions). * Self-Service / Background Mode: @@ -89,24 +225,19 @@ Among the bug fixes, we've brought Package Internalizer to the MSP edition of Ch ## 1.11.0 (June 27, 2017) - ### BUG FIXES - * Self-Service / Background Mode * Fix - Use a URI with WCF named pipes that doesn't exclusively hold a lock on the root (blocking other services). Fallback to old URI for versions of chocolatey-agent less than 0.7.0+. - see [#12](https://github.com/chocolatey/chocolatey-licensed-issues/issues/12). * Fix - Ensure chocolatey.lib can send arguments through and not just choco.exe. ### IMPROVEMENTS - * Package Synchronizer - update registry links when software updates ## 1.10.0 (June 9, 2017) - This release brings Package Throttle, Package Synchronizer's "Show All Packages in Programs and Features", and Direct Installer (aka Package-less Install) to Chocolatey. There are also numerous improvements to Package Builder, fixes and improvements to Package Internalizer and Self-Service. Package Throttle is in all licensed editions, allowing Pro, MSP, and C4B customers the ability to slow down Chocolatey as it downloads packages and any resources the packages are downloading. See more details each section below. ### BREAKING CHANGES - * [Security] Self-Service / Background Mode - support background mode with self-service sources only by default If you are using self-service functionality, when you upgrade to v1.10, you will need to go to those sources that you allow to be self-service and ensure they are selected to allow self-service (`choco source list`). Otherwise by default users are going to be locked out of using those sources. The move to opt-in is best from a security standpoint and we want to give you the ability to have folks opt-in to the better behavior. @@ -114,7 +245,6 @@ This release brings Package Throttle, Package Synchronizer's "Show All Packages To change this behavior back to the way it was previously, simply run `choco disable -n useBackgroundServiceWithSelfServiceSourcesOnly`. For more details see `choco feature list` or https://chocolatey.org/docs/chocolatey-configuration#self-service-background-mode ### FEATURES - * Package Throttle - Throttle Bandwidth / Rate Limit Download Speeds By default, Chocolatey downloads packages and resources as fast as it can. Package Throttle gives you a way to slow down Chocolatey so it doesn't overwhelm any bandwidth restrictions you may have. This is done as both a setting and per package install/upgrade. This is in bits per second (not bytes, bits is what most network traffic is measured in). When adding at runtime, simply add `--bps=VALUE`. To set the value in the configuration, call `choco config set maximumDownloadRateBitsPerSecond VALUE`. For more details see https://chocolatey.org/docs/features-package-reducer. @@ -130,7 +260,6 @@ This release brings Package Throttle, Package Synchronizer's "Show All Packages If Package Builder can create a fully unattended package for an installer, you don't even need a package first. You can simply call `choco install nameoffile.msi` or `choco upgrade nameoffile.exe` and Chocolatey will generate packaging on the fly and install/upgrade the package! ### BUG FIXES - * Fix - choco new generates uninstall template with wrong use of registry key variable - see [#1304](https://github.com/chocolatey/choco/issues/1304) * Package Internalizer (Choco Download): * Fix - Append UseOriginalLocation for multiline so that it adds a continuation and not a hanging parameter on a new line @@ -138,7 +267,6 @@ This release brings Package Throttle, Package Synchronizer's "Show All Packages * Fix - Find and replace the original url in the script ### IMPROVEMENTS - * [Security] Allow locking down new/download commands to admin only - added as feature flip switches (see `choco feature list`) * Self-Service / Background Mode: * Provide the user context to Chocolatey on install / upgrade (user context is original user requesting action) @@ -151,9 +279,7 @@ This release brings Package Throttle, Package Synchronizer's "Show All Packages ## 1.9.8 (March 25, 2017) - ### BUG FIXES - * Fix - Ensure Chocolatey Licensed is compatible with Chocolatey v0.10.4. * Fix - AutoUninstaller - ensure uninstallExe is split by quotes when necessary - see [#1208](https://github.com/chocolatey/choco/issues/1208) * Package Synchronizer (Choco Sync): @@ -165,15 +291,12 @@ This release brings Package Throttle, Package Synchronizer's "Show All Packages ## 1.9.7 (March 20, 2017) - -### BUG FIXES - +### BUG FIXES * Fix - Support automatic decompression on downloads - see [#1056](https://github.com/chocolatey/choco/issues/1056) * Fix - Package Builder - Restrict Get-UninstallRegistryKey params in chocolateyUninstall.ps1 * Fix - Package Internalizer - exit non-zero when variable replacement fails ### IMPROVEMENTS - * Ensure PowerShell scripts use CRLF so authenticode verification doesn't fail * Install Directory should see `INSTALLFOLDER` MSI Property * Virus Scanner - provide context for other answers (No/Skip) @@ -181,14 +304,11 @@ This release brings Package Throttle, Package Synchronizer's "Show All Packages ## 1.9.6 (March 3, 2017) - ### BUG FIXES - * Fix - Ensure silent args in logs are escaped * Fix - Package Internalizer - use console adapter for downloading ### IMPROVEMENTS - * Ensure proxy values are used with Chocolatey v0.10.4+ - see [#1141](https://github.com/chocolatey/choco/issues/1141) and [#1165](https://github.com/chocolatey/choco/issues/1165) * Install - do not create a `.ignore` file outside Chocolatey directories - same as [#1180](https://github.com/chocolatey/choco/issues/1180) * Package Synchronizer (Choco Sync): @@ -197,14 +317,11 @@ This release brings Package Throttle, Package Synchronizer's "Show All Packages ## 1.9.5 (January 31, 2017) - ### BUG FIXES - * Fix - Error when running Install-ChocolateyInstallPackage without specifying silent arguments * Remove *.istext file before the content-type check that creates file - see [#1012](https://github.com/chocolatey/choco/issues/1012) ### IMPROVEMENTS - * Package Builder (Choco New): * Right click - create a package without bringing up the GUI. * Package Internalizer (Choco Download): @@ -213,40 +330,30 @@ This release brings Package Throttle, Package Synchronizer's "Show All Packages ## 1.9.4 (January 19, 2017) - ### BUG FIXES - * Fix - enabling preview features has no effect. ## 1.9.3 (January 17, 2017) - ### BUG FIXES - * Fix - trial users unable to use Business version of Package Builder UI. ## 1.9.2 (January 17, 2017) - ### BUG FIXES - * Fix - virus scanner not working properly ## 1.9.1 (January 16, 2017) - ### BUG FIXES - * Fix - Ensure Pro users can call Package Builder from the command line ("packagebuilder") after install * Fix - Correct title of package to "Chocolatey Licensed Edition" ## 1.9.0 (January 15, 2017) - This release brings the coveted PackageBuilder UI to the Pro+ license (minus auto detection) and adds a tabbed interface that allows you to fill out the entire nuspec. Package Synchronizer now has `choco sync` to compliment the automatic synchronization. The sync command brings all unmanaged software in Programs and Features under Chocolatey management. ### FEATURES - * Package Synchronizer v2 - `choco sync` to associate existing packages with unmanaged software - see https://chocolatey.org/docs/features-synchronize#sync-command * Package Builder UI: * Starts at Professional edition (minus autodetection) @@ -255,7 +362,6 @@ This release brings the coveted PackageBuilder UI to the Pro+ license (minus aut * [Business] Tab to generate from Programs and Features ### BUG FIXES - * Self-Service / Background Mode: * Fix - Add a line after progress is complete * Fix - Automatic creation of ignore file in Install-ChocolateyInstallPackage throws errors when it fails - see [#380](https://github.com/chocolatey/chocolatey/issues/380) for original issue. @@ -265,7 +371,6 @@ This release brings the coveted PackageBuilder UI to the Pro+ license (minus aut * Fix - continue on error ### IMPROVEMENTS - * User can turn on Preview Features - `choco feature enable -n allowPreviewFeatures` * InstallDirectory switch added to Install-ChocolateyInstallPackage * Package Internalizer (Choco Download) @@ -283,9 +388,7 @@ This release brings the coveted PackageBuilder UI to the Pro+ license (minus aut ## 1.8.4 (January 5, 2017) - ### FEATURES - * Support Self-Service Install / Background Mode - see https://chocolatey.org/docs/features-agent-service * Manage Windows Services @@ -314,27 +417,22 @@ Uninstall-ChocolateyWindowsService -Name 'chocolatey-agent' ~~~ ### BUG FIXES - * Package Synchronizer - Do not run automatic sync when non-elevated. It fails in weird ways * Package Builder (Choco New): * Fix - fix "(Install)" - append space in nuspec Title. ### IMPROVEMENTS - * Downloading remote files - don't show bytes, only formatted values * Authenticode sign licensed binaries ## 1.8.3 (December 21, 2016) - ### FEATURES - * Package Downloader/Internalizer (Choco Download): * Internalize package dependencies * Allow download to separate location than where package will edit for internal resources (`--download-location`) ### BUG FIXES - * Fix - Directory Override - ensure override switch is passed to .install/.portable package when passing switch to meta package. * Fix - Ensure web requests don't time out / are configurable - see [#732](https://github.com/chocolatey/choco/issues/732) * Package Builder (Choco New): @@ -347,7 +445,6 @@ Uninstall-ChocolateyWindowsService -Name 'chocolatey-agent' * Fix - Do not timeout for larger files ### IMPROVEMENTS - * Directory Override - if MSI properties include INSTALLDIR or INSTALLLOCATION, use that instead of TARGETDIR * Package Builder (Choco New): * MSI Properties generated are cleaned up, duplicates removed from chocolateyInstall.ps1 comments @@ -359,9 +456,7 @@ Uninstall-ChocolateyWindowsService -Name 'chocolatey-agent' ## 1.8.2 (December 12, 2016) - ### BUG FIXES - * Package Builder (Choco New): * Fix - Ignore first argument for name if not a name. This will also be fixed in Chocolatey v0.10.4 with [#1085](https://github.com/chocolatey/choco/issues/1085) * Fix - PackageBuilder UI will request administrative permissions when run by admin. @@ -371,35 +466,29 @@ Uninstall-ChocolateyWindowsService -Name 'chocolatey-agent' * Countdown days counting in incorrect direction ### IMPROVEMENTS - * Package Builder (Choco New): * version - add TODO if version is 0.0.0.0 * outputdirectory option has more aliases. ## 1.8.1 (November 27, 2016) - ### BUG FIXES - * AutoUninstaller - Fix - do not fail on auto-detection of type when uninstall executable is not in the correct format. * Package Builder (Choco New): * Fix - Programs and Features - do not fail on auto-detection of type based on uninstall string ### IMPROVEMENTS - * Package Builder (Choco New): * version - always set to 3 segments (x.y.z) * version - remove extra version segments when more than 4 segments are returned ## 1.8.0 (November 16, 2016) - Package Builder has some major improvements in this release, including a new UI! See https://chocolatey.org/blog/package-builder-announcements for details! While building some of the features for the enhancements for this release, we've made quite a few tweaks and fixes to Package Builder and we think you are going to like the results. Being able to generate packages from the installed software on a reference system is huge (`choco new --from-programs-and-features`)! Pro users now have the ability to download packages (minus internalization). This is fantastic if you want to pull down a lot of packages quickly from a remote source. Or pull down packages and push them up to an internal source. ### FEATURES - * Package Downloader comes to Pro+ Licenses - minus internalizer, you can now download a package using an easy command `choco download`. * Package Builder (Choco New): * Package Builder now has a UI - see https://youtu.be/qJNKR_PEQqY for details. @@ -407,7 +496,6 @@ Pro users now have the ability to download packages (minus internalization). Thi * Package Builder - generate packages from installed software (Programs and Features) - see https://youtu.be/Mw_ReipnskI for details. ### BUG FIXES - * Package Builder (Choco New): * Fix - silent arguments for MSU/MSP should not include the file itself. * Fix - remove comma if found. @@ -420,7 +508,6 @@ Pro users now have the ability to download packages (minus internalization). Thi * Fix - sync over an existing synced package without error. ### IMPROVEMENTS - * Uninstall - Uninstall software not managed with Chocolatey. Use something like `choco uninstall 7-zip* --from-programs-and-features` to ensure removal from Programs and Features directly. Also requires Chocolatey v0.10.4. * VirusTotal - When a user cancels a virus check, set the proper exit code so that rollback occurs automatically - see [#985](https://github.com/chocolatey/choco/issues/985). * Package Builder (Choco New): @@ -436,15 +523,12 @@ Pro users now have the ability to download packages (minus internalization). Thi ## 1.7.0 (Sep 22, 2016) - ### BUG FIXES - * Package Builder (Choco New) - Removed `fileFullPath` from install template - add back in when local zip only. Fixes an error as `file` and `fileFullPath` are aliases starting in 0.10.1. * Package Internalizer (Choco Download) - ensure logging does not incur log format exceptions * install/upgrade - Look for downloaded file at old path if replaced 'chocolatey\chocolatey' path does not exist - see [#969](https://github.com/chocolatey/choco/issues/969) ### IMPROVEMENTS - * Package Builder (Choco New): * `--build-package` to build a package after Package Builder creates the package all in one go. * `--pause-on-error` to pause the output when there are errors for closer inspection (useful when run from a batch file). @@ -458,39 +542,30 @@ Pro users now have the ability to download packages (minus internalization). Thi ## 1.6.3 (Sep 20, 2016) - ### BUG FIXES - * Require Chocolatey be upgraded to at least 0.10.1 due to internal incompatibilities that affect this extension. ## 1.6.2 (Sep 19, 2016 - pulled) - ### BUG FIXES - * Recompiled to work with 0.10.1. There were some internal changes that appear to affect the virus scanner and PackageBuilder. ### IMPROVEMENTS - * Install/upgrade - support MSP (patch files) * PackageBuilder - support MSU/MSP files ## 1.6.1 (Sep 8, 2016) - ### BUG FIXES - * Package Builder (Choco New): * Fix - Do not error on missing appsearch table in MSI. * Fix - Do not add similarly named items from AppSearch table to template properties more than once. ## 1.6.0 (Sep 8, 2016) - Some really big improvements are now available in v1.6.0. We are excited to share them with you! ### FEATURES - * Licensed Enhancements: * install/upgrade - pass sensitive arguments that are not shown/logged in Chocolatey to an installer - useful when you want to pass passwords but don't want them logged. Need Chocolatey v0.10.1+. * AutoUninstaller - determine type from original executable when FOSS is not able to detect installer type. @@ -501,7 +576,6 @@ Some really big improvements are now available in v1.6.0. We are excited to shar * Work with zip files ### BUG FIXES - * Fix - changes related to working directory fixes for [#937](https://github.com/chocolatey/choco/issues/937) * Fix - double chocolatey folder name is not also applied to the passed in file name - see [#908](https://github.com/chocolatey/choco/issues/908) * Package Builder (Choco New): @@ -511,7 +585,6 @@ Some really big improvements are now available in v1.6.0. We are excited to shar * Fix - handle downloaded files with the same name Sometimes the file name is the same when the architecture is different. Handle that by using the url counter for all additional files with the same name. ### IMPROVEMENTS - * Remind About Upcoming Expiration - when the license is expiring within a month's time, remind the user about renewal * Package Builder (Choco New): * Handle -forcex86 with package creation @@ -530,55 +603,41 @@ Some really big improvements are now available in v1.6.0. We are excited to shar ## 1.5.1 (Aug 9, 2016) - ### BUG FIXES - * Fix - Valid Exit Codes do not support values bigger than Int32.MaxValue. - see [#900](https://github.com/chocolatey/choco/issues/900) ### IMPROVEMENTS - * Package Internalizer (Choco Download) - specify resources location (when not embedding into package) ## 1.5.0 (July 21, 2016) - ### FEATURES - * [Business] Recompiled packages support aka Package Internalizer - Download a package and all remote resources, recompiling the package to use local resources instead. * Synchronize w/Programs and Features - Chocolatey synchronizes manually uninstalled software with package state. ### BUG FIXES - * Fix - Silent Args being passed as a string array cause package failure - see [#808](https://github.com/chocolatey/choco/issues/808) ### IMPROVEMENTS - * VirusTotal - allow skipping check entirely - [#786](https://github.com/chocolatey/choco/issues/786) * Trial allows more features to work, but in a way that is not automatable. ## 1.4.2 (June 20, 2016) - ### BUG FIXES - * Fix - Logging is broken in some packages due to new TEMP directory - [#813](https://github.com/chocolatey/choco/issues/813) ### IMPROVEMENTS - * Ensure log file path exists - [#758](https://github.com/chocolatey/choco/issues/758) ## 1.4.1 (June 14, 2016) - ### BUG FIXES - * PowerShell v2 assembly was not loading. There was a dependency on an incorrect version of PowerShell assemblies, causing it to only attempt to load System.Management.Automation v3 and above - [#799](https://github.com/chocolatey/choco/issues/799) ## 1.4.0 (June 13, 2016) - ### FEATURES - * BETA Testers - Recompiled packages support - Download a package and all remote resources, recompiling the package to use local resources instead. * BETA Testers - Synchronize w/Programs and Features - Chocolatey synchronizes manually uninstalled software with package state. * [Business] Create Packages from Installers aka Package Builder! Create packages directly from software installers in seconds! **Chocolatey for Business can automatically create packages for all the software your organization uses in under 5 minutes!** @@ -586,65 +645,49 @@ Some really big improvements are now available in v1.6.0. We are excited to shar * Web functions for local files support - [#781](https://github.com/chocolatey/choco/issues/781) ### IMPROVEMENTS - * Support FIPS compliant algorithms [#446](https://github.com/chocolatey/choco/issues/446) ## 1.3.2 (May 28, 2016) - ### BUG FIXES - * Get-WebFile name changes related to [#753](https://github.com/chocolatey/choco/issues/753) ### IMPROVEMENTS - * Clarified options with version and better messaging. ## 1.3.1 (May 9, 2016) - ### BUG FIXES - * Get-WebFile name changes related to [#727](https://github.com/chocolatey/choco/issues/727) ### IMPROVEMENTS - * Report directory switch override. ## 1.3.0 (May 2, 2016) - ### FEATURES - * Ubiquitous Install Directory Switch! When working with properly formed packages that use Install-ChocolateyPackage (or Install-ChocolateyInstallPackage), Chocolatey is able to override the native installer's directory from one single option you provide to Chocolatey. You no longer need to know what the installer type is and provide that through install arguments. See `choco install -?` and `--install-directory` option for details. * Generic Virus Scanner - for organizations that don't want to run checks using VirusTotal, we've provided a way for organizations to use their own virus scanner. See `choco config list` for details. - ### BUG FIXES - +### BUG FIXES * Fix - Content Length check may error if original location is changed. This means the permanent download location will not error on other checks. * Fix - Original remote file name can be affected if original url has changed or is unavailable. ### IMPROVEMENTS - * Virus Scanner exits as soon as possible on files too big for the scanner. If the file is over 500MB, the scanner cannot upload the file, so it should not ask whether it can try to upload prior to failing on the size check (previous behavior). ## 1.2.0 (March 14, 2016) - ### FEATURES - * Virus scanning for Pro users! See the [post](https://www.kickstarter.com/projects/ferventcoder/chocolatey-the-alternative-windows-store-like-yum/posts/1518468) for details! ## 1.1.0 (February 12, 2016) - ### IMPROVEMENTS - * License can now be in user profile (like `c:\Users\yourname\chocolatey.license.xml`). This is great for roaming user profiles and in multiple machine usage scenarios. * Download cache can be controlled with a feature flag and/or a command option. See `choco feature` and `choco install -h` for more details. ### For BETA Testers - * Virus Check improvements * Throw if virus check has not been done before. * Messaging is clarified @@ -652,21 +695,15 @@ Some really big improvements are now available in v1.6.0. We are excited to shar ## 1.0.2 (February 5, 2016) - ### BUG FIXES - * Fix - PowerShell 5 respects Cmdlet aliases, causing overrides on functions not ready (Install-ChocolateyPackage). See the [post](https://www.kickstarter.com/projects/ferventcoder/chocolatey-the-alternative-windows-store-like-yum/posts/1484093) for details. ## 1.0.1 (February 2, 2016) - ### BUG FIXES - * Fix - License location validation is incorrect. ## 1.0.0 (February 1, 2016) - ### FEATURES - * Alternate Permanent Download Location - see the [post](https://www.kickstarter.com/projects/ferventcoder/chocolatey-the-alternative-windows-store-like-yum/posts/1479944) for details. diff --git a/COMMITTERS.md b/COMMITTERS.md index dd20e119f5..721d001ae5 100644 --- a/COMMITTERS.md +++ b/COMMITTERS.md @@ -64,7 +64,7 @@ Unless there is something wrong with the code, we don't ask contributors to reba ## Merging Once you have reviewed the change set and determined it is ready for merge, the next steps are to bring it local and evaluate the code further by actually working with it, running the tests locally and adding any additional commits or fix-ups that are necessary in a local branch. -When merging the user's contribution, it should be done with `git merge --log --no-ff` to create a merge commit so that in case there is an issue it becomes easier to revert later, and so that we can see where the code came from should we ever need to go find it later (more information on this can be found [here](https://www.kernel.org/pub/software/scm/git/docs/git-merge.html) and also a discussion on why this is a good idea [here](http://differential.io/blog/best-way-to-merge-a-github-pull-request)). +When merging the user's contribution, it should be done with `git merge --log --no-ff` to create a merge commit so that in case there is an issue it becomes easier to revert later, and so that we can see where the code came from should we ever need to go find it later (more information on this can be found [here](https://www.kernel.org/pub/software/scm/git/docs/git-merge.html) and also a discussion on why this is a good idea [here](https://differential.com/insights/best-way-to-merge-a-github-pull-request/)). ### Merge Retargeting to Stable Because we ask contributors to target master, sometimes a fix/enhancement may need to be retargeted to stable. This process is somewhat easy thanks to git. In most cases you won't even need to ask the user to do this for you. @@ -73,8 +73,8 @@ Because we ask contributors to target master, sometimes a fix/enhancement may ne * `git checkout pr` * `git rebase --onto stable master` - this uses the local branch, starts with latest stable and reapplies the commits from the branch to it, removing all commits that were only on the master. * `build.bat` - build and test + * Any additional changes or testing here. * `git checkout stable` - * Any addtional changes or testing here. * `git merge pr --log --no-ff` * `git branch -d pr` * `git checkout master` diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ae52677714..178864c644 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -37,7 +37,7 @@ Chocolatey is a large ecosystem and each component has their own location for su Please follow this decision criteria to see if you are in the right location or if you should head to a different location to submit your request. ### Reporting an Issue/Bug? -![submitting isseus](https://cloud.githubusercontent.com/assets/63502/12534440/fc223b74-c21e-11e5-9a41-1ffc1c9af48f.png) +![submitting issues](https://cloud.githubusercontent.com/assets/63502/12534440/fc223b74-c21e-11e5-9a41-1ffc1c9af48f.png) Submitting an Issue (or a Bug)? See the **[Submitting Issues](https://github.com/chocolatey/choco#submitting-issues) section** in the [README](https://github.com/chocolatey/choco/blob/master/README.md#submitting-issues). diff --git a/GenerateDocs.ps1 b/GenerateDocs.ps1 index 0a1f9c5b1c..fd39dcfa08 100644 --- a/GenerateDocs.ps1 +++ b/GenerateDocs.ps1 @@ -283,6 +283,11 @@ try Write-Host "Importing the Module $psModuleName ..." Import-Module "$psModuleLocation" -Force -Verbose + # Switch Get-PackageParameters back for documentation + Remove-Item alias:Get-PackageParameters + Remove-Item function:Get-PackageParametersBuiltIn + Set-Alias -Name Get-PackageParametersBuiltIn -Value Get-PackageParameters -Scope Global + if (Test-Path($docsFolder)) { Remove-Item $docsFolder -Force -Recurse -EA SilentlyContinue } if(-not(Test-Path $docsFolder)){ mkdir $docsFolder -EA Continue | Out-Null } diff --git a/NOTICE b/NOTICE index da57b99c7a..f35184b9c3 100644 --- a/NOTICE +++ b/NOTICE @@ -1,4 +1,4 @@ - Copyright (c) 2017 Chocolatey Software, Inc. + Copyright (c) 2017 - 2018 Chocolatey Software, Inc. Copyright (c) 2011 - 2017 RealDimensions Software, LLC Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/README.md b/README.md index 28266f3e7f..7baf606053 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ TeamCity | AppVeyor | Travis [![TeamCity Build Status](https://img.shields.io/teamcity/codebetter/bt429.svg)](http://teamcity.codebetter.com/viewType.html?buildTypeId=bt429) | [![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/jfxywa3xuwowt20w/branch/master?svg=true)](https://ci.appveyor.com/project/ferventcoder/choco/branch/master) | [![Travis Build Status](https://travis-ci.org/chocolatey/choco.svg?branch=master)](https://travis-ci.org/chocolatey/choco) ## Chat Room -Come join in the conversation about Chocolatey in our Gitter Chat Room +Come join in the conversation about Chocolatey in our Gitter Chat Room. [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/chocolatey/choco?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) @@ -44,7 +44,6 @@ Please make sure you've read over and agree with the [etiquette regarding commun ## Support Chocolatey! * Purchase [Chocolatey Pro / Chocolatey for Business](https://chocolatey.org/pricing#compare) - * Donate [![](https://img.shields.io/gratipay/Chocolatey.svg)](https://www.gratipay.com/Chocolatey/) ## See Chocolatey In Action Chocolatey FOSS install showing tab completion and `refreshenv` (a way to update environment variables without restarting your shell): @@ -56,7 +55,9 @@ Chocolatey FOSS install showing tab completion and `refreshenv` (a way to update ![install w/pro](https://raw.githubusercontent.com/wiki/chocolatey/choco/images/gifs/chocopro_install_stopped.gif "Chocolatey Pro availability now! A great option for individuals looking for that community PLUS option.") ## Etiquette Regarding Communication -When requesting support, try to remember that we are all volunteers that have lives outside of open source and none of us are paid to ensure things work for you, so please be considerate of others' time when you are asking for things. Many of us have families that also need time as well and only have so much time to give on a daily basis. In the future, we hope that some of us are paid to do this full time and can provide better support when folks are running into issues, but until then a little consideration and patience can go a long way. After all, you are using a pretty good tool without cost. It may not be perfect (yet), and we know that. +If you are an open source user requesting support, please remember that most folks in the Chocolatey community are volunteers that have lives outside of open source and are not paid to ensure things work for you, so please be considerate of others' time when you are asking for things. Many of us have families that also need time as well and only have so much time to give on a daily basis. A little consideration and patience can go a long way. After all, you are using a pretty good tool without cost. It may not be perfect (yet), and we know that. + +If you are using a [commercial edition of Chocolatey](https://chocolatey.org/compare#compare), you have different terms! Please see [support](https://chocolatey.org/support). ## Information * [Chocolatey Website and Community Package Repository](https://chocolatey.org) @@ -71,7 +72,7 @@ Please see the [docs](https://chocolatey.org/docs) Give `choco.exe -?` a shot (or `choco.exe -h`). For specific commands, add the command and then the help switch e.g. `choco.exe install -h`. ### Requirements -* .NET Framework 4.0 +* .NET Framework 4.0+ * PowerShell 2.0+ * Windows Server 2003+ / Windows 7+ @@ -199,4 +200,4 @@ chmod +x zip.sh Running the build on Mono produces an artifact similar to Windows but may have more rough edges. You may get a failure or two in the build script that can be safely ignored. ## Credits -Chocolatey is brought to you by quite a few people and frameworks. See [CREDITS](https://github.com/chocolatey/choco/blob/master/docs/legal/CREDITS.md) (just LEGAL/Credits.md in the zip folder) +Chocolatey is brought to you by quite a few people and frameworks. See [CREDITS](https://github.com/chocolatey/choco/blob/master/docs/legal/CREDITS.md) (just LEGAL/Credits.md in the zip folder). diff --git a/docs/generated/CommandsApiKey.md b/docs/generated/CommandsApiKey.md index 79e6945e1f..aa90f27a0f 100644 --- a/docs/generated/CommandsApiKey.md +++ b/docs/generated/CommandsApiKey.md @@ -72,6 +72,10 @@ Includes [[default options/switches|CommandsReference#default-options-and-switch except when needing super low-level .NET Framework debugging. Available in 0.10.4+. + --nocolor, --no-color + No Color - Do not show colorization in logging output. This overrides + the feature 'logWithoutColor', set to 'False'. Available in 0.10.9+. + --acceptlicense, --accept-license AcceptLicense - Accept license dialogs automatically. Reserved for future use. diff --git a/docs/generated/CommandsConfig.md b/docs/generated/CommandsConfig.md index 71fbf9655b..63d8febdb2 100644 --- a/docs/generated/CommandsConfig.md +++ b/docs/generated/CommandsConfig.md @@ -56,6 +56,10 @@ Includes [[default options/switches|CommandsReference#default-options-and-switch except when needing super low-level .NET Framework debugging. Available in 0.10.4+. + --nocolor, --no-color + No Color - Do not show colorization in logging output. This overrides + the feature 'logWithoutColor', set to 'False'. Available in 0.10.9+. + --acceptlicense, --accept-license AcceptLicense - Accept license dialogs automatically. Reserved for future use. diff --git a/docs/generated/CommandsDownload.md b/docs/generated/CommandsDownload.md index 901d4d69ba..19bbf943eb 100644 --- a/docs/generated/CommandsDownload.md +++ b/docs/generated/CommandsDownload.md @@ -23,17 +23,29 @@ See https://chocolatey.org/docs/features-automatically-recompile-packages ## Usage - choco download [] + choco download [] [install_script_variable=value] + + Install script variables are values that are discovered in the + chocolateyInstall.ps1 (or a script it calls). When you find values + there maybe don't get found and replaced or they use a default + value and you want to provide a value for them to use instead, you + can find them and then provide the value you want to pass instead. + For example, in the Firefox package, it uses a default value of + 'en-US' for `$locale`. If you want to change that, you can add + `locale` and a value, which will replace `$locale` in the script, + e.g. `choco download firefox --internalize locale=en-GB`. ## Examples choco download sysinternals #### [Chocolatey for Business](https://chocolatey.org/compare) / Chocolatey for MSP - choco download notepadplusplus.install --internalize + choco download notepadplusplus --internalize choco download notepadplusplus.install --internalize --resources-location \\server\share choco download notepadplusplus.install --internalize --resources-location http://somewhere/internal --append-useoriginallocation choco download KB3033929 --internalize -internalize-all-urls --append-useoriginallocation + choco download firefox --internalize locale=es-AR + ## See It In Action @@ -70,6 +82,10 @@ Includes [[default options/switches|CommandsReference#default-options-and-switch except when needing super low-level .NET Framework debugging. Available in 0.10.4+. + --nocolor, --no-color + No Color - Do not show colorization in logging output. This overrides + the feature 'logWithoutColor', set to 'False'. Available in 0.10.9+. + --acceptlicense, --accept-license AcceptLicense - Accept license dialogs automatically. Reserved for future use. @@ -211,7 +227,7 @@ Includes [[default options/switches|CommandsReference#default-options-and-switch function. Business editions only (licensed version 1.7.0+). Requires at least Chocolatey v0.10.1 for `Install-ChocolateyPackage` to recognize the switch appropriately. Overrides the feature - 'internalizeAppendUseOriginalLocation' set to by default to 'False'. + 'internalizeAppendUseOriginalLocation' set to by default to 'True'. --sdc, --skipdownloadcache, --skip-download-cache Skip Download Cache - Use the original download url even if a private diff --git a/docs/generated/CommandsFeature.md b/docs/generated/CommandsFeature.md index e924bf54a5..774408f067 100644 --- a/docs/generated/CommandsFeature.md +++ b/docs/generated/CommandsFeature.md @@ -42,6 +42,10 @@ Includes [[default options/switches|CommandsReference#default-options-and-switch except when needing super low-level .NET Framework debugging. Available in 0.10.4+. + --nocolor, --no-color + No Color - Do not show colorization in logging output. This overrides + the feature 'logWithoutColor', set to 'False'. Available in 0.10.9+. + --acceptlicense, --accept-license AcceptLicense - Accept license dialogs automatically. Reserved for future use. diff --git a/docs/generated/CommandsFeatures.md b/docs/generated/CommandsFeatures.md index 0bd8d5b6bb..c4634e2e77 100644 --- a/docs/generated/CommandsFeatures.md +++ b/docs/generated/CommandsFeatures.md @@ -42,6 +42,10 @@ Includes [[default options/switches|CommandsReference#default-options-and-switch except when needing super low-level .NET Framework debugging. Available in 0.10.4+. + --nocolor, --no-color + No Color - Do not show colorization in logging output. This overrides + the feature 'logWithoutColor', set to 'False'. Available in 0.10.9+. + --acceptlicense, --accept-license AcceptLicense - Accept license dialogs automatically. Reserved for future use. diff --git a/docs/generated/CommandsInfo.md b/docs/generated/CommandsInfo.md index 514d53dd3a..5fcb1a4a37 100644 --- a/docs/generated/CommandsInfo.md +++ b/docs/generated/CommandsInfo.md @@ -35,6 +35,10 @@ Includes [[default options/switches|CommandsReference#default-options-and-switch except when needing super low-level .NET Framework debugging. Available in 0.10.4+. + --nocolor, --no-color + No Color - Do not show colorization in logging output. This overrides + the feature 'logWithoutColor', set to 'False'. Available in 0.10.9+. + --acceptlicense, --accept-license AcceptLicense - Accept license dialogs automatically. Reserved for future use. diff --git a/docs/generated/CommandsInstall.md b/docs/generated/CommandsInstall.md index f6f16e570a..149d5e264c 100644 --- a/docs/generated/CommandsInstall.md +++ b/docs/generated/CommandsInstall.md @@ -173,6 +173,10 @@ Includes [[default options/switches|CommandsReference#default-options-and-switch except when needing super low-level .NET Framework debugging. Available in 0.10.4+. + --nocolor, --no-color + No Color - Do not show colorization in logging output. This overrides + the feature 'logWithoutColor', set to 'False'. Available in 0.10.9+. + --acceptlicense, --accept-license AcceptLicense - Accept license dialogs automatically. Reserved for future use. diff --git a/docs/generated/CommandsList.md b/docs/generated/CommandsList.md index 85f00b316a..7bc40e9592 100644 --- a/docs/generated/CommandsList.md +++ b/docs/generated/CommandsList.md @@ -75,6 +75,10 @@ Includes [[default options/switches|CommandsReference#default-options-and-switch except when needing super low-level .NET Framework debugging. Available in 0.10.4+. + --nocolor, --no-color + No Color - Do not show colorization in logging output. This overrides + the feature 'logWithoutColor', set to 'False'. Available in 0.10.9+. + --acceptlicense, --accept-license AcceptLicense - Accept license dialogs automatically. Reserved for future use. diff --git a/docs/generated/CommandsNew.md b/docs/generated/CommandsNew.md index 7843755dcf..c712fc058d 100644 --- a/docs/generated/CommandsNew.md +++ b/docs/generated/CommandsNew.md @@ -81,6 +81,10 @@ Includes [[default options/switches|CommandsReference#default-options-and-switch except when needing super low-level .NET Framework debugging. Available in 0.10.4+. + --nocolor, --no-color + No Color - Do not show colorization in logging output. This overrides + the feature 'logWithoutColor', set to 'False'. Available in 0.10.9+. + --acceptlicense, --accept-license AcceptLicense - Accept license dialogs automatically. Reserved for future use. diff --git a/docs/generated/CommandsOptimize.md b/docs/generated/CommandsOptimize.md index 99432bfba7..2142e2479f 100644 --- a/docs/generated/CommandsOptimize.md +++ b/docs/generated/CommandsOptimize.md @@ -67,6 +67,10 @@ Includes [[default options/switches|CommandsReference#default-options-and-switch except when needing super low-level .NET Framework debugging. Available in 0.10.4+. + --nocolor, --no-color + No Color - Do not show colorization in logging output. This overrides + the feature 'logWithoutColor', set to 'False'. Available in 0.10.9+. + --acceptlicense, --accept-license AcceptLicense - Accept license dialogs automatically. Reserved for future use. diff --git a/docs/generated/CommandsOutdated.md b/docs/generated/CommandsOutdated.md index e351be61c8..d87a026281 100644 --- a/docs/generated/CommandsOutdated.md +++ b/docs/generated/CommandsOutdated.md @@ -53,6 +53,10 @@ Includes [[default options/switches|CommandsReference#default-options-and-switch except when needing super low-level .NET Framework debugging. Available in 0.10.4+. + --nocolor, --no-color + No Color - Do not show colorization in logging output. This overrides + the feature 'logWithoutColor', set to 'False'. Available in 0.10.9+. + --acceptlicense, --accept-license AcceptLicense - Accept license dialogs automatically. Reserved for future use. @@ -154,6 +158,12 @@ Includes [[default options/switches|CommandsReference#default-options-and-switch Ignore Pinned - Ignore pinned packages. Defaults to false. Available in 0.10.6+. + --ignore-unfound + Ignore Unfound Packages - Ignore packages that are not found on the + sources used (or the defaults). Overrides the default feature + 'ignoreUnfoundPackagesOnUpgradeOutdated' set to 'False'. Available in - + 0.10.9+. + ~~~ [[Command Reference|CommandsReference]] diff --git a/docs/generated/CommandsPack.md b/docs/generated/CommandsPack.md index b717c47b87..d01dc26eb1 100644 --- a/docs/generated/CommandsPack.md +++ b/docs/generated/CommandsPack.md @@ -57,6 +57,10 @@ Includes [[default options/switches|CommandsReference#default-options-and-switch except when needing super low-level .NET Framework debugging. Available in 0.10.4+. + --nocolor, --no-color + No Color - Do not show colorization in logging output. This overrides + the feature 'logWithoutColor', set to 'False'. Available in 0.10.9+. + --acceptlicense, --accept-license AcceptLicense - Accept license dialogs automatically. Reserved for future use. diff --git a/docs/generated/CommandsPin.md b/docs/generated/CommandsPin.md index 37000b97b4..a50e717ec4 100644 --- a/docs/generated/CommandsPin.md +++ b/docs/generated/CommandsPin.md @@ -48,6 +48,10 @@ Includes [[default options/switches|CommandsReference#default-options-and-switch except when needing super low-level .NET Framework debugging. Available in 0.10.4+. + --nocolor, --no-color + No Color - Do not show colorization in logging output. This overrides + the feature 'logWithoutColor', set to 'False'. Available in 0.10.9+. + --acceptlicense, --accept-license AcceptLicense - Accept license dialogs automatically. Reserved for future use. diff --git a/docs/generated/CommandsPush.md b/docs/generated/CommandsPush.md index d1e00bbee9..d87bd845f5 100644 --- a/docs/generated/CommandsPush.md +++ b/docs/generated/CommandsPush.md @@ -74,6 +74,10 @@ Includes [[default options/switches|CommandsReference#default-options-and-switch except when needing super low-level .NET Framework debugging. Available in 0.10.4+. + --nocolor, --no-color + No Color - Do not show colorization in logging output. This overrides + the feature 'logWithoutColor', set to 'False'. Available in 0.10.9+. + --acceptlicense, --accept-license AcceptLicense - Accept license dialogs automatically. Reserved for future use. diff --git a/docs/generated/CommandsReference.md b/docs/generated/CommandsReference.md index 8f38a3d452..84a5801eb9 100644 --- a/docs/generated/CommandsReference.md +++ b/docs/generated/CommandsReference.md @@ -104,6 +104,10 @@ You can pass options and switches in the following ways: except when needing super low-level .NET Framework debugging. Available in 0.10.4+. + --nocolor, --no-color + No Color - Do not show colorization in logging output. This overrides + the feature 'logWithoutColor', set to 'False'. Available in 0.10.9+. + --acceptlicense, --accept-license AcceptLicense - Accept license dialogs automatically. Reserved for future use. diff --git a/docs/generated/CommandsSearch.md b/docs/generated/CommandsSearch.md index 6ef90070e6..8de1d09f92 100644 --- a/docs/generated/CommandsSearch.md +++ b/docs/generated/CommandsSearch.md @@ -75,6 +75,10 @@ Includes [[default options/switches|CommandsReference#default-options-and-switch except when needing super low-level .NET Framework debugging. Available in 0.10.4+. + --nocolor, --no-color + No Color - Do not show colorization in logging output. This overrides + the feature 'logWithoutColor', set to 'False'. Available in 0.10.9+. + --acceptlicense, --accept-license AcceptLicense - Accept license dialogs automatically. Reserved for future use. diff --git a/docs/generated/CommandsSetapiKey.md b/docs/generated/CommandsSetapiKey.md index 087804fa10..6535ce5d6b 100644 --- a/docs/generated/CommandsSetapiKey.md +++ b/docs/generated/CommandsSetapiKey.md @@ -72,6 +72,10 @@ Includes [[default options/switches|CommandsReference#default-options-and-switch except when needing super low-level .NET Framework debugging. Available in 0.10.4+. + --nocolor, --no-color + No Color - Do not show colorization in logging output. This overrides + the feature 'logWithoutColor', set to 'False'. Available in 0.10.9+. + --acceptlicense, --accept-license AcceptLicense - Accept license dialogs automatically. Reserved for future use. diff --git a/docs/generated/CommandsSource.md b/docs/generated/CommandsSource.md index d117edca3e..af4922dae4 100644 --- a/docs/generated/CommandsSource.md +++ b/docs/generated/CommandsSource.md @@ -59,6 +59,10 @@ Includes [[default options/switches|CommandsReference#default-options-and-switch except when needing super low-level .NET Framework debugging. Available in 0.10.4+. + --nocolor, --no-color + No Color - Do not show colorization in logging output. This overrides + the feature 'logWithoutColor', set to 'False'. Available in 0.10.9+. + --acceptlicense, --accept-license AcceptLicense - Accept license dialogs automatically. Reserved for future use. diff --git a/docs/generated/CommandsSources.md b/docs/generated/CommandsSources.md index a8e65f1067..a1a495109b 100644 --- a/docs/generated/CommandsSources.md +++ b/docs/generated/CommandsSources.md @@ -59,6 +59,10 @@ Includes [[default options/switches|CommandsReference#default-options-and-switch except when needing super low-level .NET Framework debugging. Available in 0.10.4+. + --nocolor, --no-color + No Color - Do not show colorization in logging output. This overrides + the feature 'logWithoutColor', set to 'False'. Available in 0.10.9+. + --acceptlicense, --accept-license AcceptLicense - Accept license dialogs automatically. Reserved for future use. diff --git a/docs/generated/CommandsSupport.md b/docs/generated/CommandsSupport.md index 3fa6be4891..9fef4c7f02 100644 --- a/docs/generated/CommandsSupport.md +++ b/docs/generated/CommandsSupport.md @@ -23,6 +23,10 @@ As a licensed customer, you can reach out to except when needing super low-level .NET Framework debugging. Available in 0.10.4+. + --nocolor, --no-color + No Color - Do not show colorization in logging output. This overrides + the feature 'logWithoutColor', set to 'False'. Available in 0.10.9+. + --acceptlicense, --accept-license AcceptLicense - Accept license dialogs automatically. Reserved for future use. diff --git a/docs/generated/CommandsSync.md b/docs/generated/CommandsSync.md index e3c41110f3..cd727dd8b7 100644 --- a/docs/generated/CommandsSync.md +++ b/docs/generated/CommandsSync.md @@ -58,6 +58,10 @@ Includes [[default options/switches|CommandsReference#default-options-and-switch except when needing super low-level .NET Framework debugging. Available in 0.10.4+. + --nocolor, --no-color + No Color - Do not show colorization in logging output. This overrides + the feature 'logWithoutColor', set to 'False'. Available in 0.10.9+. + --acceptlicense, --accept-license AcceptLicense - Accept license dialogs automatically. Reserved for future use. diff --git a/docs/generated/CommandsSynchronize.md b/docs/generated/CommandsSynchronize.md index 09e7020a62..b7b5146212 100644 --- a/docs/generated/CommandsSynchronize.md +++ b/docs/generated/CommandsSynchronize.md @@ -58,6 +58,10 @@ Includes [[default options/switches|CommandsReference#default-options-and-switch except when needing super low-level .NET Framework debugging. Available in 0.10.4+. + --nocolor, --no-color + No Color - Do not show colorization in logging output. This overrides + the feature 'logWithoutColor', set to 'False'. Available in 0.10.9+. + --acceptlicense, --accept-license AcceptLicense - Accept license dialogs automatically. Reserved for future use. diff --git a/docs/generated/CommandsUninstall.md b/docs/generated/CommandsUninstall.md index 812bf8b4a8..a1cbe25024 100644 --- a/docs/generated/CommandsUninstall.md +++ b/docs/generated/CommandsUninstall.md @@ -102,6 +102,10 @@ Includes [[default options/switches|CommandsReference#default-options-and-switch except when needing super low-level .NET Framework debugging. Available in 0.10.4+. + --nocolor, --no-color + No Color - Do not show colorization in logging output. This overrides + the feature 'logWithoutColor', set to 'False'. Available in 0.10.9+. + --acceptlicense, --accept-license AcceptLicense - Accept license dialogs automatically. Reserved for future use. diff --git a/docs/generated/CommandsUnpackself.md b/docs/generated/CommandsUnpackself.md index c53a9121a3..20b2d6cef6 100644 --- a/docs/generated/CommandsUnpackself.md +++ b/docs/generated/CommandsUnpackself.md @@ -2,11 +2,11 @@ # UnpackSelf Command (choco unpackself) -This will unpack files needed by choco. It will overwrite existing +This will unpack files needed by choco. It will overwrite existing files only if --force is specified. -**NOTE:** This command should only be used when installing Chocolatey, not - during normal operation. +**NOTE:** This command should only be used when installing Chocolatey, not + during normal operation. ## Options and Switches @@ -36,6 +36,10 @@ Includes [[default options/switches|CommandsReference#default-options-and-switch except when needing super low-level .NET Framework debugging. Available in 0.10.4+. + --nocolor, --no-color + No Color - Do not show colorization in logging output. This overrides + the feature 'logWithoutColor', set to 'False'. Available in 0.10.9+. + --acceptlicense, --accept-license AcceptLicense - Accept license dialogs automatically. Reserved for future use. diff --git a/docs/generated/CommandsUpdate.md b/docs/generated/CommandsUpdate.md index 6111f335df..db11443d18 100644 --- a/docs/generated/CommandsUpdate.md +++ b/docs/generated/CommandsUpdate.md @@ -33,6 +33,10 @@ Includes [[default options/switches|CommandsReference#default-options-and-switch except when needing super low-level .NET Framework debugging. Available in 0.10.4+. + --nocolor, --no-color + No Color - Do not show colorization in logging output. This overrides + the feature 'logWithoutColor', set to 'False'. Available in 0.10.9+. + --acceptlicense, --accept-license AcceptLicense - Accept license dialogs automatically. Reserved for future use. diff --git a/docs/generated/CommandsUpgrade.md b/docs/generated/CommandsUpgrade.md index ee1e4f2de3..8ef65192cd 100644 --- a/docs/generated/CommandsUpgrade.md +++ b/docs/generated/CommandsUpgrade.md @@ -72,6 +72,10 @@ Includes [[default options/switches|CommandsReference#default-options-and-switch except when needing super low-level .NET Framework debugging. Available in 0.10.4+. + --nocolor, --no-color + No Color - Do not show colorization in logging output. This overrides + the feature 'logWithoutColor', set to 'False'. Available in 0.10.9+. + --acceptlicense, --accept-license AcceptLicense - Accept license dialogs automatically. Reserved for future use. @@ -204,8 +208,14 @@ Includes [[default options/switches|CommandsReference#default-options-and-switch Skip Powershell - Do not run chocolateyInstall.ps1. Defaults to false. --failonunfound, --fail-on-unfound - Fail On Unfound Packages - If a package is not found in feeds specified, - fail instead of warn. + Fail On Unfound Packages - If a package is not found in sources + specified, fail instead of warn. + + --ignore-unfound + Ignore Unfound Packages - Ignore packages that are not found on the + sources used (or the defaults). Overrides the default feature + 'ignoreUnfoundPackagesOnUpgradeOutdated' set to 'False'. Available in - + 0.10.9+. --failonnotinstalled, --fail-on-not-installed Fail On Non-installed Packages - If a package is not already installed, diff --git a/docs/generated/CommandsVersion.md b/docs/generated/CommandsVersion.md index 7ae27b7fed..3ec5dc94f9 100644 --- a/docs/generated/CommandsVersion.md +++ b/docs/generated/CommandsVersion.md @@ -37,6 +37,10 @@ Includes [[default options/switches|CommandsReference#default-options-and-switch except when needing super low-level .NET Framework debugging. Available in 0.10.4+. + --nocolor, --no-color + No Color - Do not show colorization in logging output. This overrides + the feature 'logWithoutColor', set to 'False'. Available in 0.10.9+. + --acceptlicense, --accept-license AcceptLicense - Accept license dialogs automatically. Reserved for future use. diff --git a/docs/generated/HelpersGetPackageParameters.md b/docs/generated/HelpersGetPackageParameters.md index aa2c5b79df..cd3baa0b1e 100644 --- a/docs/generated/HelpersGetPackageParameters.md +++ b/docs/generated/HelpersGetPackageParameters.md @@ -42,7 +42,8 @@ build all docs with `/Item:Value`. ## Aliases -None +`Get-PackageParametersBuiltIn` + ## Examples @@ -77,8 +78,9 @@ if (!$pp['LICENSE']) { $pp['LICENSE'] = '1234' } ~~~powershell $pp = Get-PackageParameters -# Requires 0.10.8 for Read-Host -AsSecureString -if (!$pp['Password']) { $pp['Password'] = Read-Host "Enter password for $userName:" -AsSecureString} +if (!$pp['UserName']) { $pp['UserName'] = "$env:UserName" } +# Requires Choocolatey v0.10.8+ for Read-Host -AsSecureString +if (!$pp['Password']) { $pp['Password'] = Read-Host "Enter password for $($pp['UserName']):" -AsSecureString} # fail the install/upgrade if not value is not determined if (!$pp['Password']) { throw "Package needs Password to install, that must be provided in params or in prompt." } ~~~ @@ -113,6 +115,12 @@ compatibility with `chocolatey-core.extension`, use `:`. For example `-Parameters "/ITEM1:value /ITEM2:value with spaces" +NOTE: In 0.10.9+, to maintain compatibility with the prior art of the +chocolatey-core.extension method, quotes and apostrophes surrounding +parameter values will be removed. When the param is used, those items +can be added back if desired, but it's most important to ensure that +existing packages are compatible on upgrade. + Property | Value ---------------------- | ------ Aliases | params diff --git a/docs/generated/HelpersInstallChocolateyInstallPackage.md b/docs/generated/HelpersInstallChocolateyInstallPackage.md index b0d4889924..c9ec0e26a0 100644 --- a/docs/generated/HelpersInstallChocolateyInstallPackage.md +++ b/docs/generated/HelpersInstallChocolateyInstallPackage.md @@ -87,18 +87,59 @@ Install-ChocolateyInstallPackage @packageArgs **EXAMPLE 3** ~~~powershell -Install-ChocolateyInstallPackage 'bob' 'exe' '/S' "$(Split-Path -Parent $MyInvocation.MyCommand.Definition)\bob.exe" +$packageName= 'bob' +$toolsDir = "$(Split-Path -Parent $MyInvocation.MyCommand.Definition)" +$fileLocation = Join-Path $toolsDir 'someinstaller.msi' + +$packageArgs = @{ + packageName = $packageName + fileType = 'msi' + file = $fileLocation + silentArgs = "/qn /norestart MSIPROPERTY=`"true`"" + validExitCodes= @(0, 3010, 1641) + softwareName = 'Bob*' +} + +Install-ChocolateyInstallPackage @packageArgs ~~~ **EXAMPLE 4** ~~~powershell +$packageName= 'bob' +$toolsDir = "$(Split-Path -Parent $MyInvocation.MyCommand.Definition)" +$fileLocation = Join-Path $toolsDir 'someinstaller.msi' +$mstFileLocation = Join-Path $toolsDir 'transform.mst' + +$packageArgs = @{ + packageName = $packageName + fileType = 'msi' + file = $fileLocation + silentArgs = "/qn /norestart TRANSFORMS=`"$mstFileLocation`"" + validExitCodes= @(0, 3010, 1641) + softwareName = 'Bob*' +} + +Install-ChocolateyInstallPackage @packageArgs +~~~ + +**EXAMPLE 5** + +~~~powershell +Install-ChocolateyInstallPackage 'bob' 'exe' '/S' "$(Split-Path -Parent $MyInvocation.MyCommand.Definition)\bob.exe" + +~~~ + +**EXAMPLE 6** + +~~~powershell + Install-ChocolateyInstallPackage -PackageName 'bob' -FileType 'exe' ` -SilentArgs '/S' ` -File "$(Split-Path -Parent $MyInvocation.MyCommand.Definition)\bob.exe" ` - -ValidExitCodes = @(0) + -ValidExitCodes @(0) ~~~ ## Inputs @@ -154,6 +195,24 @@ are not setting up a silent/unattended package. Please note that if you are submitting to the [community repository](https://chocolatey.org/packages), it is nearly a requirement for the package to be completely unattended. +When you are using this with an MSI, it will set up the arguments as +follows: `"C:\Full\Path\To\msiexec.exe" /i "$fileFullPath" $silentArgs`, +where `$fileFullPath` is `$file` or `$file64`, depending on what has been +decided to be used. Previous to 0.10.4, it will be just `$file` as +passing `$file64` would not have been available yet. + +When you use this with MSU, it is similar to MSI above in that it finds +the right executable to run. + +When you use this with executable installers, the `$fileFullPath` will +be `$file` (or `$file64` starting with 0.10.4+) and expects to be a full +path to the file. If the file is in the package, see the parameters for +"File" and "File64" to determine how you can get that path at runtime in +a deterministic way. SilentArgs is everything you call against that +file, as in `"$fileFullPath" $silentArgs"`. An example would be +`"c:\path\setup.exe" /S`, where `$fileFullPath = "c:\path\setup.exe"` +and `$silentArgs = "/S"`. + Property | Value ---------------------- | ----- Aliases | @@ -186,7 +245,7 @@ If embedding in the package, you can get it to the path with `"$(Split-Path -parent $MyInvocation.MyCommand.Definition)\\INSTALLER_FILE"` Provide this when you want to provide both 32-bit and 64-bit -installers or explicitly only a 64-bit installer (which will cause a package +installers or explicitly only a 64-bit installer (which will cause a package install failure on 32-bit systems). Property | Value diff --git a/docs/generated/HelpersInstallChocolateyPackage.md b/docs/generated/HelpersInstallChocolateyPackage.md index f935b7046b..89ee3a91e4 100644 --- a/docs/generated/HelpersInstallChocolateyPackage.md +++ b/docs/generated/HelpersInstallChocolateyPackage.md @@ -8,6 +8,10 @@ Installs software into "Programs and Features" based on a remote file download. Use Install-ChocolateyInstallPackage when local or embedded file. +Building packages for an organization or for use internally? You want to +use Install-ChocolateyINSTALLPackage instead of this method (see links +below). + ## Syntax ~~~powershell @@ -38,6 +42,10 @@ machine. Has error handling built in. If you are embedding the file(s) directly in the package (or do not need to download a file first), use Install-ChocolateyInstallPackage instead. +Building packages for an organization or for use internally? You want to +use Install-ChocolateyINSTALLPackage instead of this method +(see links below). + ## Notes This command will assert UAC/Admin privileges on the machine. @@ -93,12 +101,66 @@ Install-ChocolateyPackage @packageArgs ~~~powershell +$packageName= 'bob' +$toolsDir = "$(Split-Path -Parent $MyInvocation.MyCommand.Definition)" +$url = 'https://somewhere.com/file.msi' +$url64 = 'https://somewhere.com/file-x64.msi' + + +$packageArgs = @{ + packageName = $packageName + fileType = 'msi' + url = $url + url64bit = $url64 + silentArgs = "/qn /norestart MSIPROPERTY=`"true`"" + validExitCodes= @(0, 3010, 1641) + softwareName = 'Bob*' + checksum = '12345' + checksumType = 'sha256' + checksum64 = '123356' + checksumType64= 'sha256' +} + +Install-ChocolateyPackage @packageArgs +~~~ + +**EXAMPLE 3** + +~~~powershell + +$packageName= 'bob' +$toolsDir = "$(Split-Path -Parent $MyInvocation.MyCommand.Definition)" +$url = 'https://somewhere.com/file.msi' +$url64 = 'https://somewhere.com/file-x64.msi' +$urlTransform = 'https://somewhere.com/file.mst' +$mstFileLocation = Join-Path $toolsDir 'transform.mst' + +Get-ChocolateyWebFile -PackageName 'bob' ` + -Url $urlTransform -FileFullPath $mstFileLocation ` + -Checksum '1234' -ChecksumType 'sha256' + +$packageArgs = @{ + packageName = $packageName + fileType = 'msi' + file = $fileLocation + silentArgs = "/qn /norestart TRANSFORMS=`"$mstFileLocation`"" + validExitCodes= @(0, 3010, 1641) + softwareName = 'Bob*' +} + +Install-ChocolateyInstallPackage @packageArgs +~~~ + +**EXAMPLE 4** + +~~~powershell + Install-ChocolateyPackage 'StExBar' 'msi' '/quiet' ` 'http://stexbar.googlecode.com/files/StExBar-1.8.3.msi' ` 'http://stexbar.googlecode.com/files/StExBar64-1.8.3.msi' ~~~ -**EXAMPLE 3** +**EXAMPLE 5** ~~~powershell @@ -106,7 +168,7 @@ Install-ChocolateyPackage 'mono' 'exe' '/SILENT' ` 'http://somehwere/something.exe' -ValidExitCodes @(0,21) ~~~ -**EXAMPLE 4** +**EXAMPLE 6** ~~~powershell @@ -117,14 +179,14 @@ Install-ChocolateyPackage 'ruby.devkit' 'exe' '/SILENT' ` -checksum64 'ce99d873c1acc8bffc639bd4e764b849' ~~~ -**EXAMPLE 5** +**EXAMPLE 7** ~~~powershell Install-ChocolateyPackage 'bob' 'exe' '/S' 'https://somewhere/bob.exe' 'https://somewhere/bob-x64.exe' ~~~ -**EXAMPLE 6** +**EXAMPLE 8** ~~~powershell @@ -195,6 +257,22 @@ are not setting up a silent/unattended package. Please note that if you are submitting to the [community repository](https://chocolatey.org/packages), it is nearly a requirement for the package to be completely unattended. +When you are using this with an MSI, it will set up the arguments as +follows: +`"C:\Full\Path\To\msiexec.exe" /i "$downloadedFileFullPath" $silentArgs`, +where `$downloadedfileFullPath` is `$url` or `$url64`, depending on what +has been decided to be used. + +When you use this with MSU, it is similar to MSI above in that it finds +the right executable to run. + +When you use this with executable installers, the +`$downloadedFileFullPath` will also be `$url`/`$url64` SilentArgs is +everything you call against that file, as in +`"$fileFullPath" $silentArgs"`. An example would be +`"c:\path\setup.exe" /S`, where +`$downloadedfileFullPath = "c:\path\setup.exe"` and `$silentArgs = "/S"`. + Property | Value ---------------------- | ----- Aliases | diff --git a/docs/generated/HelpersInstallChocolateyWindowsService.md b/docs/generated/HelpersInstallChocolateyWindowsService.md new file mode 100644 index 0000000000..4d363c0ed5 --- /dev/null +++ b/docs/generated/HelpersInstallChocolateyWindowsService.md @@ -0,0 +1,180 @@ +# Install-ChocolateyWindowsService + +**NOTE**: This function requires a Chocolatey for Business License to use. + + +Install-ChocolateyWindowsService [-Name] [-ServiceExecutablePath] [[-Username] ] [-Password ] [-DisplayName ] [-Description ] [-StartupType ] [-DoNotStartService] [-DoNotReinstallService] [] + + +## Syntax + +~~~powershell +Install-ChocolateyWindowsService ` + -Name ` + -ServiceExecutablePath ` + [-Username ] ` + [-Password ] ` + [-DisplayName ] ` + [-Description ] ` + [-StartupType {Unknown | Manual | Automatic | Disabled}] ` + [-DoNotStartService] ` + [-DoNotReinstallService] +~~~ + + + +## Aliases + +None + +## Inputs + +None + +## Outputs + +None + +## Parameters + +### -Description [<string>] +The description of the service. + + +Property | Value +---------------------- | --------------------- +Aliases | +Required? | false +Position? | Named +Default Value | +Accept Pipeline Input? | true (ByPropertyName) + +### -DisplayName [<string>] +The display name of the service. + + +Property | Value +---------------------- | --------------------- +Aliases | +Required? | false +Position? | Named +Default Value | +Accept Pipeline Input? | true (ByPropertyName) + +### -DoNotReinstallService +Do not uninstall/restart service. This is for advanced scenarios when you need +to deploy a newer version of a service and control when the restart happens over +to the newly deployed code. + + +Property | Value +---------------------- | --------------------- +Aliases | +Required? | false +Position? | Named +Default Value | +Accept Pipeline Input? | true (ByPropertyName) + +### -DoNotStartService +Do not start service after install. This keeps the service from starting up when +installing/upgrading. + + +Property | Value +---------------------- | --------------------- +Aliases | +Required? | false +Position? | Named +Default Value | +Accept Pipeline Input? | true (ByPropertyName) + +### -Name <string> +The name of the service to install. + + +Property | Value +---------------------- | --------------------- +Aliases | +Required? | true +Position? | 0 +Default Value | +Accept Pipeline Input? | true (ByPropertyName) + +### -Password [<string>] + +The password for the service - defaults to empty. If the user is not a built-in +account like LocalSystem and the user name is provided without a password being +provided, the password will automatically be a Chocolatey Managed Password. + +When Chocolatey manages the password for an account, it creates a very complex +password: + +* 32 characters long +* Uppercase, lowercase, numbers, and symbols to meet very stringent complexity + requirements +* Different for every machine +* Completely unguessable + +No one at Chocolatey Software could even tell you what the password is for a +particular machine without local access. + + +Property | Value +---------------------- | --------------------- +Aliases | +Required? | false +Position? | Named +Default Value | +Accept Pipeline Input? | true (ByPropertyName) + +### -ServiceExecutablePath <string> +The full path (absolute path) to the service executable file. + + +Property | Value +---------------------- | --------------------- +Aliases | +Required? | true +Position? | 1 +Default Value | +Accept Pipeline Input? | true (ByPropertyName) + +### -StartupType [<ChocolateyWindowsServiceStartupType>] +The startup type of the service. Defaults to Automatic. + + +Property | Value +---------------------- | --------------------- +Aliases | +Required? | false +Position? | Named +Default Value | +Accept Pipeline Input? | true (ByPropertyName) + +### -Username [<string>] +The username for the service - defaults to LocalSystem (SYSTEM). If the user +does not exist, the user will be created. When a user is specified for a +service, the following things will also occur as part of this function: + +* User added to Administrators group +* User given privilege/right to run as a service (SeServiceLogonRight) +* User given privilege/right to log on as a batch (SeBatchLogonRight) +* User given privilege/right to log on interactively (SeInteractiveLogonRight) +* User given privilege/right to log on network (SeNetworkLogonRight) + + + +Property | Value +---------------------- | --------------------- +Aliases | user +Required? | false +Position? | 2 +Default Value | +Accept Pipeline Input? | true (ByPropertyName) + + + + +[[Function Reference|HelpersReference]] + +***NOTE:*** This documentation has been automatically generated from licensed code. diff --git a/docs/generated/HelpersStartChocolateyProcessAsAdmin.md b/docs/generated/HelpersStartChocolateyProcessAsAdmin.md index e6346e606f..81eb797ebc 100644 --- a/docs/generated/HelpersStartChocolateyProcessAsAdmin.md +++ b/docs/generated/HelpersStartChocolateyProcessAsAdmin.md @@ -80,7 +80,7 @@ Start-ChocolateyProcessAsAdmin "& `'$psFile`'" # This also works for cmd and is required if you have any spaces in the paths within your command $appPath = "$env:ProgramFiles\myapp" $cmdBatch = "/c `"$appPath\bin\installmyappservice.bat`"" -Start-ChocolateyProcessAsAdmin $cmdBatch cmd +Start-ChocolateyProcessAsAdmin $cmdBatch cmd # or more explicitly Start-ChocolateyProcessAsAdmin -Statements $cmdBatch -ExeToRun "cmd.exe" ~~~ diff --git a/docs/generated/HelpersStartChocolateyWindowsService.md b/docs/generated/HelpersStartChocolateyWindowsService.md new file mode 100644 index 0000000000..5483bafb9d --- /dev/null +++ b/docs/generated/HelpersStartChocolateyWindowsService.md @@ -0,0 +1,49 @@ +# Start-ChocolateyWindowsService + +**NOTE**: This function requires a Chocolatey for Business License to use. + + +Start-ChocolateyWindowsService [-Name] [] + + +## Syntax + +~~~powershell +Start-ChocolateyWindowsService ` + -Name +~~~ + + + +## Aliases + +None + +## Inputs + +None + +## Outputs + +None + +## Parameters + +### -Name <string> +The name of the service to start. Will throw an error if it doesn't exist. + + +Property | Value +---------------------- | --------------------- +Aliases | +Required? | true +Position? | 0 +Default Value | +Accept Pipeline Input? | true (ByPropertyName) + + + + +[[Function Reference|HelpersReference]] + +***NOTE:*** This documentation has been automatically generated from licensed code. diff --git a/docs/generated/HelpersStopChocolateyWindowsService.md b/docs/generated/HelpersStopChocolateyWindowsService.md new file mode 100644 index 0000000000..7156fbd181 --- /dev/null +++ b/docs/generated/HelpersStopChocolateyWindowsService.md @@ -0,0 +1,49 @@ +# Stop-ChocolateyWindowsService + +**NOTE**: This function requires a Chocolatey for Business License to use. + + +Stop-ChocolateyWindowsService [-Name] [] + + +## Syntax + +~~~powershell +Stop-ChocolateyWindowsService ` + -Name +~~~ + + + +## Aliases + +None + +## Inputs + +None + +## Outputs + +None + +## Parameters + +### -Name <string> +The name of the service to stop. Will not throw an error if it doesn't exist. + + +Property | Value +---------------------- | --------------------- +Aliases | +Required? | true +Position? | 0 +Default Value | +Accept Pipeline Input? | true (ByPropertyName) + + + + +[[Function Reference|HelpersReference]] + +***NOTE:*** This documentation has been automatically generated from licensed code. diff --git a/docs/generated/HelpersUninstallChocolateyWindowsService.md b/docs/generated/HelpersUninstallChocolateyWindowsService.md new file mode 100644 index 0000000000..1d031229e3 --- /dev/null +++ b/docs/generated/HelpersUninstallChocolateyWindowsService.md @@ -0,0 +1,49 @@ +# Uninstall-ChocolateyWindowsService + +**NOTE**: This function requires a Chocolatey for Business License to use. + + +Uninstall-ChocolateyWindowsService [-Name] [] + + +## Syntax + +~~~powershell +Uninstall-ChocolateyWindowsService ` + -Name +~~~ + + + +## Aliases + +None + +## Inputs + +None + +## Outputs + +None + +## Parameters + +### -Name <string> +The name of the service to uninstall. + + +Property | Value +---------------------- | --------------------- +Aliases | +Required? | true +Position? | 0 +Default Value | +Accept Pipeline Input? | true (ByPropertyName) + + + + +[[Function Reference|HelpersReference]] + +***NOTE:*** This documentation has been automatically generated from licensed code. diff --git a/lib/NAnt/NAnt.exe.config b/lib/NAnt/NAnt.exe.config index b590ff08c0..d9542dd09c 100644 --- a/lib/NAnt/NAnt.exe.config +++ b/lib/NAnt/NAnt.exe.config @@ -3260,12 +3260,8 @@ - - - - - + diff --git a/lib/NuGet-Chocolatey/strongname.cmd b/lib/NuGet-Chocolatey/strongname.cmd index 0c15c2b850..ea14854b59 100644 --- a/lib/NuGet-Chocolatey/strongname.cmd +++ b/lib/NuGet-Chocolatey/strongname.cmd @@ -10,4 +10,7 @@ pause mkdir %DIR%\output %DIR%..\ILMerge\ILMerge.exe NuGet.Core.dll /keyfile:%DIR%..\..\chocolatey.snk /out:%DIR%\output\NuGet.Core.dll /targetplatform:v4,"%ProgramFiles(x86)%\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0" /log:%DIR%ILMerge.DELETE.log /allowDup -REM %DIR%..\ILMerge\ILMerge.exe NuGet.Core.dll /keyfile:%DIR%..\..\chocolatey.snk /out:%DIR%NuGet.Core.dll /targetplatform:v4,"%ProgramFiles(x86)%\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0" /log:%DIR%ILMerge.DELETE.log /ndebug /allowDup \ No newline at end of file +REM %DIR%..\ILMerge\ILMerge.exe NuGet.Core.dll /keyfile:%DIR%..\..\chocolatey.snk /out:%DIR%NuGet.Core.dll /targetplatform:v4,"%ProgramFiles(x86)%\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0" /log:%DIR%ILMerge.DELETE.log /ndebug /allowDup + +echo Copy the files from the output directory up to this directory and delete everything but this file, NuGet.Core.dll and NuGet.Core.pdb. +pause \ No newline at end of file diff --git a/lib/Rhino.Licensing/Rhino.Licensing.dll b/lib/Rhino.Licensing/Rhino.Licensing.dll index 4e27fb58f6..69aaaaddc6 100644 Binary files a/lib/Rhino.Licensing/Rhino.Licensing.dll and b/lib/Rhino.Licensing/Rhino.Licensing.dll differ diff --git a/nuget/chocolatey.lib/chocolatey.lib.nuspec b/nuget/chocolatey.lib/chocolatey.lib.nuspec index 19b0e6e4e0..1b6ae75bbd 100644 --- a/nuget/chocolatey.lib/chocolatey.lib.nuspec +++ b/nuget/chocolatey.lib/chocolatey.lib.nuspec @@ -32,43 +32,6 @@ This is the Chocolatey Library (API / DLL) package which allows Chocolatey to be See all - https://github.com/chocolatey/choco/blob/stable/CHANGELOG.md - -## 0.10.8 - -With this release, Package Parameters are fully supported from both the user side and the packaging side. Check out [the documentation](https://chocolatey.org/docs/helpers-get-packageparameters) and check out the [walkthrough](https://chocolatey.org/docs/how-to-parse-package-parameters-argument) on how to use package parameters in your packaging. Note if you are pushing packages to the community repository, you must continue to take a dependency on the `chocolatey-core.extension` as a polyfill for older versions until at least six months after a new feature is released. - -What you can do with logging has greatly increased your ability to have more power over how it works and deeper output to determine errors (we've expanded `--trace` [#1379](https://github.com/chocolatey/choco/issues/1379)). This release also gives packagers and users more power when working with the AutoUninstaller - opt-out ([#1257](https://github.com/chocolatey/choco/issues/1257)) and passing arguments to the uninstaller ([#1133](https://github.com/chocolatey/choco/issues/1133)). - -Another noteworthy addition is the ability to pass custom properties to Choco like you would do with `nuget pack`, allowing better integration with packages you manage in Visual Studio ([#1313](https://github.com/chocolatey/choco/issues/1313)). - -### FEATURES - -* Function - Get-PackageParameters - see [#1393](https://github.com/chocolatey/choco/issues/1393) - -### BUG FIXES - - * Fix - "Value cannot be null" running choco outdated - see [#1383](https://github.com/chocolatey/choco/issues/1383) - * Fix - Package parameters are ignored on when install directly points to nupkg/nuspec - see [#1155](https://github.com/chocolatey/choco/issues/1155) - * Fix - Logging - log4net Logger location (the code location logging) is incorrect - see [#1377](https://github.com/chocolatey/choco/issues/1377) - * [API] Fix - GetConfiguration() sets the configuration for other calls - see [#1347](https://github.com/chocolatey/choco/issues/1347) - * [API] Fix - Pro/Business - Self-Service information not returned for sources - see [#1394](https://github.com/chocolatey/choco/issues/1394) - * [API] Fix - Config output is being set to Regular Output - see [#1396](https://github.com/chocolatey/choco/issues/1396) - -### IMPROVEMENTS - - * [Security][POSH Host] Implement Read-Host -AsSecureString- see [#1335](https://github.com/chocolatey/choco/issues/1335) - * AutoUninstaller - Opt-out from packages - see [#1257](https://github.com/chocolatey/choco/issues/1257) - * AutoUninstaller - Use Uninstall Arguments and Override Arguments if provided - see [#1133](https://github.com/chocolatey/choco/issues/1133) - * pack - Pass arbitrary properties like nuget pack - see [#1313](https://github.com/chocolatey/choco/issues/1313) - * list - Sub-command should not require admin access (and not prompt) - see [#1353](https://github.com/chocolatey/choco/issues/1353) - * new - Package Templates - Do not treat binaries in template as text files - see [#1385](https://github.com/chocolatey/choco/issues/1385) - * new - Package Templates - Add more helpful items, like a todo list to the default template - see [#1386](https://github.com/chocolatey/choco/issues/1386) - * Document how to pass multiple sources on CLI - see [#1331](https://github.com/chocolatey/choco/issues/1331) - * Logging - Trace output should provide deep logging information - see [#1379](https://github.com/chocolatey/choco/issues/1379) - * Logging - Allow external log4net config file - see [#1378](https://github.com/chocolatey/choco/issues/1378) - * Logging - Allow capturing output to an additional log file - see [#1376](https://github.com/chocolatey/choco/issues/1376) - * [API] Make log4net dependency less restrictive - see [#1395](https://github.com/chocolatey/choco/issues/1395) - * Pro/Business - source/list - Support for Admin Only Sources - Limit non-admin list to self service only - see [#1265](https://github.com/chocolatey/choco/issues/1265) diff --git a/nuget/chocolatey/chocolatey.nuspec b/nuget/chocolatey/chocolatey.nuspec index 6505a73a17..a641cd4f98 100644 --- a/nuget/chocolatey/chocolatey.nuspec +++ b/nuget/chocolatey/chocolatey.nuspec @@ -62,43 +62,6 @@ In that mess there is a link to the [PowerShell Chocolatey module reference](htt See all - https://github.com/chocolatey/choco/blob/stable/CHANGELOG.md - -## 0.10.8 - -With this release, Package Parameters are fully supported from both the user side and the packaging side. Check out [the documentation](https://chocolatey.org/docs/helpers-get-packageparameters) and check out the [walkthrough](https://chocolatey.org/docs/how-to-parse-package-parameters-argument) on how to use package parameters in your packaging. Note if you are pushing packages to the community repository, you must continue to take a dependency on the `chocolatey-core.extension` as a polyfill for older versions until at least six months after a new feature is released. - -What you can do with logging has greatly increased your ability to have more power over how it works and deeper output to determine errors (we've expanded `--trace` [#1379](https://github.com/chocolatey/choco/issues/1379)). This release also gives packagers and users more power when working with the AutoUninstaller - opt-out ([#1257](https://github.com/chocolatey/choco/issues/1257)) and passing arguments to the uninstaller ([#1133](https://github.com/chocolatey/choco/issues/1133)). - -Another noteworthy addition is the ability to pass custom properties to Choco like you would do with `nuget pack`, allowing better integration with packages you manage in Visual Studio ([#1313](https://github.com/chocolatey/choco/issues/1313)). - -### FEATURES - -* Function - Get-PackageParameters - see [#1393](https://github.com/chocolatey/choco/issues/1393) - -### BUG FIXES - - * Fix - "Value cannot be null" running choco outdated - see [#1383](https://github.com/chocolatey/choco/issues/1383) - * Fix - Package parameters are ignored on when install directly points to nupkg/nuspec - see [#1155](https://github.com/chocolatey/choco/issues/1155) - * Fix - Logging - log4net Logger location (the code location logging) is incorrect - see [#1377](https://github.com/chocolatey/choco/issues/1377) - * [API] Fix - GetConfiguration() sets the configuration for other calls - see [#1347](https://github.com/chocolatey/choco/issues/1347) - * [API] Fix - Pro/Business - Self-Service information not returned for sources - see [#1394](https://github.com/chocolatey/choco/issues/1394) - * [API] Fix - Config output is being set to Regular Output - see [#1396](https://github.com/chocolatey/choco/issues/1396) - -### IMPROVEMENTS - - * [Security][POSH Host] Implement Read-Host -AsSecureString- see [#1335](https://github.com/chocolatey/choco/issues/1335) - * AutoUninstaller - Opt-out from packages - see [#1257](https://github.com/chocolatey/choco/issues/1257) - * AutoUninstaller - Use Uninstall Arguments and Override Arguments if provided - see [#1133](https://github.com/chocolatey/choco/issues/1133) - * pack - Pass arbitrary properties like nuget pack - see [#1313](https://github.com/chocolatey/choco/issues/1313) - * list - Sub-command should not require admin access (and not prompt) - see [#1353](https://github.com/chocolatey/choco/issues/1353) - * new - Package Templates - Do not treat binaries in template as text files - see [#1385](https://github.com/chocolatey/choco/issues/1385) - * new - Package Templates - Add more helpful items, like a todo list to the default template - see [#1386](https://github.com/chocolatey/choco/issues/1386) - * Document how to pass multiple sources on CLI - see [#1331](https://github.com/chocolatey/choco/issues/1331) - * Logging - Trace output should provide deep logging information - see [#1379](https://github.com/chocolatey/choco/issues/1379) - * Logging - Allow external log4net config file - see [#1378](https://github.com/chocolatey/choco/issues/1378) - * Logging - Allow capturing output to an additional log file - see [#1376](https://github.com/chocolatey/choco/issues/1376) - * [API] Make log4net dependency less restrictive - see [#1395](https://github.com/chocolatey/choco/issues/1395) - * Pro/Business - source/list - Support for Admin Only Sources - Limit non-admin list to self service only - see [#1265](https://github.com/chocolatey/choco/issues/1265) diff --git a/nuget/chocolatey/tools/chocolateysetup.psm1 b/nuget/chocolatey/tools/chocolateysetup.psm1 index f9387b27fa..6dd5334074 100644 --- a/nuget/chocolatey/tools/chocolateysetup.psm1 +++ b/nuget/chocolatey/tools/chocolateysetup.psm1 @@ -126,6 +126,7 @@ Creating Chocolatey folders if they do not already exist. Add-ChocolateyProfile Install-DotNet4IfMissing + Invoke-Chocolatey-Initial if ($env:ChocolateyExitCode -eq $null -or $env:ChocolateyExitCode -eq '') { $env:ChocolateyExitCode = 0 } @@ -599,10 +600,14 @@ function Add-ChocolateyProfile { #"" | Out-File $profileFile -Encoding UTF8 } - $signature = Get-AuthenticodeSignature $profile - if ($signature.Status -ne 'NotSigned') { - Write-Warning "Not setting tab completion: File is Authenticode signed at '$profile'." - return + # Check authenticode, but only if file is greater than 4 bytes + $profileFileInfo = New-Object System.IO.FileInfo($profileFile) + if ($profileFileInfo.Length -ge 5) { + $signature = Get-AuthenticodeSignature $profile + if ($signature.Status -ne 'NotSigned') { + Write-Warning "Not setting tab completion: File is Authenticode signed at '$profile'." + return + } } $profileInstall = @' @@ -700,4 +705,17 @@ param( } } +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 Chocolately at this time. It is likely that .Net Framework installation requires a system reboot" + } +} + Export-ModuleMember -function Initialize-Chocolatey; diff --git a/src/chocolatey.console/Program.cs b/src/chocolatey.console/Program.cs index a4359948b9..b00fcb7d4a 100644 --- a/src/chocolatey.console/Program.cs +++ b/src/chocolatey.console/Program.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -32,7 +32,9 @@ namespace chocolatey.console using infrastructure.logging; using infrastructure.registration; using infrastructure.tolerance; +#if !NoResources using resources; +#endif using Assembly = infrastructure.adapters.Assembly; using Console = System.Console; using Environment = System.Environment; @@ -72,7 +74,13 @@ private static void Main(string[] args) license, warning => { warnings.Add(warning); } ); - + + if (config.Features.LogWithoutColor) + { + ApplicationParameters.Log4NetConfigurationResource = @"chocolatey.infrastructure.logging.log4net.nocolor.config.xml"; + Log4NetAppenderConfiguration.configure(loggingLocation, excludeLoggerNames: ChocolateyLoggers.Trace.to_string()); + } + if (!string.IsNullOrWhiteSpace(config.AdditionalLogFileLocation)) { Log4NetAppenderConfiguration.configure_additional_log_file(config.AdditionalLogFileLocation); @@ -130,8 +138,9 @@ private static void Main(string[] args) "redirects", "tools" }; +#if !NoResources AssemblyFileExtractor.extract_all_resources_to_relative_directory(fileSystem, Assembly.GetAssembly(typeof(ChocolateyResourcesAssembly)), ApplicationParameters.InstallLocation, folders, ApplicationParameters.ChocolateyFileResources, throwError: false); - +#endif var application = new ConsoleApplication(); application.run(args, config, container); } @@ -248,4 +257,4 @@ private static void pause_execution_if_debug() #endif } } -} \ No newline at end of file +} diff --git a/src/chocolatey.console/Properties/AssemblyInfo.cs b/src/chocolatey.console/Properties/AssemblyInfo.cs index 13497f37a0..45cf23b4fa 100644 --- a/src/chocolatey.console/Properties/AssemblyInfo.cs +++ b/src/chocolatey.console/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey.console/chocolatey.console.csproj b/src/chocolatey.console/chocolatey.console.csproj index df0fb920b5..7181d95956 100644 --- a/src/chocolatey.console/chocolatey.console.csproj +++ b/src/chocolatey.console/chocolatey.console.csproj @@ -78,6 +78,26 @@ true + + bin\x86\NoResources\ + TRACE;NoResources + true + true + x86 + prompt + MinimumRecommendedRules.ruleset + + + bin\NoResources\ + TRACE;NoResources + true + true + AnyCPU + prompt + MinimumRecommendedRules.ruleset + false + false + False @@ -124,11 +144,17 @@ + + + + + {AF584111-FE32-448D-A1D0-63217AF8B43C} + chocolatey.resources + + + + - - {AF584111-FE32-448D-A1D0-63217AF8B43C} - chocolatey.resources - {5563DC61-35FD-4FAB-B331-9AE1FDB23F80} chocolatey @@ -148,4 +174,4 @@ --> - \ No newline at end of file + diff --git a/src/chocolatey.resources/ChocolateyResourcesAssembly.cs b/src/chocolatey.resources/ChocolateyResourcesAssembly.cs index aec3694192..365d468592 100644 --- a/src/chocolatey.resources/ChocolateyResourcesAssembly.cs +++ b/src/chocolatey.resources/ChocolateyResourcesAssembly.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey.resources/Properties/AssemblyInfo.cs b/src/chocolatey.resources/Properties/AssemblyInfo.cs index 516807ca0c..1099eacdde 100644 --- a/src/chocolatey.resources/Properties/AssemblyInfo.cs +++ b/src/chocolatey.resources/Properties/AssemblyInfo.cs @@ -1,4 +1,5 @@ -// Copyright © 2011 - Present RealDimensions Software, LLC +// Copyright © 2017 - 2018 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. diff --git a/src/chocolatey.resources/chocolatey.resources.csproj b/src/chocolatey.resources/chocolatey.resources.csproj index e9c01bcb5c..2db35b6dd1 100644 --- a/src/chocolatey.resources/chocolatey.resources.csproj +++ b/src/chocolatey.resources/chocolatey.resources.csproj @@ -30,6 +30,14 @@ prompt 4 + + bin\NoResources\ + TRACE + true + AnyCPU + prompt + MinimumRecommendedRules.ruleset + @@ -174,4 +182,4 @@ --> - \ No newline at end of file + diff --git a/src/chocolatey.resources/helpers/ChocolateyTabExpansion.ps1 b/src/chocolatey.resources/helpers/ChocolateyTabExpansion.ps1 index 27986d19e4..23a27eea87 100644 --- a/src/chocolatey.resources/helpers/ChocolateyTabExpansion.ps1 +++ b/src/chocolatey.resources/helpers/ChocolateyTabExpansion.ps1 @@ -40,14 +40,15 @@ $proListOptions = " --audit" $proInstallUpgradeOptions = " --install-directory='' --max-download-rate= --install-arguments-sensitive= --package-parameters-sensitive= --skip-download-cache --use-download-cache --skip-virus-check --virus-check --virus-positives-minimum=" $proNewOptions = " --file='' --build-package --file64='' --from-programs-and-features --use-original-location --keep-remote --url='' --url64='' --checksum= --checksum64= --checksumtype= --pause-on-error" $proUninstallOptions = " --from-programs-and-features" +$proPinOptions = " --note=''" $commandOptions = @{ list = "--lo --id-only --pre --exact --by-id-only --id-starts-with --detailed --approved-only --not-broken --source='' --user= --password= --local-only --prerelease --include-programs --page= --page-size= --order-by-popularity --download-cache-only" + $proListOptions + $allcommands search = "--pre --exact --by-id-only --id-starts-with --detailed --approved-only --not-broken --source='' --user= --password= --local-only --prerelease --include-programs --page= --page-size= --order-by-popularity --download-cache-only" + $allcommands info = "--pre --lo --source='' --user= --password= --local-only --prerelease" + $allcommands install = "-y -whatif -? --pre --version= --params='' --install-arguments='' --override-arguments --ignore-dependencies --source='' --source='windowsfeatures' --source='webpi' --user= --password= --prerelease --forcex86 --not-silent --package-parameters='' --allow-downgrade --force-dependencies --require-checksums --use-package-exit-codes --ignore-package-exit-codes --skip-automation-scripts --allow-multiple-versions --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" + $proInstallUpgradeOptions + $allcommands - pin = "--name= --version= -?" + $allcommands - outdated = "-? --source='' --user= --password= --ignore-pinned" + $allcommands + pin = "--name= --version= -?" + $proPinOptions + $allcommands + outdated = "-? --source='' --user= --password= --ignore-pinned --ignore-unfound" + $allcommands upgrade = "-y -whatif -? --pre --version= --except='' --params='' --install-arguments='' --override-arguments --ignore-dependencies --source='' --source='windowsfeatures' --source='webpi' --user= --password= --prerelease --forcex86 --not-silent --package-parameters='' --allow-downgrade --allow-multiple-versions --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" + $proInstallUpgradeOptions + $allcommands uninstall = "-y -whatif -? --force-dependencies --remove-dependencies --all-versions --source='windowsfeatures' --source='webpi' --version= --uninstall-arguments='' --override-arguments --not-silent --params='' --package-parameters='' --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" + $proUninstallOptions + $allcommands new = "--template-name= --output-directory='' --automaticpackage --version= --maintainer='' packageversion= maintainername='' maintainerrepo='' installertype= url='' url64='' silentargs='' --use-built-in-template -?" + $proNewOptions + $allcommands @@ -58,7 +59,7 @@ $commandOptions = @{ feature = "--name= -?" + $allcommands apikey = "--source='' --api-key= -?" + $allcommands download = "--internalize --ignore-dependencies --resources-location= --download-location= --outputdirectory= --source='' --version='' --prerelease --user= --password= --cert='' --certpassword= --append-use-original-location --recompile -?" + $allcommands - sync = "--output-directory= --id= -?" + $allcommands + sync = "--output-directory= --id= --package-id= -?" + $allcommands } try { diff --git a/src/chocolatey.resources/helpers/chocolateyInstaller.psm1 b/src/chocolatey.resources/helpers/chocolateyInstaller.psm1 index 8bb74e3367..721631e835 100644 --- a/src/chocolatey.resources/helpers/chocolateyInstaller.psm1 +++ b/src/chocolatey.resources/helpers/chocolateyInstaller.psm1 @@ -54,8 +54,6 @@ Export-ModuleMember -Function * -Alias * -Cmdlet * $extensionsPath = Join-Path "$helpersPath" '..\extensions' if (Test-Path($extensionsPath)) { Write-Debug 'Loading community extensions' - #Resolve-Path $extensionsPath\**\*\*.psm1 | % { Write-Debug "Importing `'$_`'"; Import-Module $_.ProviderPath } - Get-ChildItem $extensionsPath -recurse -filter "*.psm1" | Select -ExpandProperty FullName | % { Write-Debug "Importing `'$_`'"; Import-Module $_; } Get-ChildItem $extensionsPath -recurse -filter "*.dll" | Select -ExpandProperty FullName | % { $path = $_; if ($path.Contains("extensions\chocolatey\lib-synced")) { continue } @@ -72,6 +70,8 @@ if (Test-Path($extensionsPath)) { } } } + #Resolve-Path $extensionsPath\**\*\*.psm1 | % { Write-Debug "Importing `'$_`'"; Import-Module $_.ProviderPath } + Get-ChildItem $extensionsPath -recurse -filter "*.psm1" | Select -ExpandProperty FullName | % { Write-Debug "Importing `'$_`'"; Import-Module $_; } } # todo: explore removing this for a future version diff --git a/src/chocolatey.resources/helpers/functions/Get-ChocolateyUnzip.ps1 b/src/chocolatey.resources/helpers/functions/Get-ChocolateyUnzip.ps1 index 5255540b85..8d1d42fc96 100644 --- a/src/chocolatey.resources/helpers/functions/Get-ChocolateyUnzip.ps1 +++ b/src/chocolatey.resources/helpers/functions/Get-ChocolateyUnzip.ps1 @@ -215,14 +215,16 @@ param( } Write-Debug "7z exit code: $exitCode" + + $errorMessageAddendum = " This is most likely an issue with the '$env:chocolateyPackageName' package and not with Chocolatey itself. Please follow up with the package maintainer(s) directly." switch ($exitCode) { 0 { break } - 1 { throw 'Some files could not be extracted' } # this one is returned e.g. for access denied errors - 2 { throw '7-Zip encountered a fatal error while extracting the files' } - 7 { throw '7-Zip command line error' } - 8 { throw '7-Zip out of memory' } - 255 { throw 'Extraction cancelled by the user' } - default { throw "7-Zip signalled an unknown error (code $exitCode)" } + 1 { throw 'Some files could not be extracted.' + $errorMessageAddendum } # this one is returned e.g. for access denied errors + 2 { throw '7-Zip encountered a fatal error while extracting the files.' + $errorMessageAddendum } + 7 { throw ('7-Zip command line error.' + $errorMessageAddendum) } + 8 { throw '7-Zip out of memory.' + $errorMessageAddendum } + 255 { throw 'Extraction cancelled by the user.' + $errorMessageAddendum } + default { throw "7-Zip signalled an unknown error (code $exitCode)" + $errorMessageAddendum} } $env:ChocolateyPackageInstallLocation = $destination diff --git a/src/chocolatey.resources/helpers/functions/Get-ChocolateyWebFile.ps1 b/src/chocolatey.resources/helpers/functions/Get-ChocolateyWebFile.ps1 index 2aad543f8a..246cef1248 100644 --- a/src/chocolatey.resources/helpers/functions/Get-ChocolateyWebFile.ps1 +++ b/src/chocolatey.resources/helpers/functions/Get-ChocolateyWebFile.ps1 @@ -305,7 +305,7 @@ param( try { $headers = Get-WebHeaders -Url $url -ErrorAction "Stop" } catch { - if ($host.Version -lt (New-Object 'Version' 3,0)) { + if ($PSVersionTable.PSVersion -lt (New-Object 'Version' 3,0)) { Write-Debug "Converting Security Protocol to SSL3 only for Powershell v2" # this should last for the entire duration $originalProtocol = [System.Net.ServicePointManager]::SecurityProtocol diff --git a/src/chocolatey.resources/helpers/functions/Get-EnvironmentVariable.ps1 b/src/chocolatey.resources/helpers/functions/Get-EnvironmentVariable.ps1 index e7d9d35187..726ea1f0f0 100644 --- a/src/chocolatey.resources/helpers/functions/Get-EnvironmentVariable.ps1 +++ b/src/chocolatey.resources/helpers/functions/Get-EnvironmentVariable.ps1 @@ -65,6 +65,7 @@ param( ) # 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) diff --git a/src/chocolatey.resources/helpers/functions/Get-PackageParameters.ps1 b/src/chocolatey.resources/helpers/functions/Get-PackageParameters.ps1 index 62ca7e58e0..7fddc410f1 100644 --- a/src/chocolatey.resources/helpers/functions/Get-PackageParameters.ps1 +++ b/src/chocolatey.resources/helpers/functions/Get-PackageParameters.ps1 @@ -67,6 +67,12 @@ compatibility with `chocolatey-core.extension`, use `:`. For example `-Parameters "/ITEM1:value /ITEM2:value with spaces" +NOTE: In 0.10.9+, to maintain compatibility with the prior art of the +chocolatey-core.extension method, quotes and apostrophes surrounding +parameter values will be removed. When the param is used, those items +can be added back if desired, but it's most important to ensure that +existing packages are compatible on upgrade. + .PARAMETER IgnoredArguments Allows splatting with arguments that do not apply and future expansion. Do not use directly. @@ -94,12 +100,12 @@ if (!$pp['LICENSE']) { $pp['LICENSE'] = '1234' } .EXAMPLE > $pp = Get-PackageParameters -# Requires 0.10.8 for Read-Host -AsSecureString -if (!$pp['Password']) { $pp['Password'] = Read-Host "Enter password for $userName:" -AsSecureString} +if (!$pp['UserName']) { $pp['UserName'] = "$env:UserName" } +# Requires Choocolatey v0.10.8+ for Read-Host -AsSecureString +if (!$pp['Password']) { $pp['Password'] = Read-Host "Enter password for $($pp['UserName']):" -AsSecureString} # fail the install/upgrade if not value is not determined if (!$pp['Password']) { throw "Package needs Password to install, that must be provided in params or in prompt." } - .EXAMPLE > # Pass in your own values @@ -125,6 +131,7 @@ param( Write-FunctionCallLogMessage -Invocation $MyInvocation -Parameters $PSBoundParameters $useDefaultParameters = $false + $loggingAllowed = $true $paramStrings = @($parameters) if (!$parameters -or $parameters -eq '') { @@ -132,6 +139,10 @@ param( # if we are using default parameters, we are going to loop over two items Write-Debug 'Parsing $env:ChocolateyPackageParameters and $env:ChocolateyPackageParametersSensitive for parameters' $paramStrings = @("$env:ChocolateyPackageParameters","$env:ChocolateyPackageParametersSensitive") + if ($env:ChocolateyPackageParametersSensitive) { + Write-Debug "Sensitive parameters detected, no logging of parameters." + $loggingAllowed = $false + } } $paramHash = @{} @@ -139,30 +150,21 @@ param( foreach ($paramString in $paramStrings) { if (!$paramString -or $paramString -eq '') { continue } - # split on "/" - $paramArray = $paramString.Split('/', [System.StringSplitOptions]::RemoveEmptyEntries) - if ($paramArray -eq $null -or $paramArray -eq @()) { continue } - - foreach ($paramItem in $paramArray.GetEnumerator()) { - if (!$paramItem -or $paramItem -eq '') { continue } + Select-String '(?:^|\s+)\/(?[^\:\=\s)]+)(?:(?:\:|=){1}(?:\''|\"){0,1}(?.*?)(?:\''|\"){0,1}(?:(?=\s+\/)|$))?' -Input $paramString -AllMatches | % { $_.Matches } | % { + if (!$_) { continue } #Posh v2 issue? + $paramItemName = ($_.Groups["ItemKey"].Value).Trim() + $paramItemValue = ($_.Groups["ItemValue"].Value).Trim() + if (!$paramItemValue -or $paramItemValue -eq '') { $paramItemValue = $true } - # split on : and =, but only allow a total split of two - $paramItemPair = $paramItem.Split(':', 2, [System.StringSplitOptions]::RemoveEmptyEntries) - if ($paramItemPair -eq $null -or $paramItemPair -eq @()) { continue } - if ($paramItemPair.Length -eq 1 -and $paramItemPair[0].Contains('=')) { - $paramItemPair = $paramItem.Split('=', 2, [System.StringSplitOptions]::RemoveEmptyEntries) - } - - $paramItemName = $paramItemPair[0].Trim() - $paramItemValue = $true - if ($paramItemPair.Length -ne 1) { - $paramItemValue = $paramItemPair[1].Trim() - } - - Write-Debug "Adding package param '$paramItemName'='$paramItemValue'" + if ($loggingAllowed) { Write-Debug "Adding package param '$paramItemName'='$paramItemValue'" } $paramHash[$paramItemName] = $paramItemValue } } $paramHash } + +# override Get-PackageParameters in chocolatey-core.extension package +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 diff --git a/src/chocolatey.resources/helpers/functions/Install-ChocolateyEnvironmentVariable.ps1 b/src/chocolatey.resources/helpers/functions/Install-ChocolateyEnvironmentVariable.ps1 index 1c58517d65..a105818fbc 100644 --- a/src/chocolatey.resources/helpers/functions/Install-ChocolateyEnvironmentVariable.ps1 +++ b/src/chocolatey.resources/helpers/functions/Install-ChocolateyEnvironmentVariable.ps1 @@ -96,6 +96,7 @@ param( ) Write-FunctionCallLogMessage -Invocation $MyInvocation -Parameters $PSBoundParameters + ## Called from chocolateysetup.psm1 - wrap any Write-Host in try/catch if ($variableType -eq [System.EnvironmentVariableTarget]::Machine) { if (Test-ProcessAdminRights) { diff --git a/src/chocolatey.resources/helpers/functions/Install-ChocolateyInstallPackage.ps1 b/src/chocolatey.resources/helpers/functions/Install-ChocolateyInstallPackage.ps1 index 848e9f9860..7a34823ca9 100644 --- a/src/chocolatey.resources/helpers/functions/Install-ChocolateyInstallPackage.ps1 +++ b/src/chocolatey.resources/helpers/functions/Install-ChocolateyInstallPackage.ps1 @@ -74,6 +74,24 @@ are not setting up a silent/unattended package. Please note that if you are submitting to the community repository, it is nearly a requirement for the package to be completely unattended. +When you are using this with an MSI, it will set up the arguments as +follows: `"C:\Full\Path\To\msiexec.exe" /i "$fileFullPath" $silentArgs`, +where `$fileFullPath` is `$file` or `$file64`, depending on what has been +decided to be used. Previous to 0.10.4, it will be just `$file` as +passing `$file64` would not have been available yet. + +When you use this with MSU, it is similar to MSI above in that it finds +the right executable to run. + +When you use this with executable installers, the `$fileFullPath` will +be `$file` (or `$file64` starting with 0.10.4+) and expects to be a full +path to the file. If the file is in the package, see the parameters for +"File" and "File64" to determine how you can get that path at runtime in +a deterministic way. SilentArgs is everything you call against that +file, as in `"$fileFullPath" $silentArgs"`. An example would be +`"c:\path\setup.exe" /S`, where `$fileFullPath = "c:\path\setup.exe"` +and `$silentArgs = "/S"`. + .PARAMETER File Full file path to native installer to run. If embedding in the package, you can get it to the path with @@ -90,7 +108,7 @@ If embedding in the package, you can get it to the path with `"$(Split-Path -parent $MyInvocation.MyCommand.Definition)\\INSTALLER_FILE"` Provide this when you want to provide both 32-bit and 64-bit -installers or explicitly only a 64-bit installer (which will cause a package +installers or explicitly only a 64-bit installer (which will cause a package install failure on 32-bit systems). .PARAMETER ValidExitCodes @@ -133,6 +151,43 @@ $packageArgs = @{ Install-ChocolateyInstallPackage @packageArgs + +.EXAMPLE +> +$packageName= 'bob' +$toolsDir = "$(Split-Path -Parent $MyInvocation.MyCommand.Definition)" +$fileLocation = Join-Path $toolsDir 'someinstaller.msi' + +$packageArgs = @{ + packageName = $packageName + fileType = 'msi' + file = $fileLocation + silentArgs = "/qn /norestart MSIPROPERTY=`"true`"" + validExitCodes= @(0, 3010, 1641) + softwareName = 'Bob*' +} + +Install-ChocolateyInstallPackage @packageArgs + +.EXAMPLE +> +$packageName= 'bob' +$toolsDir = "$(Split-Path -Parent $MyInvocation.MyCommand.Definition)" +$fileLocation = Join-Path $toolsDir 'someinstaller.msi' +$mstFileLocation = Join-Path $toolsDir 'transform.mst' + +$packageArgs = @{ + packageName = $packageName + fileType = 'msi' + file = $fileLocation + silentArgs = "/qn /norestart TRANSFORMS=`"$mstFileLocation`"" + validExitCodes= @(0, 3010, 1641) + softwareName = 'Bob*' +} + +Install-ChocolateyInstallPackage @packageArgs + + .EXAMPLE Install-ChocolateyInstallPackage 'bob' 'exe' '/S' "$(Split-Path -Parent $MyInvocation.MyCommand.Definition)\bob.exe" @@ -141,7 +196,7 @@ Install-ChocolateyInstallPackage 'bob' 'exe' '/S' "$(Split-Path -Parent $MyInvoc Install-ChocolateyInstallPackage -PackageName 'bob' -FileType 'exe' ` -SilentArgs '/S' ` -File "$(Split-Path -Parent $MyInvocation.MyCommand.Definition)\bob.exe" ` - -ValidExitCodes = @(0) + -ValidExitCodes @(0) .LINK Install-ChocolateyPackage @@ -180,13 +235,13 @@ param( $fileFullPath = $file64 $bitnessMessage = '64-bit ' } - + if ($fileFullPath -eq '' -or $fileFullPath -eq $null) { throw 'Package parameters incorrect, either File or File64 must be specified.' } - + Write-Host "Installing $bitnessMessage$packageName..." - + if ($fileType -eq '' -or $fileType -eq $null) { Write-Debug 'No FileType supplied. Using the file extension to determine FileType' $fileType = [System.IO.Path]::GetExtension("$fileFullPath").Replace(".", "") diff --git a/src/chocolatey.resources/helpers/functions/Install-ChocolateyPackage.ps1 b/src/chocolatey.resources/helpers/functions/Install-ChocolateyPackage.ps1 index 4f10c729dd..d5ac643bcf 100644 --- a/src/chocolatey.resources/helpers/functions/Install-ChocolateyPackage.ps1 +++ b/src/chocolatey.resources/helpers/functions/Install-ChocolateyPackage.ps1 @@ -23,6 +23,10 @@ Installs software into "Programs and Features" based on a remote file download. Use Install-ChocolateyInstallPackage when local or embedded file. +Building packages for an organization or for use internally? You want to +use Install-ChocolateyINSTALLPackage instead of this method (see links +below). + .DESCRIPTION This will download a native installer from a url and install it on your machine. Has error handling built in. @@ -30,6 +34,10 @@ machine. Has error handling built in. If you are embedding the file(s) directly in the package (or do not need to download a file first), use Install-ChocolateyInstallPackage instead. +Building packages for an organization or for use internally? You want to +use Install-ChocolateyINSTALLPackage instead of this method +(see links below). + .NOTES This command will assert UAC/Admin privileges on the machine. @@ -81,6 +89,22 @@ are not setting up a silent/unattended package. Please note that if you are submitting to the community repository, it is nearly a requirement for the package to be completely unattended. +When you are using this with an MSI, it will set up the arguments as +follows: +`"C:\Full\Path\To\msiexec.exe" /i "$downloadedFileFullPath" $silentArgs`, +where `$downloadedfileFullPath` is `$url` or `$url64`, depending on what +has been decided to be used. + +When you use this with MSU, it is similar to MSI above in that it finds +the right executable to run. + +When you use this with executable installers, the +`$downloadedFileFullPath` will also be `$url`/`$url64` SilentArgs is +everything you call against that file, as in +`"$fileFullPath" $silentArgs"`. An example would be +`"c:\path\setup.exe" /S`, where +`$downloadedfileFullPath = "c:\path\setup.exe"` and `$silentArgs = "/S"`. + .PARAMETER Url This is the 32 bit url to download the resource from. This resource can be used on 64 bit systems when a package has both a Url and Url64bit @@ -219,6 +243,54 @@ $packageArgs = @{ Install-ChocolateyPackage @packageArgs +.EXAMPLE +> +$packageName= 'bob' +$toolsDir = "$(Split-Path -Parent $MyInvocation.MyCommand.Definition)" +$url = 'https://somewhere.com/file.msi' +$url64 = 'https://somewhere.com/file-x64.msi' + + +$packageArgs = @{ + packageName = $packageName + fileType = 'msi' + url = $url + url64bit = $url64 + silentArgs = "/qn /norestart MSIPROPERTY=`"true`"" + validExitCodes= @(0, 3010, 1641) + softwareName = 'Bob*' + checksum = '12345' + checksumType = 'sha256' + checksum64 = '123356' + checksumType64= 'sha256' +} + +Install-ChocolateyPackage @packageArgs + +.EXAMPLE +> +$packageName= 'bob' +$toolsDir = "$(Split-Path -Parent $MyInvocation.MyCommand.Definition)" +$url = 'https://somewhere.com/file.msi' +$url64 = 'https://somewhere.com/file-x64.msi' +$urlTransform = 'https://somewhere.com/file.mst' +$mstFileLocation = Join-Path $toolsDir 'transform.mst' + +Get-ChocolateyWebFile -PackageName 'bob' ` + -Url $urlTransform -FileFullPath $mstFileLocation ` + -Checksum '1234' -ChecksumType 'sha256' + +$packageArgs = @{ + packageName = $packageName + fileType = 'msi' + file = $fileLocation + silentArgs = "/qn /norestart TRANSFORMS=`"$mstFileLocation`"" + validExitCodes= @(0, 3010, 1641) + softwareName = 'Bob*' +} + +Install-ChocolateyInstallPackage @packageArgs + .EXAMPLE > Install-ChocolateyPackage 'StExBar' 'msi' '/quiet' ` @@ -302,7 +374,7 @@ param( if ($url -eq '' -or $url -eq $null) { $url = $file - } + } if ($url64bit -eq '' -or $url64bit -eq $null) { $url64bit = $file64 } diff --git a/src/chocolatey.resources/helpers/functions/Install-ChocolateyPath.ps1 b/src/chocolatey.resources/helpers/functions/Install-ChocolateyPath.ps1 index 211b574fda..7179112299 100644 --- a/src/chocolatey.resources/helpers/functions/Install-ChocolateyPath.ps1 +++ b/src/chocolatey.resources/helpers/functions/Install-ChocolateyPath.ps1 @@ -73,6 +73,7 @@ param( ) Write-FunctionCallLogMessage -Invocation $MyInvocation -Parameters $PSBoundParameters + ## Called from chocolateysetup.psm1 - wrap any Write-Host in try/catch $originalPathToInstall = $pathToInstall @@ -81,7 +82,12 @@ param( $envPath = $env:PATH if (!$envPath.ToLower().Contains($pathToInstall.ToLower())) { - Write-Host "PATH environment variable does not have $pathToInstall in it. Adding..." + 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 = ";" diff --git a/src/chocolatey.resources/helpers/functions/Start-ChocolateyProcessAsAdmin.ps1 b/src/chocolatey.resources/helpers/functions/Start-ChocolateyProcessAsAdmin.ps1 index 282bc98c99..036e3ad82d 100644 --- a/src/chocolatey.resources/helpers/functions/Start-ChocolateyProcessAsAdmin.ps1 +++ b/src/chocolatey.resources/helpers/functions/Start-ChocolateyProcessAsAdmin.ps1 @@ -100,7 +100,7 @@ Start-ChocolateyProcessAsAdmin "& `'$psFile`'" # This also works for cmd and is required if you have any spaces in the paths within your command $appPath = "$env:ProgramFiles\myapp" $cmdBatch = "/c `"$appPath\bin\installmyappservice.bat`"" -Start-ChocolateyProcessAsAdmin $cmdBatch cmd +Start-ChocolateyProcessAsAdmin $cmdBatch cmd # or more explicitly Start-ChocolateyProcessAsAdmin -Statements $cmdBatch -ExeToRun "cmd.exe" @@ -127,7 +127,7 @@ param( $alreadyElevated = $false if (Test-ProcessAdminRights) { - $alreadyElevated = $true + $alreadyElevated = $true } $dbMessagePrepend = "Elevating permissions and running" @@ -271,9 +271,50 @@ $dbMessagePrepend [`"$exeToRun`" $wrappedStatements]. This may take a while, dep $process.Dispose() Write-Debug "Command [`"$exeToRun`" $wrappedStatements] exited with `'$exitCode`'." + + $exitErrorMessage = '' + $errorMessageAddendum = " This is most likely an issue with the '$env:chocolateyPackageName' package and not with Chocolatey itself. Please follow up with the package maintainer(s) directly." + + switch ($exitCode) { + 0 { break } + 1 { break } + 3010 { break } + # NSIS - http://nsis.sourceforge.net/Docs/AppendixD.html + # InnoSetup - http://www.jrsoftware.org/ishelp/index.php?topic=setupexitcodes + 2 { $exitErrorMessage = 'Setup was cancelled.'; break } + 3 { $exitErrorMessage = 'A fatal error occurred when preparing or moving to next install phase. Check to be sure you have enough memory to perform an installation and try again.'; break } + 4 { $exitErrorMessage = 'A fatal error occurred during installation process.' + $errorMessageAddendum; break } + 5 { $exitErrorMessage = 'User (you) cancelled the installation.'; break } + 6 { $exitErrorMessage = 'Setup process was forcefully terminated by the debugger.'; break } + 7 { $exitErrorMessage = 'While preparing to install, it was determined setup cannot proceed with the installation. Please be sure the software can be installed on your system.'; break } + 8 { $exitErrorMessage = 'While preparing to install, it was determined setup cannot proceed with the installation until you restart the system. Please reboot and try again.'; break } + # MSI - https://msdn.microsoft.com/en-us/library/windows/desktop/aa376931.aspx + 1602 { $exitErrorMessage = 'User (you) cancelled the installation.'; break } + 1603 { $exitErrorMessage = "Generic MSI Error. This is a local environment error, not an issue with a package or the MSI itself - it could mean a pending reboot is necessary prior to install or something else (like the same version is already installed). Please see MSI log if available. If not, try again adding `'--install-arguments=`"`'/l*v c:\$($env:chocolateyPackageName)_msi_install.log`'`"`'. Then search the MSI Log for `"Return Value 3`" and look above that for the error."; break } + 1618 { $exitErrorMessage = 'Another installation currently in progress. Try again later.'; break } + 1619 { $exitErrorMessage = 'MSI could not be found - it is possibly corrupt or not an MSI at all. If it was downloaded and the MSI is less than 30K, try opening it in an editor like Notepad++ as it is likely HTML.' + $errorMessageAddendum; break } + 1620 { $exitErrorMessage = 'MSI could not be opened - it is possibly corrupt or not an MSI at all. If it was downloaded and the MSI is less than 30K, try opening it in an editor like Notepad++ as it is likely HTML.' + $errorMessageAddendum; break } + 1622 { $exitErrorMessage = 'Something is wrong with the install log location specified. Please fix this in the package silent arguments (or in install arguments you specified). The directory specified as part of the log file path must exist for an MSI to be able to log to that directory.' + $errorMessageAddendum; break } + 1623 { $exitErrorMessage = 'This MSI has a language that is not supported by your system. Contact package maintainer(s) if there is an install available in your language and you would like it added to the packaging.'; break } + 1625 { $exitErrorMessage = 'Installation of this MSI is forbidden by system policy. Please contact your system administrators.'; break } + 1632 { $exitErrorMessage = 'Installation of this MSI is not supported on this platform. Contact package maintainer(s) if you feel this is in error or if you need an architecture that is not available with the current packaging.'; break } + 1633 { $exitErrorMessage = 'Installation of this MSI is not supported on this platform. Contact package maintainer(s) if you feel this is in error or if you need an architecture that is not available with the current packaging.'; break } + 1638 { $exitErrorMessage = 'This MSI requires uninstall prior to installing a different version. Please ask the package maintainer(s) to add a check in the chocolateyInstall.ps1 script and uninstall if the software is installed.' + $errorMessageAddendum; break } + 1639 { $exitErrorMessage = 'The command line arguments passed to the MSI are incorrect. If you passed in additional arguments, please adjust. Otherwise followup with the package maintainer(s) to get this fixed.' + $errorMessageAddendum; break } + 1640 { $exitErrorMessage = 'Cannot install MSI when running from remote desktop (terminal services). This should automatically be handled in licensed editions. For open source editions, you may need to run change.exe prior to running Chocolatey or not use terminal services.'; break } + 1645 { $exitErrorMessage = 'Cannot install MSI when running from remote desktop (terminal services). This should automatically be handled in licensed editions. For open source editions, you may need to run change.exe prior to running Chocolatey or not use terminal services.'; break } + } + + if ($exitErrorMessage) { + $errorMessageSpecific = "Exit code indicates the following: $exitErrorMessage." + Write-Warning $exitErrorMessage + } else { + $errorMessageSpecific = 'See log for possible error messages.' + } + if ($validExitCodes -notcontains $exitCode) { Set-PowerShellExitCode $exitCode - throw "Running [`"$exeToRun`" $wrappedStatements] was not successful. Exit code was '$exitCode'. See log for possible error messages." + throw "Running [`"$exeToRun`" $wrappedStatements] was not successful. Exit code was '$exitCode'. $($errorMessageSpecific)" } else { $chocoSuccessCodes = @(0, 1605, 1614, 1641, 3010) if ($chocoSuccessCodes -notcontains $exitCode) { diff --git a/src/chocolatey.resources/helpers/functions/Test-ProcessAdminRights.ps1 b/src/chocolatey.resources/helpers/functions/Test-ProcessAdminRights.ps1 index a4479a86f7..9cb4f2890f 100644 --- a/src/chocolatey.resources/helpers/functions/Test-ProcessAdminRights.ps1 +++ b/src/chocolatey.resources/helpers/functions/Test-ProcessAdminRights.ps1 @@ -37,6 +37,7 @@ 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) diff --git a/src/chocolatey.resources/helpers/functions/UnInstall-ChocolateyZipPackage.ps1 b/src/chocolatey.resources/helpers/functions/UnInstall-ChocolateyZipPackage.ps1 index 15eeb7ab2c..dd4481a90b 100644 --- a/src/chocolatey.resources/helpers/functions/UnInstall-ChocolateyZipPackage.ps1 +++ b/src/chocolatey.resources/helpers/functions/UnInstall-ChocolateyZipPackage.ps1 @@ -64,7 +64,14 @@ param( Write-FunctionCallLogMessage -Invocation $MyInvocation -Parameters $PSBoundParameters $packagelibPath=$env:chocolateyPackageFolder - $zipContentFile=(join-path $packagelibPath $zipFileName) + ".txt" + $zipContentFile=(join-path $packagelibPath $zipFileName) + "Install.txt" + + # The Zip Content File may have previously existed under a different + # name. If *Install.txt doesn't exist, check for the old name + if(-Not (Test-Path -Path $zipContentFile)) { + $zipContentFile=(Join-Path $packagelibPath -ChildPath $zipFileName) + ".txt" + } + if ((Test-Path -path $zipContentFile)) { $zipContentFile $zipContents=get-content $zipContentFile diff --git a/src/chocolatey.resources/tools/7z.dll b/src/chocolatey.resources/tools/7z.dll index b63a1737b8..5598fe3e8c 100644 Binary files a/src/chocolatey.resources/tools/7z.dll and b/src/chocolatey.resources/tools/7z.dll differ diff --git a/src/chocolatey.resources/tools/7z.exe b/src/chocolatey.resources/tools/7z.exe index bc774bbf8a..77cdcba681 100644 Binary files a/src/chocolatey.resources/tools/7z.exe and b/src/chocolatey.resources/tools/7z.exe differ diff --git a/src/chocolatey.sln b/src/chocolatey.sln index 312df24d2d..6a55062e88 100644 --- a/src/chocolatey.sln +++ b/src/chocolatey.sln @@ -40,7 +40,6 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "toplevel", "toplevel", "{18FEFF9F-7352-4230-8B4E-E8D8BE976095}" ProjectSection(SolutionItems) = preProject ..\CHANGELOG.md = ..\CHANGELOG.md - ..\COMMITTERS.md = ..\COMMITTERS.md ..\CONTRIBUTING.md = ..\CONTRIBUTING.md ..\README.md = ..\README.md EndProjectSection @@ -50,6 +49,9 @@ Global Debug|Any CPU = Debug|Any CPU Debug|Mixed Platforms = Debug|Mixed Platforms Debug|x86 = Debug|x86 + NoResources|Any CPU = NoResources|Any CPU + NoResources|Mixed Platforms = NoResources|Mixed Platforms + NoResources|x86 = NoResources|x86 Release|Any CPU = Release|Any CPU Release|Mixed Platforms = Release|Mixed Platforms Release|x86 = Release|x86 @@ -61,6 +63,9 @@ Global {E24E3386-244F-4404-9E6E-5B53818EA903}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU {E24E3386-244F-4404-9E6E-5B53818EA903}.Debug|x86.ActiveCfg = Debug|x86 {E24E3386-244F-4404-9E6E-5B53818EA903}.Debug|x86.Build.0 = Debug|x86 + {E24E3386-244F-4404-9E6E-5B53818EA903}.NoResources|Any CPU.ActiveCfg = NoResources|Any CPU + {E24E3386-244F-4404-9E6E-5B53818EA903}.NoResources|Mixed Platforms.ActiveCfg = NoResources|x86 + {E24E3386-244F-4404-9E6E-5B53818EA903}.NoResources|x86.ActiveCfg = NoResources|x86 {E24E3386-244F-4404-9E6E-5B53818EA903}.Release|Any CPU.ActiveCfg = Release|Any CPU {E24E3386-244F-4404-9E6E-5B53818EA903}.Release|Any CPU.Build.0 = Release|Any CPU {E24E3386-244F-4404-9E6E-5B53818EA903}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU @@ -72,6 +77,9 @@ Global {5C4C60F0-47B1-498E-ABF7-D315E1A94BC9}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU {5C4C60F0-47B1-498E-ABF7-D315E1A94BC9}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU {5C4C60F0-47B1-498E-ABF7-D315E1A94BC9}.Debug|x86.ActiveCfg = Debug|Any CPU + {5C4C60F0-47B1-498E-ABF7-D315E1A94BC9}.NoResources|Any CPU.ActiveCfg = NoResources|Any CPU + {5C4C60F0-47B1-498E-ABF7-D315E1A94BC9}.NoResources|Mixed Platforms.ActiveCfg = NoResources|Any CPU + {5C4C60F0-47B1-498E-ABF7-D315E1A94BC9}.NoResources|x86.ActiveCfg = NoResources|Any CPU {5C4C60F0-47B1-498E-ABF7-D315E1A94BC9}.Release|Any CPU.ActiveCfg = Release|Any CPU {5C4C60F0-47B1-498E-ABF7-D315E1A94BC9}.Release|Any CPU.Build.0 = Release|Any CPU {5C4C60F0-47B1-498E-ABF7-D315E1A94BC9}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU @@ -82,6 +90,12 @@ Global {5563DC61-35FD-4FAB-B331-9AE1FDB23F80}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU {5563DC61-35FD-4FAB-B331-9AE1FDB23F80}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU {5563DC61-35FD-4FAB-B331-9AE1FDB23F80}.Debug|x86.ActiveCfg = Debug|Any CPU + {5563DC61-35FD-4FAB-B331-9AE1FDB23F80}.NoResources|Any CPU.ActiveCfg = NoResources|Any CPU + {5563DC61-35FD-4FAB-B331-9AE1FDB23F80}.NoResources|Any CPU.Build.0 = NoResources|Any CPU + {5563DC61-35FD-4FAB-B331-9AE1FDB23F80}.NoResources|Mixed Platforms.ActiveCfg = NoResources|Any CPU + {5563DC61-35FD-4FAB-B331-9AE1FDB23F80}.NoResources|Mixed Platforms.Build.0 = NoResources|Any CPU + {5563DC61-35FD-4FAB-B331-9AE1FDB23F80}.NoResources|x86.ActiveCfg = NoResources|Any CPU + {5563DC61-35FD-4FAB-B331-9AE1FDB23F80}.NoResources|x86.Build.0 = NoResources|Any CPU {5563DC61-35FD-4FAB-B331-9AE1FDB23F80}.Release|Any CPU.ActiveCfg = Release|Any CPU {5563DC61-35FD-4FAB-B331-9AE1FDB23F80}.Release|Any CPU.Build.0 = Release|Any CPU {5563DC61-35FD-4FAB-B331-9AE1FDB23F80}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU @@ -92,6 +106,9 @@ Global {AF584111-FE32-448D-A1D0-63217AF8B43C}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU {AF584111-FE32-448D-A1D0-63217AF8B43C}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU {AF584111-FE32-448D-A1D0-63217AF8B43C}.Debug|x86.ActiveCfg = Debug|Any CPU + {AF584111-FE32-448D-A1D0-63217AF8B43C}.NoResources|Any CPU.ActiveCfg = NoResources|Any CPU + {AF584111-FE32-448D-A1D0-63217AF8B43C}.NoResources|Mixed Platforms.ActiveCfg = NoResources|Any CPU + {AF584111-FE32-448D-A1D0-63217AF8B43C}.NoResources|x86.ActiveCfg = NoResources|Any CPU {AF584111-FE32-448D-A1D0-63217AF8B43C}.Release|Any CPU.ActiveCfg = Release|Any CPU {AF584111-FE32-448D-A1D0-63217AF8B43C}.Release|Any CPU.Build.0 = Release|Any CPU {AF584111-FE32-448D-A1D0-63217AF8B43C}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU @@ -102,6 +119,9 @@ Global {12ECAD4F-D463-4D72-A792-A4FCCFE9C456}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU {12ECAD4F-D463-4D72-A792-A4FCCFE9C456}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU {12ECAD4F-D463-4D72-A792-A4FCCFE9C456}.Debug|x86.ActiveCfg = Debug|Any CPU + {12ECAD4F-D463-4D72-A792-A4FCCFE9C456}.NoResources|Any CPU.ActiveCfg = NoResources|Any CPU + {12ECAD4F-D463-4D72-A792-A4FCCFE9C456}.NoResources|Mixed Platforms.ActiveCfg = NoResources|Any CPU + {12ECAD4F-D463-4D72-A792-A4FCCFE9C456}.NoResources|x86.ActiveCfg = NoResources|Any CPU {12ECAD4F-D463-4D72-A792-A4FCCFE9C456}.Release|Any CPU.ActiveCfg = Release|Any CPU {12ECAD4F-D463-4D72-A792-A4FCCFE9C456}.Release|Any CPU.Build.0 = Release|Any CPU {12ECAD4F-D463-4D72-A792-A4FCCFE9C456}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU @@ -118,4 +138,7 @@ Global {DD9689F3-1D2D-41AE-A672-063EE70C0C9A} = {FB6236DD-17EF-4C36-943C-47792FBC3306} {E5C987F8-6B95-4835-BBDD-A25C9D370BB9} = {DAB29F30-149D-4005-A8D2-4FA56CF2784D} EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {998CAC46-A2B8-447C-B4CC-3B11DC35ED46} + EndGlobalSection EndGlobal diff --git a/src/chocolatey.sln.DotSettings b/src/chocolatey.sln.DotSettings index 7db4140720..1aec9c0d91 100644 --- a/src/chocolatey.sln.DotSettings +++ b/src/chocolatey.sln.DotSettings @@ -13,7 +13,7 @@ 220 False True - Copyright © 2017 Chocolatey Software, Inc + Copyright © 2017 - 2018 Chocolatey Software, Inc Copyright © 2011 - 2017 RealDimensions Software, LLC Licensed under the Apache License, Version 2.0 (the "License"); @@ -27,7 +27,8 @@ 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. +limitations under the License. + <Policy Inspect="True" Prefix="" Suffix="" Style="AA_BB" /> <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb"><ExtraRule Prefix="" Suffix="" Style="aaBb_AaBb" /></Policy> <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> diff --git a/src/chocolatey.tests.integration/MockEventSubscriptionManager.cs b/src/chocolatey.tests.integration/MockEventSubscriptionManager.cs index 659810ee53..504c350408 100644 --- a/src/chocolatey.tests.integration/MockEventSubscriptionManager.cs +++ b/src/chocolatey.tests.integration/MockEventSubscriptionManager.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey.tests.integration/NUnitSetup.cs b/src/chocolatey.tests.integration/NUnitSetup.cs index c7a0dced73..941c3f53a3 100644 --- a/src/chocolatey.tests.integration/NUnitSetup.cs +++ b/src/chocolatey.tests.integration/NUnitSetup.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey.tests.integration/Properties/AssemblyInfo.cs b/src/chocolatey.tests.integration/Properties/AssemblyInfo.cs index 2560401790..a65800bd44 100644 --- a/src/chocolatey.tests.integration/Properties/AssemblyInfo.cs +++ b/src/chocolatey.tests.integration/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey.tests.integration/Scenario.cs b/src/chocolatey.tests.integration/Scenario.cs index e6240ffc72..4077b192f9 100644 --- a/src/chocolatey.tests.integration/Scenario.cs +++ b/src/chocolatey.tests.integration/Scenario.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey.tests.integration/TODO.cs b/src/chocolatey.tests.integration/TODO.cs index b19b32afb8..83bc8c6283 100644 --- a/src/chocolatey.tests.integration/TODO.cs +++ b/src/chocolatey.tests.integration/TODO.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey.tests.integration/chocolatey.tests.integration.csproj b/src/chocolatey.tests.integration/chocolatey.tests.integration.csproj index 484552e747..f193f467e1 100644 --- a/src/chocolatey.tests.integration/chocolatey.tests.integration.csproj +++ b/src/chocolatey.tests.integration/chocolatey.tests.integration.csproj @@ -32,6 +32,15 @@ prompt 4 + + bin\NoResources\ + TRACE + true + pdbonly + AnyCPU + prompt + MinimumRecommendedRules.ruleset + ..\..\lib\bdddoc\bdddoc.dll @@ -501,4 +510,4 @@ --> - \ No newline at end of file + diff --git a/src/chocolatey.tests.integration/infrastructure.app/services/FilesServiceSpecs.cs b/src/chocolatey.tests.integration/infrastructure.app/services/FilesServiceSpecs.cs index 25964c6552..0515e16a0f 100644 --- a/src/chocolatey.tests.integration/infrastructure.app/services/FilesServiceSpecs.cs +++ b/src/chocolatey.tests.integration/infrastructure.app/services/FilesServiceSpecs.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey.tests.integration/infrastructure/commands/CommandExecutorSpecs.cs b/src/chocolatey.tests.integration/infrastructure/commands/CommandExecutorSpecs.cs index 6d1d33d1b6..7b3e8fae2c 100644 --- a/src/chocolatey.tests.integration/infrastructure/commands/CommandExecutorSpecs.cs +++ b/src/chocolatey.tests.integration/infrastructure/commands/CommandExecutorSpecs.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey.tests.integration/infrastructure/cryptography/CrytpoHashProviderSpecs.cs b/src/chocolatey.tests.integration/infrastructure/cryptography/CrytpoHashProviderSpecs.cs index 8940956c20..d718f3bdf3 100644 --- a/src/chocolatey.tests.integration/infrastructure/cryptography/CrytpoHashProviderSpecs.cs +++ b/src/chocolatey.tests.integration/infrastructure/cryptography/CrytpoHashProviderSpecs.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey.tests.integration/infrastructure/filesystem/DotNetFileSystemSpecs.cs b/src/chocolatey.tests.integration/infrastructure/filesystem/DotNetFileSystemSpecs.cs index c7bf54a4b0..ca76547768 100644 --- a/src/chocolatey.tests.integration/infrastructure/filesystem/DotNetFileSystemSpecs.cs +++ b/src/chocolatey.tests.integration/infrastructure/filesystem/DotNetFileSystemSpecs.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey.tests.integration/scenarios/InstallScenarios.cs b/src/chocolatey.tests.integration/scenarios/InstallScenarios.cs index 339220bcc2..f0856ff6ac 100644 --- a/src/chocolatey.tests.integration/scenarios/InstallScenarios.cs +++ b/src/chocolatey.tests.integration/scenarios/InstallScenarios.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey.tests.integration/scenarios/ListScenarios.cs b/src/chocolatey.tests.integration/scenarios/ListScenarios.cs index 1ca8193a04..49145b8e2f 100644 --- a/src/chocolatey.tests.integration/scenarios/ListScenarios.cs +++ b/src/chocolatey.tests.integration/scenarios/ListScenarios.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey.tests.integration/scenarios/PackScenarios.cs b/src/chocolatey.tests.integration/scenarios/PackScenarios.cs index 5603b1b17e..a6c8e4bb28 100644 --- a/src/chocolatey.tests.integration/scenarios/PackScenarios.cs +++ b/src/chocolatey.tests.integration/scenarios/PackScenarios.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -179,6 +179,24 @@ public void property_settings_should_be_logged_as_debug_messages() false +"; + + private const string NuspecContentWithChocolateyData = @" + + + test-package + Test Package + 0.1.0 + package author + package owner + A brief summary + A big description + test admin + + http://apache.org/2 + false + + "; private const string NuspecContentWithVariables = @" diff --git a/src/chocolatey.tests.integration/scenarios/PinScenarios.cs b/src/chocolatey.tests.integration/scenarios/PinScenarios.cs index ba2660fb02..bc826a7df4 100644 --- a/src/chocolatey.tests.integration/scenarios/PinScenarios.cs +++ b/src/chocolatey.tests.integration/scenarios/PinScenarios.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey.tests.integration/scenarios/UninstallScenarios.cs b/src/chocolatey.tests.integration/scenarios/UninstallScenarios.cs index 4dc04ffc3c..2279bb3ff1 100644 --- a/src/chocolatey.tests.integration/scenarios/UninstallScenarios.cs +++ b/src/chocolatey.tests.integration/scenarios/UninstallScenarios.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey.tests.integration/scenarios/UpgradeScenarios.cs b/src/chocolatey.tests.integration/scenarios/UpgradeScenarios.cs index dd1352fdf7..b9e152fcb0 100644 --- a/src/chocolatey.tests.integration/scenarios/UpgradeScenarios.cs +++ b/src/chocolatey.tests.integration/scenarios/UpgradeScenarios.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey.tests/GetChocolateySpecs.cs b/src/chocolatey.tests/GetChocolateySpecs.cs deleted file mode 100644 index 333e060fd1..0000000000 --- a/src/chocolatey.tests/GetChocolateySpecs.cs +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright © 2017 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 -{ - using log4net; - using Should; - - public class GetChocolateySpecs - { - public abstract class GetChocolateySpecsBase : TinySpec - { - public override void Context() - { - } - } - - public class when_getting_chocolatey : GetChocolateySpecsBase - { - private GetChocolatey _chocolatey; - - public override void Because() - { - _chocolatey = Lets.GetChocolatey(); - } - - [Fact] - public void should_get_chocolatey() - { - _chocolatey.ShouldNotBeNull(); - } - - [Fact] - public void should_configure_log4net() - { - LogManager.GetRepository().Configured.ShouldBeTrue(); - } - } - - public class when_getting_chocolatey_more_than_once : GetChocolateySpecsBase - { - private GetChocolatey _chocolatey1; - private GetChocolatey _chocolatey2; - - public override void Because() - { - _chocolatey1 = Lets.GetChocolatey(); - _chocolatey2 = Lets.GetChocolatey(); - } - - [Fact] - public void should_get_instantiated_chocolatey1() - { - _chocolatey1.ShouldNotBeNull(); - } - - [Fact] - public void should_get_instantiated_chocolatey2() - { - _chocolatey2.ShouldNotBeNull(); - } - } - } -} diff --git a/src/chocolatey.tests/MockLogger.cs b/src/chocolatey.tests/MockLogger.cs index 5628589cb8..b011b57a8b 100644 --- a/src/chocolatey.tests/MockLogger.cs +++ b/src/chocolatey.tests/MockLogger.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey.tests/Properties/AssemblyInfo.cs b/src/chocolatey.tests/Properties/AssemblyInfo.cs index e0dab35491..22f4043244 100644 --- a/src/chocolatey.tests/Properties/AssemblyInfo.cs +++ b/src/chocolatey.tests/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey.tests/chocolatey.tests.csproj b/src/chocolatey.tests/chocolatey.tests.csproj index 9629755f66..85336ad736 100644 --- a/src/chocolatey.tests/chocolatey.tests.csproj +++ b/src/chocolatey.tests/chocolatey.tests.csproj @@ -31,6 +31,15 @@ prompt 4 + + bin\NoResources\ + TRACE + true + pdbonly + AnyCPU + prompt + MinimumRecommendedRules.ruleset + ..\packages\log4net.2.0.3\lib\net40-client\log4net.dll @@ -61,7 +70,6 @@ - @@ -130,4 +138,4 @@ --> - \ No newline at end of file + diff --git a/src/chocolatey.tests/infrastructure.app/attributes/CommandForAttributeSpecs.cs b/src/chocolatey.tests/infrastructure.app/attributes/CommandForAttributeSpecs.cs index 03fd4065da..77ef851667 100644 --- a/src/chocolatey.tests/infrastructure.app/attributes/CommandForAttributeSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/attributes/CommandForAttributeSpecs.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyApiKeyCommandSpecs.cs b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyApiKeyCommandSpecs.cs index f27b805c09..f067ab6eda 100644 --- a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyApiKeyCommandSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyApiKeyCommandSpecs.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyConfigCommandSpecs.cs b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyConfigCommandSpecs.cs index b79cc159f7..bafde8286f 100644 --- a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyConfigCommandSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyConfigCommandSpecs.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyFeatureCommandSpecs.cs b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyFeatureCommandSpecs.cs index e62b83debc..f1f6b1d773 100644 --- a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyFeatureCommandSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyFeatureCommandSpecs.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyInfoCommandSpecs.cs b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyInfoCommandSpecs.cs index 6858428668..0b0504956e 100644 --- a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyInfoCommandSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyInfoCommandSpecs.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyInstallCommandSpecs.cs b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyInstallCommandSpecs.cs index 9212b426b3..f32acfd5e6 100644 --- a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyInstallCommandSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyInstallCommandSpecs.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyListCommandSpecs.cs b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyListCommandSpecs.cs index 3eb703b571..e28051f3a6 100644 --- a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyListCommandSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyListCommandSpecs.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyNewCommandSpecs.cs b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyNewCommandSpecs.cs index 758f26217a..1807a4f269 100644 --- a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyNewCommandSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyNewCommandSpecs.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyOutdatedCommandSpecs.cs b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyOutdatedCommandSpecs.cs index 816d2555fe..248807e70a 100644 --- a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyOutdatedCommandSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyOutdatedCommandSpecs.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyPackCommandSpecs.cs b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyPackCommandSpecs.cs index 2010ce2f2e..cd525cfae2 100644 --- a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyPackCommandSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyPackCommandSpecs.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyPinCommandSpecs.cs b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyPinCommandSpecs.cs index 79e6a95c33..0a60e4274c 100644 --- a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyPinCommandSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyPinCommandSpecs.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyPushCommandSpecs.cs b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyPushCommandSpecs.cs index ffe5bafb08..c3a998f0f9 100644 --- a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyPushCommandSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyPushCommandSpecs.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey.tests/infrastructure.app/commands/ChocolateySourceCommandSpecs.cs b/src/chocolatey.tests/infrastructure.app/commands/ChocolateySourceCommandSpecs.cs index 4953444e69..5443f9ae9a 100644 --- a/src/chocolatey.tests/infrastructure.app/commands/ChocolateySourceCommandSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/commands/ChocolateySourceCommandSpecs.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyUninstallCommandSpecs.cs b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyUninstallCommandSpecs.cs index f260f54f4d..35144a49aa 100644 --- a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyUninstallCommandSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyUninstallCommandSpecs.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyUnpackSelfCommandSpecs.cs b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyUnpackSelfCommandSpecs.cs index 2871a6b9ae..d4ff65e880 100644 --- a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyUnpackSelfCommandSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyUnpackSelfCommandSpecs.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyUpgradeCommandSpecs.cs b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyUpgradeCommandSpecs.cs index ab64f6b0b4..15f16f875f 100644 --- a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyUpgradeCommandSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyUpgradeCommandSpecs.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey.tests/infrastructure.app/configuration/ConfigurationOptionsSpec.cs b/src/chocolatey.tests/infrastructure.app/configuration/ConfigurationOptionsSpec.cs index 431ca6a09d..95d3b8f6c4 100644 --- a/src/chocolatey.tests/infrastructure.app/configuration/ConfigurationOptionsSpec.cs +++ b/src/chocolatey.tests/infrastructure.app/configuration/ConfigurationOptionsSpec.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey.tests/infrastructure.app/services/AutomaticUninstallerServiceSpecs.cs b/src/chocolatey.tests/infrastructure.app/services/AutomaticUninstallerServiceSpecs.cs index b30e6baa6a..bdc6e38174 100644 --- a/src/chocolatey.tests/infrastructure.app/services/AutomaticUninstallerServiceSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/services/AutomaticUninstallerServiceSpecs.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -519,6 +519,55 @@ public void should_call_command_executor() It.IsAny()), Times.Once); } + } + + public class when_uninstall_string_has_ampersand_quot : AutomaticUninstallerServiceSpecsBase + { + private readonly string uninstallStringWithAmpersandQuot = @""C:\Program Files (x86)\WinDirStat\Uninstall.exe" /SILENT"; + + public override void Context() + { + base.Context(); + registryKeys.Clear(); + registryKeys.Add( + new RegistryApplicationKey + { + DisplayName = expectedDisplayName, + InstallLocation = @"C:\Program Files (x86)\WinDirStat", + UninstallString = uninstallStringWithAmpersandQuot, + HasQuietUninstall = true, + KeyPath = @"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\WinDirStat", + InstallerType = installerType.InstallerType, + }); + packageInformation.RegistrySnapshot = new Registry("123", registryKeys); + } + + public override void Because() + { + MockLogger.LogMessagesToConsole = true; + service.run(packageResult, config); + } + + [Fact] + public void should_call_get_package_information() + { + packageInfoService.Verify(s => s.get_package_information(It.IsAny()), Times.Once); + } + + [Fact] + public void should_call_command_executor() + { + commandExecutor.Verify( + c => + c.execute( + expectedUninstallString, + "/SILENT".trim_safe(), + It.IsAny(), + It.IsAny>(), + It.IsAny>(), + It.IsAny()), + Times.Once); + } } public class when_uninstall_string_has_multiple_file_paths : AutomaticUninstallerServiceSpecsBase diff --git a/src/chocolatey.tests/infrastructure.app/services/FilesServiceSpecs.cs b/src/chocolatey.tests/infrastructure.app/services/FilesServiceSpecs.cs index 024e25375b..92e05af706 100644 --- a/src/chocolatey.tests/infrastructure.app/services/FilesServiceSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/services/FilesServiceSpecs.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey.tests/infrastructure.app/services/NugetServiceSpecs.cs b/src/chocolatey.tests/infrastructure.app/services/NugetServiceSpecs.cs index 7e17230cf0..ea13d43e07 100644 --- a/src/chocolatey.tests/infrastructure.app/services/NugetServiceSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/services/NugetServiceSpecs.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey.tests/infrastructure.app/services/RegistryServiceSpecs.cs b/src/chocolatey.tests/infrastructure.app/services/RegistryServiceSpecs.cs index eca3667459..cf2d03e470 100644 --- a/src/chocolatey.tests/infrastructure.app/services/RegistryServiceSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/services/RegistryServiceSpecs.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey.tests/infrastructure.app/services/TemplateServiceSpecs.cs b/src/chocolatey.tests/infrastructure.app/services/TemplateServiceSpecs.cs index 3163654aba..364dd1bf10 100644 --- a/src/chocolatey.tests/infrastructure.app/services/TemplateServiceSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/services/TemplateServiceSpecs.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey.tests/infrastructure/commandline/InteractivePromptSpecs.cs b/src/chocolatey.tests/infrastructure/commandline/InteractivePromptSpecs.cs index 131f8aa937..cda545f99c 100644 --- a/src/chocolatey.tests/infrastructure/commandline/InteractivePromptSpecs.cs +++ b/src/chocolatey.tests/infrastructure/commandline/InteractivePromptSpecs.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey.tests/infrastructure/commands/CommandExecutorSpecs.cs b/src/chocolatey.tests/infrastructure/commands/CommandExecutorSpecs.cs index 24c2dc812d..7f0e267d20 100644 --- a/src/chocolatey.tests/infrastructure/commands/CommandExecutorSpecs.cs +++ b/src/chocolatey.tests/infrastructure/commands/CommandExecutorSpecs.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -153,6 +153,6 @@ public void should_not_call_WaitForExit() { process.Verify(p => p.WaitForExit(It.IsAny()), Times.Never); } - } + } } } diff --git a/src/chocolatey.tests/infrastructure/commands/ExternalCommandArgsBuilderSpecs.cs b/src/chocolatey.tests/infrastructure/commands/ExternalCommandArgsBuilderSpecs.cs index f1c1329a12..f93498f348 100644 --- a/src/chocolatey.tests/infrastructure/commands/ExternalCommandArgsBuilderSpecs.cs +++ b/src/chocolatey.tests/infrastructure/commands/ExternalCommandArgsBuilderSpecs.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey.tests/infrastructure/commands/PowershellExecutorSpecs.cs b/src/chocolatey.tests/infrastructure/commands/PowershellExecutorSpecs.cs index 35778811e0..535da8f2ac 100644 --- a/src/chocolatey.tests/infrastructure/commands/PowershellExecutorSpecs.cs +++ b/src/chocolatey.tests/infrastructure/commands/PowershellExecutorSpecs.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey.tests/infrastructure/configuration/ConfigSpecs.cs b/src/chocolatey.tests/infrastructure/configuration/ConfigSpecs.cs index 11d378555c..6f2897fbf5 100644 --- a/src/chocolatey.tests/infrastructure/configuration/ConfigSpecs.cs +++ b/src/chocolatey.tests/infrastructure/configuration/ConfigSpecs.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey.tests/infrastructure/cryptography/CrytpoHashProviderSpecs.cs b/src/chocolatey.tests/infrastructure/cryptography/CrytpoHashProviderSpecs.cs index 9988bd5db1..0493bed0c4 100644 --- a/src/chocolatey.tests/infrastructure/cryptography/CrytpoHashProviderSpecs.cs +++ b/src/chocolatey.tests/infrastructure/cryptography/CrytpoHashProviderSpecs.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey.tests/infrastructure/events/EventSubscriptionManagerSpecs.cs b/src/chocolatey.tests/infrastructure/events/EventSubscriptionManagerSpecs.cs index 485c5b86da..a2d353eb2a 100644 --- a/src/chocolatey.tests/infrastructure/events/EventSubscriptionManagerSpecs.cs +++ b/src/chocolatey.tests/infrastructure/events/EventSubscriptionManagerSpecs.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey.tests/infrastructure/events/context/FakeEvent.cs b/src/chocolatey.tests/infrastructure/events/context/FakeEvent.cs index 835846a922..d1b1192164 100644 --- a/src/chocolatey.tests/infrastructure/events/context/FakeEvent.cs +++ b/src/chocolatey.tests/infrastructure/events/context/FakeEvent.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey.tests/infrastructure/events/context/FakeSubscriber.cs b/src/chocolatey.tests/infrastructure/events/context/FakeSubscriber.cs index 937c7ac982..0a359b4486 100644 --- a/src/chocolatey.tests/infrastructure/events/context/FakeSubscriber.cs +++ b/src/chocolatey.tests/infrastructure/events/context/FakeSubscriber.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey.tests/infrastructure/filesystem/DotNetFileSystemSpecs.cs b/src/chocolatey.tests/infrastructure/filesystem/DotNetFileSystemSpecs.cs index 5d5b58d678..c4f067d93d 100644 --- a/src/chocolatey.tests/infrastructure/filesystem/DotNetFileSystemSpecs.cs +++ b/src/chocolatey.tests/infrastructure/filesystem/DotNetFileSystemSpecs.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey.tests/infrastructure/guards/EnsureSpecs.cs b/src/chocolatey.tests/infrastructure/guards/EnsureSpecs.cs index be6cb2c845..02778d9b6b 100644 --- a/src/chocolatey.tests/infrastructure/guards/EnsureSpecs.cs +++ b/src/chocolatey.tests/infrastructure/guards/EnsureSpecs.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey.tests/infrastructure/information/VersionInformationSpecs.cs b/src/chocolatey.tests/infrastructure/information/VersionInformationSpecs.cs index 60c629f6ec..b28da8a497 100644 --- a/src/chocolatey.tests/infrastructure/information/VersionInformationSpecs.cs +++ b/src/chocolatey.tests/infrastructure/information/VersionInformationSpecs.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey.tests/infrastructure/platforms/PlatformSpecs.cs b/src/chocolatey.tests/infrastructure/platforms/PlatformSpecs.cs index b03fcaf8a7..cb208f3f9b 100644 --- a/src/chocolatey.tests/infrastructure/platforms/PlatformSpecs.cs +++ b/src/chocolatey.tests/infrastructure/platforms/PlatformSpecs.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey.tests/infrastructure/tokens/TokenReplacerSpecs.cs b/src/chocolatey.tests/infrastructure/tokens/TokenReplacerSpecs.cs index de2241e84a..6c1241bf7d 100644 --- a/src/chocolatey.tests/infrastructure/tokens/TokenReplacerSpecs.cs +++ b/src/chocolatey.tests/infrastructure/tokens/TokenReplacerSpecs.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey.tests/infrastructure/tolerance/FaultToleranceSpecs.cs b/src/chocolatey.tests/infrastructure/tolerance/FaultToleranceSpecs.cs index f110e78d3f..dff115d004 100644 --- a/src/chocolatey.tests/infrastructure/tolerance/FaultToleranceSpecs.cs +++ b/src/chocolatey.tests/infrastructure/tolerance/FaultToleranceSpecs.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey/AssemblyExtensions.cs b/src/chocolatey/AssemblyExtensions.cs index 9178a488f4..318830e42f 100644 --- a/src/chocolatey/AssemblyExtensions.cs +++ b/src/chocolatey/AssemblyExtensions.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey/EnumExtensions.cs b/src/chocolatey/EnumExtensions.cs index 7be8dad39a..77de33632f 100644 --- a/src/chocolatey/EnumExtensions.cs +++ b/src/chocolatey/EnumExtensions.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey/EnumerableExtensions.cs b/src/chocolatey/EnumerableExtensions.cs index f2ff53f650..96dcfecfb3 100644 --- a/src/chocolatey/EnumerableExtensions.cs +++ b/src/chocolatey/EnumerableExtensions.cs @@ -1,13 +1,13 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 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. @@ -97,5 +97,28 @@ public static IEnumerable distinct_last(this IEnumerable source, IEqual yield return maxElement; } } + + /// + /// Generates a unique hash code for a source of objects + /// + /// Generic type. + /// The source. + /// + /// Integer value representing hash code for input collection. + /// + /// + /// Taken from here: https://stackoverflow.com/a/30758270/671491 + /// + public static int get_sequence_hash_code(this IEnumerable source) + { + const int seed = 487; + const int modifier = 31; + + unchecked + { + return source.Aggregate(seed, (current, item) => + (current*modifier) + item.GetHashCode()); + } + } } } diff --git a/src/chocolatey/GetChocolatey.cs b/src/chocolatey/GetChocolatey.cs index fc9e929d4b..5950041404 100644 --- a/src/chocolatey/GetChocolatey.cs +++ b/src/chocolatey/GetChocolatey.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -30,7 +30,9 @@ namespace chocolatey using infrastructure.logging; using infrastructure.registration; using infrastructure.synchronization; +#if !NoResources using resources; +#endif using Assembly = infrastructure.adapters.Assembly; using IFileSystem = infrastructure.filesystem.IFileSystem; @@ -41,8 +43,6 @@ namespace chocolatey /// public static class Lets { - private static readonly GetChocolatey _chocolatey = GlobalMutex.enter(() => set_up(), 5); - private static GetChocolatey set_up() { add_assembly_resolver(); @@ -52,7 +52,7 @@ private static GetChocolatey set_up() public static GetChocolatey GetChocolatey() { - return _chocolatey; + return GlobalMutex.enter(() => set_up(), 10); } private static ResolveEventHandler _handler = null; @@ -100,6 +100,7 @@ public class GetChocolatey { private readonly Container _container; private readonly ChocolateyLicense _license; + private readonly LogSinkLog _logSinkLogger = new LogSinkLog(); private Action _propConfig; /// @@ -109,6 +110,7 @@ public GetChocolatey() { Log4NetAppenderConfiguration.configure(null, excludeLoggerNames: ChocolateyLoggers.Trace.to_string()); Bootstrap.initialize(); + Log.InitializeWith(new AggregateLog(new List() { new Log4NetLog(), _logSinkLogger })); _license = License.validate_license(); _container = SimpleInjectorContainer.Container; } @@ -121,9 +123,40 @@ public GetChocolatey() public GetChocolatey SetCustomLogging(ILog logger) { Log.InitializeWith(logger, resetLoggers: false); + drain_log_sink(logger); return this; } + private void drain_log_sink(ILog logger) + { + foreach (var logMessage in _logSinkLogger.Messages.or_empty_list_if_null()) + { + switch (logMessage.LogLevel) + { + case LogLevelType.Trace: + logger.Trace(logMessage.Message); + break; + case LogLevelType.Debug: + logger.Debug(logMessage.Message); + break; + case LogLevelType.Information: + logger.Info(logMessage.Message); + break; + case LogLevelType.Warning: + logger.Warn(logMessage.Message); + break; + case LogLevelType.Error: + logger.Error(logMessage.Message); + break; + case LogLevelType.Fatal: + logger.Fatal(logMessage.Message); + break; + } + } + + _logSinkLogger.Messages.Clear(); + } + /// /// Set your options for running chocolatey here. It looks like Set(c => {c.CommandName = "install"; c.PackageNames = "bob";}).Run(); /// @@ -152,7 +185,7 @@ public GetChocolatey RegisterContainerComponent(Type service, Type implementatio } /// - /// Registers a container component. Does not require a dependency on Simple Injector. + /// Registers a container component. Does not require a dependency on Simple Injector. /// Will override existing component if registered. /// /// The type of the service. @@ -169,7 +202,7 @@ public GetChocolatey RegisterContainerComponent() } /// - /// Registers a container component. + /// Registers a container component. /// Will override existing component if registered. /// /// The type of the service. @@ -188,7 +221,7 @@ public GetChocolatey RegisterContainerComponent(Lifesty } /// - /// Registers a container component. Does not require a dependency on Simple Injector. + /// Registers a container component. Does not require a dependency on Simple Injector. /// Will override existing component if registered. /// /// The type of the ervice. @@ -205,7 +238,7 @@ public GetChocolatey RegisterContainerComponent(Func implement } /// - /// Register container components when you need to do multiple setups and want to work with the container directly. + /// Register container components when you need to do multiple setups and want to work with the container directly. /// Will override existing components if registered. /// /// The container setup. @@ -224,7 +257,7 @@ public GetChocolatey RegisterContainerComponents(Action containerSetu } /// - /// Returns the Chocolatey container. + /// Returns the Chocolatey container. /// WARNING: Once you call GetInstance of any kind, no more items can be registered on the container /// /// The IoC Container (implemented as a SimpleInjector.Container) @@ -239,7 +272,7 @@ public Container Container() /// /// Call this method to run Chocolatey after you have set the options. /// WARNING: Once this is called, you will not be able to register additional container components. - /// WARNING: Ensure you don't nest additional calls to running Chocolatey here. + /// WARNING: Ensure you don't nest additional calls to running Chocolatey here. /// Make a call, then finish up and make another call. This includes /// - Run() /// - RunConsole() @@ -250,7 +283,7 @@ public void Run() { ensure_environment(); extract_resources(); - + ensure_original_configuration(new List(), (config) => { @@ -265,7 +298,7 @@ public void Run() /// /// Call this method to run chocolatey after you have set the options. /// WARNING: Once this is called, you will not be able to register additional container components. - /// WARNING: Ensure you don't nest additional calls to running Chocolatey here. + /// WARNING: Ensure you don't nest additional calls to running Chocolatey here. /// Make a call, then finish up and make another call. This includes /// - Run() /// - RunConsole() @@ -277,7 +310,7 @@ public void RunConsole(string[] args) { ensure_environment(); extract_resources(); - + ensure_original_configuration(new List(args), (config) => { @@ -290,7 +323,7 @@ public void RunConsole(string[] args) /// /// Run chocolatey after setting the options, and list the results. /// WARNING: Once this is called, you will not be able to register additional container components. - /// WARNING: Ensure you don't nest additional calls to running Chocolatey here. + /// WARNING: Ensure you don't nest additional calls to running Chocolatey here. /// Make a call, then finish up and make another call. This includes /// - Run() /// - RunConsole() @@ -302,12 +335,12 @@ public IEnumerable List() { ensure_environment(); extract_resources(); - + return ensure_original_configuration(new List(), (config) => { var runner = new GenericRunner(); - return runner.list(config, _container, isConsole: false, parseArgs: null); + return runner.list(config, _container, isConsole: false, parseArgs: null); }); } @@ -315,7 +348,7 @@ public IEnumerable List() /// Run chocolatey after setting the options, /// and get the count of items that would be returned if you listed the results. /// WARNING: Once this is called, you will not be able to register additional container components. - /// WARNING: Ensure you don't nest additional calls to running Chocolatey here. + /// WARNING: Ensure you don't nest additional calls to running Chocolatey here. /// Make a call, then finish up and make another call. This includes /// - Run() /// - RunConsole() @@ -354,7 +387,7 @@ public ChocolateyConfiguration GetConfiguration() new List(), (config) => config ); - + return configuration; } @@ -369,9 +402,9 @@ private void ensure_original_configuration(IList args, Action - /// After the construction of GetChocolatey, we should have a ChocolateyConfiguration or LicensedChocolateyConfiguration loaded into the environment. - /// We want that original configuration to live on between calls to the API. This function ensures that the - /// original default configuration from new() is reset after each command finishes running, even as each command + /// After the construction of GetChocolatey, we should have a ChocolateyConfiguration or LicensedChocolateyConfiguration loaded into the environment. + /// We want that original configuration to live on between calls to the API. This function ensures that the + /// original default configuration from new() is reset after each command finishes running, even as each command /// may make changes to the configuration it uses. /// /// @@ -389,6 +422,12 @@ private T ensure_original_configuration(IList args, Func(IList args, Func - /// Creates the configuration. + /// Creates the configuration. /// This should never be called directly, as it can cause issues that are very difficult to debug. /// /// The arguments. @@ -420,6 +459,8 @@ private ChocolateyConfiguration create_configuration(IList args) configuration.PromptForConfirmation = false; configuration.AcceptLicense = true; + + if (_propConfig != null) { _propConfig.Invoke(configuration); @@ -459,6 +500,7 @@ private void extract_resources() "tools" }; +#if !NoResources try { AssemblyFileExtractor.extract_all_resources_to_relative_directory(_container.GetInstance(), Assembly.GetAssembly(typeof(ChocolateyResourcesAssembly)), ApplicationParameters.InstallLocation, folders, ApplicationParameters.ChocolateyFileResources); @@ -466,9 +508,9 @@ private void extract_resources() catch (Exception ex) { this.Log().Warn(ChocolateyLoggers.Important, "Please ensure that ChocolateyInstall environment variable is set properly and you've run once as an administrator to ensure all resources are extracted."); - this.Log().Error("Unable to extract resources. Please ensure the ChocolateyInstall environment variable is set properly. You may need to run once as an admin to ensure all resources are extracted. Details:{0} {1}".format_with(Environment.NewLine,ex.ToString())); + this.Log().Error("Unable to extract resources. Please ensure the ChocolateyInstall environment variable is set properly. You may need to run once as an admin to ensure all resources are extracted. Details:{0} {1}".format_with(Environment.NewLine, ex.ToString())); } - +#endif } } diff --git a/src/chocolatey/ILogExtensions.cs b/src/chocolatey/ILogExtensions.cs index f1c6d6572c..d813e84bce 100644 --- a/src/chocolatey/ILogExtensions.cs +++ b/src/chocolatey/ILogExtensions.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey/LogExtensions.cs b/src/chocolatey/LogExtensions.cs index f1840aafe8..355fd03ed4 100644 --- a/src/chocolatey/LogExtensions.cs +++ b/src/chocolatey/LogExtensions.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey/ObjectExtensions.cs b/src/chocolatey/ObjectExtensions.cs index f57af8bca6..c94d13d579 100644 --- a/src/chocolatey/ObjectExtensions.cs +++ b/src/chocolatey/ObjectExtensions.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey/Properties/AssemblyInfo.cs b/src/chocolatey/Properties/AssemblyInfo.cs index 4419ae3a9d..2d643300ca 100644 --- a/src/chocolatey/Properties/AssemblyInfo.cs +++ b/src/chocolatey/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey/StringExtensions.cs b/src/chocolatey/StringExtensions.cs index 3be128cf79..c9a638a939 100644 --- a/src/chocolatey/StringExtensions.cs +++ b/src/chocolatey/StringExtensions.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey/TypeExtensions.cs b/src/chocolatey/TypeExtensions.cs index 61e3ea2889..dd0c6b0b66 100644 --- a/src/chocolatey/TypeExtensions.cs +++ b/src/chocolatey/TypeExtensions.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey/chocolatey.csproj b/src/chocolatey/chocolatey.csproj index 230373684e..8b4976c53e 100644 --- a/src/chocolatey/chocolatey.csproj +++ b/src/chocolatey/chocolatey.csproj @@ -38,6 +38,18 @@ ..\..\docs\logo\chocolatey.ico + + true + bin\NoResources\ + TRACE;NoResources + true + bin\Release\chocolatey.xml + true + pdbonly + AnyCPU + prompt + MinimumRecommendedRules.ruleset + False @@ -110,7 +122,12 @@ + + + + + @@ -324,16 +341,25 @@ Properties\chocolatey.ico + + + + + {AF584111-FE32-448D-A1D0-63217AF8B43C} + chocolatey.resources + + + + - - {AF584111-FE32-448D-A1D0-63217AF8B43C} - chocolatey.resources - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/chocolatey/infrastructure/logging/log4net.nocolor.config.xml b/src/chocolatey/infrastructure/logging/log4net.nocolor.config.xml new file mode 100644 index 0000000000..b7bc6a24a5 --- /dev/null +++ b/src/chocolatey/infrastructure/logging/log4net.nocolor.config.xml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/chocolatey/infrastructure/platforms/Platform.cs b/src/chocolatey/infrastructure/platforms/Platform.cs index 5f83a763bd..6afd7568ab 100644 --- a/src/chocolatey/infrastructure/platforms/Platform.cs +++ b/src/chocolatey/infrastructure/platforms/Platform.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey/infrastructure/platforms/PlatformType.cs b/src/chocolatey/infrastructure/platforms/PlatformType.cs index 9bee5ad45a..d0008e4ba2 100644 --- a/src/chocolatey/infrastructure/platforms/PlatformType.cs +++ b/src/chocolatey/infrastructure/platforms/PlatformType.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey/infrastructure/powershell/PoshHost.cs b/src/chocolatey/infrastructure/powershell/PoshHost.cs index b8584fc0c8..5914c42cf3 100644 --- a/src/chocolatey/infrastructure/powershell/PoshHost.cs +++ b/src/chocolatey/infrastructure/powershell/PoshHost.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey/infrastructure/powershell/PoshHostRawUserInterface.cs b/src/chocolatey/infrastructure/powershell/PoshHostRawUserInterface.cs index d320965062..deef05d9e2 100644 --- a/src/chocolatey/infrastructure/powershell/PoshHostRawUserInterface.cs +++ b/src/chocolatey/infrastructure/powershell/PoshHostRawUserInterface.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey/infrastructure/powershell/PoshHostUserInterface.cs b/src/chocolatey/infrastructure/powershell/PoshHostUserInterface.cs index cfe92adbfc..22525c9e8e 100644 --- a/src/chocolatey/infrastructure/powershell/PoshHostUserInterface.cs +++ b/src/chocolatey/infrastructure/powershell/PoshHostUserInterface.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey/infrastructure/registration/Bootstrap.cs b/src/chocolatey/infrastructure/registration/Bootstrap.cs index 9d6664db56..70f19307ef 100644 --- a/src/chocolatey/infrastructure/registration/Bootstrap.cs +++ b/src/chocolatey/infrastructure/registration/Bootstrap.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey/infrastructure/registration/SecurityProtocol.cs b/src/chocolatey/infrastructure/registration/SecurityProtocol.cs index 38cc2b2f45..60013d899c 100644 --- a/src/chocolatey/infrastructure/registration/SecurityProtocol.cs +++ b/src/chocolatey/infrastructure/registration/SecurityProtocol.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey/infrastructure/registration/SimpleInjectorContainer.cs b/src/chocolatey/infrastructure/registration/SimpleInjectorContainer.cs index 217040a32b..a561e5c095 100644 --- a/src/chocolatey/infrastructure/registration/SimpleInjectorContainer.cs +++ b/src/chocolatey/infrastructure/registration/SimpleInjectorContainer.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey/infrastructure/registration/SimpleInjectorContainerResolutionBehavior.cs b/src/chocolatey/infrastructure/registration/SimpleInjectorContainerResolutionBehavior.cs index ce1232f97c..2095c14d40 100644 --- a/src/chocolatey/infrastructure/registration/SimpleInjectorContainerResolutionBehavior.cs +++ b/src/chocolatey/infrastructure/registration/SimpleInjectorContainerResolutionBehavior.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey/infrastructure/results/IResult.cs b/src/chocolatey/infrastructure/results/IResult.cs index 8524bfbd8c..50c3f1a81b 100644 --- a/src/chocolatey/infrastructure/results/IResult.cs +++ b/src/chocolatey/infrastructure/results/IResult.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey/infrastructure/results/PackageResult.cs b/src/chocolatey/infrastructure/results/PackageResult.cs index c6e30f5486..f8bd452aeb 100644 --- a/src/chocolatey/infrastructure/results/PackageResult.cs +++ b/src/chocolatey/infrastructure/results/PackageResult.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey/infrastructure/results/PowerShellExecutionResults.cs b/src/chocolatey/infrastructure/results/PowerShellExecutionResults.cs index 3def66a1ba..c4b671e6ca 100644 --- a/src/chocolatey/infrastructure/results/PowerShellExecutionResults.cs +++ b/src/chocolatey/infrastructure/results/PowerShellExecutionResults.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey/infrastructure/results/Result.cs b/src/chocolatey/infrastructure/results/Result.cs index 9ad3b4c1bb..f715e5b10d 100644 --- a/src/chocolatey/infrastructure/results/Result.cs +++ b/src/chocolatey/infrastructure/results/Result.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey/infrastructure/results/ResultMessage.cs b/src/chocolatey/infrastructure/results/ResultMessage.cs index 0752f86329..a26512c1d1 100644 --- a/src/chocolatey/infrastructure/results/ResultMessage.cs +++ b/src/chocolatey/infrastructure/results/ResultMessage.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey/infrastructure/results/ResultType.cs b/src/chocolatey/infrastructure/results/ResultType.cs index f3caa962f6..faa05a9c66 100644 --- a/src/chocolatey/infrastructure/results/ResultType.cs +++ b/src/chocolatey/infrastructure/results/ResultType.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey/infrastructure/services/EventSubscriptionManagerService.cs b/src/chocolatey/infrastructure/services/EventSubscriptionManagerService.cs index 3c68ee712b..900d52b476 100644 --- a/src/chocolatey/infrastructure/services/EventSubscriptionManagerService.cs +++ b/src/chocolatey/infrastructure/services/EventSubscriptionManagerService.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey/infrastructure/services/IDateTimeService.cs b/src/chocolatey/infrastructure/services/IDateTimeService.cs index 1feea1c197..c96e3d408d 100644 --- a/src/chocolatey/infrastructure/services/IDateTimeService.cs +++ b/src/chocolatey/infrastructure/services/IDateTimeService.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey/infrastructure/services/IEventSubscriptionManagerService.cs b/src/chocolatey/infrastructure/services/IEventSubscriptionManagerService.cs index ccaa13f368..2adc6d40d2 100644 --- a/src/chocolatey/infrastructure/services/IEventSubscriptionManagerService.cs +++ b/src/chocolatey/infrastructure/services/IEventSubscriptionManagerService.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey/infrastructure/services/IRegularExpressionService.cs b/src/chocolatey/infrastructure/services/IRegularExpressionService.cs index e71b9ca229..99d95d27a9 100644 --- a/src/chocolatey/infrastructure/services/IRegularExpressionService.cs +++ b/src/chocolatey/infrastructure/services/IRegularExpressionService.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey/infrastructure/services/IXmlService.cs b/src/chocolatey/infrastructure/services/IXmlService.cs index 3810fa6b86..73cbd75678 100644 --- a/src/chocolatey/infrastructure/services/IXmlService.cs +++ b/src/chocolatey/infrastructure/services/IXmlService.cs @@ -1,13 +1,13 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 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. @@ -26,6 +26,15 @@ public interface IXmlService /// XmlType deserialize(string xmlFilePath); + /// + /// Deserializes the specified XML file path. + /// + /// The type of the ml type. + /// The XML file path. + /// The number of times to attempt deserialization on event of a failure. + /// + XmlType deserialize(string xmlFilePath, int retryCount); + /// /// Serializes the specified XML type. /// diff --git a/src/chocolatey/infrastructure/services/RegularExpressionService.cs b/src/chocolatey/infrastructure/services/RegularExpressionService.cs index a190642cdd..0590f0a3dc 100644 --- a/src/chocolatey/infrastructure/services/RegularExpressionService.cs +++ b/src/chocolatey/infrastructure/services/RegularExpressionService.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey/infrastructure/services/SystemDateTimeService.cs b/src/chocolatey/infrastructure/services/SystemDateTimeService.cs index fc350664c8..5c210b2c64 100644 --- a/src/chocolatey/infrastructure/services/SystemDateTimeService.cs +++ b/src/chocolatey/infrastructure/services/SystemDateTimeService.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey/infrastructure/services/SystemDateTimeUtcService.cs b/src/chocolatey/infrastructure/services/SystemDateTimeUtcService.cs index d2da021fb2..0212558288 100644 --- a/src/chocolatey/infrastructure/services/SystemDateTimeUtcService.cs +++ b/src/chocolatey/infrastructure/services/SystemDateTimeUtcService.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey/infrastructure/services/XmlService.cs b/src/chocolatey/infrastructure/services/XmlService.cs index 6989f85b8d..cd5e93e7dd 100644 --- a/src/chocolatey/infrastructure/services/XmlService.cs +++ b/src/chocolatey/infrastructure/services/XmlService.cs @@ -1,13 +1,13 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 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. @@ -45,75 +45,81 @@ public XmlService(IFileSystem fileSystem, IHashProvider hashProvider) public XmlType deserialize(string xmlFilePath) { - return FaultTolerance.retry(3, () => GlobalMutex.enter( - () => - { - this.Log().Trace("Entered mutex to deserialize '{0}'".format_with(xmlFilePath)); - - return FaultTolerance.try_catch_with_logging_exception( - () => - { - var xmlSerializer = new XmlSerializer(typeof(XmlType)); - using (var fileStream = _fileSystem.open_file_readonly(xmlFilePath)) - using (var fileReader = new StreamReader(fileStream)) - using (var xmlReader = XmlReader.Create(fileReader)) - { - if (!xmlSerializer.CanDeserialize(xmlReader)) - { - this.Log().Warn("Cannot deserialize response of type {0}", typeof(XmlType)); - return default(XmlType); - } - - try - { - return (XmlType)xmlSerializer.Deserialize(xmlReader); - } - catch (InvalidOperationException ex) - { - // Check if its just a malformed document. - if (ex.Message.Contains("There is an error in XML document")) - { - // If so, check for a backup file and try an parse that. - if (_fileSystem.file_exists(xmlFilePath + ".backup")) - { - using (var backupStream = _fileSystem.open_file_readonly(xmlFilePath + ".backup")) - using (var backupReader = new StreamReader(backupStream)) - using (var backupXmlReader = XmlReader.Create(backupReader)) - { - var validConfig = (XmlType)xmlSerializer.Deserialize(backupXmlReader); - - // If there's no errors and it's valid, go ahead and replace the bad file with the backup. - if (validConfig != null) - { - _fileSystem.copy_file(xmlFilePath + ".backup", xmlFilePath, overwriteExisting: true); - } - - return validConfig; - } - } - } - - throw; - } - finally - { - foreach (var updateFile in _fileSystem.get_files(_fileSystem.get_directory_name(xmlFilePath), "*.update").or_empty_list_if_null()) - { - this.Log().Debug("Removing '{0}'".format_with(updateFile)); - FaultTolerance.try_catch_with_logging_exception( - () => _fileSystem.delete_file(updateFile), - errorMessage: "Unable to remove update file", - logDebugInsteadOfError: true, - isSilent: true - ); - } - } - } - }, - "Error deserializing response of type {0}".format_with(typeof(XmlType)), - throwError: true); + return deserialize(xmlFilePath, 3); + } - }, MUTEX_TIMEOUT), + public XmlType deserialize(string xmlFilePath, int retryCount) + { + return FaultTolerance.retry(retryCount, () => GlobalMutex.enter( + () => + { + this.Log().Trace("Entered mutex to deserialize '{0}'".format_with(xmlFilePath)); + + return FaultTolerance.try_catch_with_logging_exception( + () => + { + var xmlSerializer = new XmlSerializer(typeof(XmlType)); + using (var fileStream = _fileSystem.open_file_readonly(xmlFilePath)) + using (var fileReader = new StreamReader(fileStream)) + using (var xmlReader = XmlReader.Create(fileReader)) + { + if (!xmlSerializer.CanDeserialize(xmlReader)) + { + this.Log().Warn("Cannot deserialize response of type {0}", typeof(XmlType)); + return default(XmlType); + } + + try + { + return (XmlType)xmlSerializer.Deserialize(xmlReader); + } + catch (InvalidOperationException ex) + { + // Check if its just a malformed document. + if (ex.Message.Contains("There is an error in XML document")) + { + // If so, check for a backup file and try an parse that. + if (_fileSystem.file_exists(xmlFilePath + ".backup")) + { + using (var backupStream = _fileSystem.open_file_readonly(xmlFilePath + ".backup")) + using (var backupReader = new StreamReader(backupStream)) + using (var backupXmlReader = XmlReader.Create(backupReader)) + { + var validConfig = (XmlType)xmlSerializer.Deserialize(backupXmlReader); + + // If there's no errors and it's valid, go ahead and replace the bad file with the backup. + if (validConfig != null) + { + _fileSystem.copy_file(xmlFilePath + ".backup", xmlFilePath, overwriteExisting: true); + } + + return validConfig; + } + } + } + + throw; + + } + finally + { + foreach (var updateFile in _fileSystem.get_files(_fileSystem.get_directory_name(xmlFilePath), "*.update").or_empty_list_if_null()) + { + this.Log().Debug("Removing '{0}'".format_with(updateFile)); + FaultTolerance.try_catch_with_logging_exception( + () => _fileSystem.delete_file(updateFile), + errorMessage: "Unable to remove update file", + logDebugInsteadOfError: true, + isSilent: true + ); + } + } + } + }, + "Error deserializing response of type {0}".format_with(typeof(XmlType)), + throwError: true); + + }, MUTEX_TIMEOUT), waitDurationMilliseconds: 200, increaseRetryByMilliseconds: 200); } diff --git a/src/chocolatey/infrastructure/synchronization/GlobalMutex.cs b/src/chocolatey/infrastructure/synchronization/GlobalMutex.cs index 8693a756a7..6b7375585d 100644 --- a/src/chocolatey/infrastructure/synchronization/GlobalMutex.cs +++ b/src/chocolatey/infrastructure/synchronization/GlobalMutex.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey/infrastructure/tasks/ITask.cs b/src/chocolatey/infrastructure/tasks/ITask.cs index fb024fed1a..41e25f082b 100644 --- a/src/chocolatey/infrastructure/tasks/ITask.cs +++ b/src/chocolatey/infrastructure/tasks/ITask.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey/infrastructure/tokens/TokenReplacer.cs b/src/chocolatey/infrastructure/tokens/TokenReplacer.cs index 33e0d39326..e4956eed96 100644 --- a/src/chocolatey/infrastructure/tokens/TokenReplacer.cs +++ b/src/chocolatey/infrastructure/tokens/TokenReplacer.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey/infrastructure/tolerance/FaultTolerance.cs b/src/chocolatey/infrastructure/tolerance/FaultTolerance.cs index 1f9bed423f..0ebed57f0e 100644 --- a/src/chocolatey/infrastructure/tolerance/FaultTolerance.cs +++ b/src/chocolatey/infrastructure/tolerance/FaultTolerance.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/chocolatey/infrastructure/xml/XmlCData.cs b/src/chocolatey/infrastructure/xml/XmlCData.cs index 91b6914ec6..bb85325367 100644 --- a/src/chocolatey/infrastructure/xml/XmlCData.cs +++ b/src/chocolatey/infrastructure/xml/XmlCData.cs @@ -1,4 +1,4 @@ -// Copyright © 2017 Chocolatey Software, Inc +// Copyright © 2017 - 2018 Chocolatey Software, Inc // Copyright © 2011 - 2017 RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License");