Skip to content

Commit

Permalink
Merge branch 'stable'
Browse files Browse the repository at this point in the history
* stable:
  (version) 0.10.7
  (doc) update CHANGELOG/nuspec
  (GH-1328) Serialize/deserialize package files warnings
  (maint) clean up install/uninstall template
  (GH-1330) Use $packageArgs in default uninstall script
  (GH-1323) File/File64 as params not aliases
  (GH-1324) requestedExecutionLevel = asInvoker
  (GH-1327) AutoUninstaller - split multiple file paths
  (maint) add parameter props to UseOriginalLocation
  (maint) formatting
  (GH-1323) rename file to downloadFilePath
  (GH-1325) List/Search - no fail on local directory
  (docs) add to PowerShell CONTRIBUTING
  (GH-1326) Always show heading
  (GH-976) Use Write-FunctionCallLogMessage
  (maint) formatting
  (GH-1322) Fix: search - exact ignores page/page-size
  • Loading branch information
ferventcoder committed Jun 8, 2017
2 parents abd62bf + 01f25ac commit e96fb15
Show file tree
Hide file tree
Showing 27 changed files with 366 additions and 176 deletions.
4 changes: 2 additions & 2 deletions .uppercut
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
<property name="version.use_semanticversioning" value="true" overwrite="false" />
<property name="version.major" value="0" overwrite="false" />
<property name="version.minor" value="10" overwrite="false" />
<property name="version.patch" value="6" overwrite="false" />
<property name="version.fix" value="1" overwrite="false" />
<property name="version.patch" value="7" overwrite="false" />
<property name="version.fix" value="0" overwrite="false" />
<property name="version.nuget.prerelease" value="" overwrite="false" />
<property name="version.use.build_date" value="false" overwrite="false" />
<property name="assembly.description" value="${project.name} is a product of ${company.name} - All Rights Reserved." overwrite="false" />
Expand Down
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,34 @@ This covers changes for the "chocolatey" and "chocolatey.lib" packages, which ar

**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.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).

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)
* Fix - When version is four digits, Chocolatey version heading is not shown - see [#1326](https://github.com/chocolatey/choco/issues/1326)
* Fix - search / list - page/page-size not honored for exact search in 0.10.6 - see [#1322](https://github.com/chocolatey/choco/issues/1322)
* 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)
Expand Down
5 changes: 5 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,12 @@ Start with [Prerequisites](#prerequisites) and make sure you can sign the Contri

#### PowerShell
* PowerShell must be CRLF and UTF-8. Git attributes are not used, so Git will not ensure this for you.
* The minimum version of PowerShell this must work with is v2. This makes things somewhat more limited but compatible across the board for all areas Chocolatey is deployed. It is getting harder to find a reference for PowerShell v2, but this is a good one: http://adamringenberg.com/powershell2/table-of-contents/.
* If you add a new file, also ensure you add it to the Visual Studio project and ensure it becomes an embedded resource.
* The last parameter in every function must be `[parameter(ValueFromRemainingArguments = $true)][Object[]] $ignoredArguments`. This allows for future expansion and compatibility - as new parameters are introduced and used, it doesn't break older versions of Chocolatey.
* Do not add new positional elements to functions. We want to promote using named parameters in calling functions.
* Do not remove any existing positional elements from functions. We need to maintain compatibility with older versions of Chocolatey.
* One of the first calls in a function is to debug what was passed to it - `Write-FunctionCallLogMessage -Invocation $MyInvocation -Parameters $PSBoundParameters`

### Debugging / Testing

Expand Down
52 changes: 34 additions & 18 deletions docs/generated/HelpersInstallChocolateyPackage.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ Install-ChocolateyPackage `
[-Checksum64 <String>] `
[-ChecksumType64 <String>] `
[-Options <Hashtable>] `
[-File <String>] `
[-File64 <String>] `
[-UseOnlyPackageSilentArguments] `
[-UseOriginalLocation] `
[-IgnoredArguments <Object[]>] [<CommonParameters>]
Expand Down Expand Up @@ -211,16 +213,9 @@ a 32 bit installation on a 64 bit system.

Prefer HTTPS when available. Can be HTTP, FTP, or File URIs.

In 0.10.6+, `File` and `FileFullPath` are aliases for Url. These
aliases, if used in earlier versions of Chocolatey, produce `ERROR:
Cannot bind parameter because parameter 'fileType' is specified more
than once.` See https://github.com/chocolatey/choco/issues/1284. Do not
use these aliases with the community package repository until January
2018.

Property | Value
---------------------- | ------------------
Aliases | file, fileFullPath
---------------------- | -----
Aliases |
Required? | false
Position? | 4
Default Value |
Expand All @@ -237,16 +232,9 @@ this parameter.

Prefer HTTPS when available. Can be HTTP, FTP, or File URIs.

In 0.10.6+, `File64` and `FileFullPath64` are aliases for Url64Bit.
These aliases, if used in earlier versions of Chocolatey, produce
`ERROR: Cannot bind parameter because parameter 'fileType' is specified
more than once.` See https://github.com/chocolatey/choco/issues/1284.
Do not use these aliases with the community package repository until
January 2018.

Property | Value
---------------------- | -----------------------------
Aliases | url64, file64, fileFullPath64
---------------------- | -----
Aliases | url64
Required? | false
Position? | 5
Default Value |
Expand Down Expand Up @@ -367,6 +355,34 @@ Position? | named
Default Value | @{Headers=@{}}
Accept Pipeline Input? | false

### -File [&lt;String&gt;]
Will be used for Url if Url is empty. Available in 0.10.7+.

This parameter provides compatibility, but should not be used directly
and not with the community package repository until January 2018.

Property | Value
---------------------- | ------------
Aliases | fileFullPath
Required? | false
Position? | named
Default Value |
Accept Pipeline Input? | false

### -File64 [&lt;String&gt;]
Will be used for Url64bit if Url64bit is empty. Available in 0.10.7+.

This parameter provides compatibility, but should not be used directly
and not with the community package repository until January 2018.

Property | Value
---------------------- | --------------
Aliases | fileFullPath64
Required? | false
Position? | named
Default Value |
Accept Pipeline Input? | false

### -UseOnlyPackageSilentArguments
Do not allow choco to provide/merge additional silent arguments and only
use the ones available with the package. Available in 0.9.10+.
Expand Down
26 changes: 17 additions & 9 deletions docs/generated/HelpersInstallChocolateyVsixPackage.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Install-ChocolateyVsixPackage `
[-Checksum <String>] `
[-ChecksumType <String>] `
[-Options <Hashtable>] `
[-File <String>] `
[-IgnoredArguments <Object[]>] [<CommonParameters>]
~~~

Expand Down Expand Up @@ -95,16 +96,9 @@ Prefer HTTPS when available. Can be HTTP, FTP, or File URIs.

In 0.10.4+, `Url` is an alias for VsixUrl.

In 0.10.6+, `File` and `FileFullPath` are aliases for VsixUrl. These
aliases, if used in earlier versions of Chocolatey, may produce `ERROR:
Cannot bind parameter because parameter 'fileType' is specified more
than once.` See https://github.com/chocolatey/choco/issues/1284. Do not
use these aliases with the community package repository until January
2018.

Property | Value
---------------------- | -----------------------
Aliases | url, file, fileFullPath
---------------------- | -----
Aliases | url
Required? | false
Position? | 2
Default Value |
Expand Down Expand Up @@ -189,6 +183,20 @@ Position? | named
Default Value | @{Headers=@{}}
Accept Pipeline Input? | false

### -File [&lt;String&gt;]
Will be used for VsixUrl if VsixUrl is empty. Available in 0.10.7+.

This parameter provides compatibility, but should not be used directly
and not with the community package repository until January 2018.

Property | Value
---------------------- | ------------
Aliases | fileFullPath
Required? | false
Position? | named
Default Value |
Accept Pipeline Input? | false

### -IgnoredArguments [&lt;Object[]&gt;]
Allows splatting with arguments that do not apply. Do not use directly.

Expand Down
52 changes: 34 additions & 18 deletions docs/generated/HelpersInstallChocolateyZipPackage.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ Install-ChocolateyZipPackage `
[-Checksum64 <String>] `
[-ChecksumType64 <String>] `
[-Options <Hashtable>] `
[-File <String>] `
[-File64 <String>] `
[-IgnoredArguments <Object[]>] [<CommonParameters>]
~~~

Expand Down Expand Up @@ -102,16 +104,9 @@ a 32 bit installation on a 64 bit system.

Prefer HTTPS when available. Can be HTTP, FTP, or File URIs.

In 0.10.6+, `File` and `FileFullPath` are aliases for Url. These
aliases, if used in earlier versions of Chocolatey, may produce `ERROR:
Cannot bind parameter because parameter 'fileType' is specified more
than once.` See https://github.com/chocolatey/choco/issues/1284. Do not
use these aliases with the community package repository until January
2018.

Property | Value
---------------------- | ------------------
Aliases | file, fileFullPath
---------------------- | -----
Aliases |
Required? | false
Position? | 2
Default Value |
Expand Down Expand Up @@ -142,16 +137,9 @@ this parameter.

Prefer HTTPS when available. Can be HTTP, FTP, or File URIs.

In 0.10.6+, `File64` and `FileFullPath64` are aliases for Url64Bit.
These aliases, if used in earlier versions of Chocolatey, may produce
`ERROR: Cannot bind parameter because parameter 'fileType' is specified
more than once.` See https://github.com/chocolatey/choco/issues/1284.
Do not use these aliases with the community package repository until
January 2018.

Property | Value
---------------------- | -----------------------------
Aliases | url64, file64, fileFullPath64
---------------------- | -----
Aliases | url64
Required? | false
Position? | 4
Default Value |
Expand Down Expand Up @@ -270,6 +258,34 @@ Position? | named
Default Value | @{Headers=@{}}
Accept Pipeline Input? | false

### -File [&lt;String&gt;]
Will be used for Url if Url is empty. Available in 0.10.7+.

This parameter provides compatibility, but should not be used directly
and not with the community package repository until January 2018.

Property | Value
---------------------- | ------------
Aliases | fileFullPath
Required? | false
Position? | named
Default Value |
Accept Pipeline Input? | false

### -File64 [&lt;String&gt;]
Will be used for Url64bit if Url64bit is empty. Available in 0.10.7+.

This parameter provides compatibility, but should not be used directly
and not with the community package repository until January 2018.

Property | Value
---------------------- | --------------
Aliases | fileFullPath64
Required? | false
Position? | named
Default Value |
Accept Pipeline Input? | false

### -IgnoredArguments [&lt;Object[]&gt;]
Allows splatting with arguments that do not apply. Do not use directly.

Expand Down
25 changes: 25 additions & 0 deletions nuget/chocolatey/chocolatey.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,34 @@ In that mess there is a link to the [PowerShell Chocolatey module reference](htt
<releaseNotes>
See all - https://github.com/chocolatey/choco/blob/stable/CHANGELOG.md

## 0.10.7

### 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).

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)
* Fix - When version is four digits, Chocolatey version heading is not shown - see [#1326](https://github.com/chocolatey/choco/issues/1326)
* Fix - search / list - page/page-size not honored for exact search in 0.10.6 - see [#1322](https://github.com/chocolatey/choco/issues/1322)
* 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

### 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)
Expand Down
9 changes: 1 addition & 8 deletions src/chocolatey.console/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,7 @@ private static void Main(string[] args)
#if DEBUG
"chocolatey".Log().Info(ChocolateyLoggers.Important, () => "{0} v{1}{2} (DEBUG BUILD)".format_with(ApplicationParameters.Name, config.Information.ChocolateyProductVersion, license.is_licensed_version() ? " {0}".format_with(license.LicenseType) : string.Empty));
#else
if (config.Information.ChocolateyVersion == config.Information.ChocolateyProductVersion && args.Any())
{
"LogFileOnly".Log().Info(() => "{0} v{1}{2}".format_with(ApplicationParameters.Name, config.Information.ChocolateyProductVersion, license.is_licensed_version() ? " {0}".format_with(license.LicenseType) : string.Empty));
}
else
{
"chocolatey".Log().Info(ChocolateyLoggers.Important, () => "{0} v{1}{2}".format_with(ApplicationParameters.Name, config.Information.ChocolateyProductVersion, license.is_licensed_version() ? " {0}".format_with(license.LicenseType) : string.Empty));
}
"chocolatey".Log().Info(ChocolateyLoggers.Important, () => "{0} v{1}{2}".format_with(ApplicationParameters.Name, config.Information.ChocolateyProductVersion, license.is_licensed_version() ? " {0}".format_with(license.LicenseType) : string.Empty));
#endif
if (args.Length == 0)
{
Expand Down
6 changes: 3 additions & 3 deletions src/chocolatey.console/choco.exe.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
Set level to "asInvoker" when you want choco to run under the context
of the user invoking. This is the same as Chocolatey behavior prior
to 0.10.4.
to 0.10.4 and after 0.10.7.
Set level to "requireAdministrator" to only allow administrators to
run Chocolatey.
Set level to "highestAvailable" to allow non-admins to run in
non-administrative context, but require administrators to always run
with administrative privileges. This is the recommended and default
behavior of Chocolatey v0.10.4+.
behavior of Chocolatey v0.10.4-0.10.6.1.
NOTE: Currently you will need to make this change every time
Chocolatey is re-installed or upgraded (every new version). At least
Expand All @@ -28,7 +28,7 @@
and Registry Virtualization for backward compatibility then delete
the requestedExecutionLevel node.
-->
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ param(
)

Write-FunctionCallLogMessage -Invocation $MyInvocation -Parameters $PSBoundParameters

if(-not(Test-Path $executable)){
$errorMessage = "`'$executable`' does not exist, not able to create association"
Write-Error $errorMessage
Expand Down
Loading

0 comments on commit e96fb15

Please sign in to comment.