Skip to content

Commit

Permalink
(GH-1284) ensure file/filefullpath on functions
Browse files Browse the repository at this point in the history
With `Install-ChocolateyVsixPackage` and
`Install-Chocolatey-ZipPackage`, ensure that file / filefullpath are
aliases for urls (and the 64bit variants).
  • Loading branch information
ferventcoder committed May 29, 2017
1 parent def61a6 commit 6dd5408
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ 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 2018.
use these aliases with the community package repository until January
2018.
.PARAMETER Url64bit
OPTIONAL - If there is a 64 bit resource available, use this
Expand All @@ -113,7 +114,7 @@ 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
2018.
January 2018.
.PARAMETER ValidExitCodes
Array of exit codes indicating success. Defaults to `@(0)`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ 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.
.PARAMETER VsVersion
The major version number of Visual Studio where the
package should be installed. This is optional. If not
Expand Down Expand Up @@ -132,7 +139,7 @@ Install-ChocolateyZipPackage
#>
param(
[alias("name")][parameter(Mandatory=$true, Position=0)][string] $packageName,
[alias("url")][parameter(Mandatory=$false, Position=1)][string] $vsixUrl,
[alias("url","file","fileFullPath")][parameter(Mandatory=$false, Position=1)][string] $vsixUrl,
[alias("visualStudioVersion")][parameter(Mandatory=$false, Position=2)][int] $vsVersion = 0,
[parameter(Mandatory=$false)][string] $checksum = '',
[parameter(Mandatory=$false)][string] $checksumType = '',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ 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.
.PARAMETER Url64bit
OPTIONAL - If there is a 64 bit resource available, use this
parameter. Chocolatey will automatically determine if the user is
Expand All @@ -65,6 +72,13 @@ 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.
.PARAMETER UnzipLocation
This is the full path to a location to unzip the contents to, most
likely your script folder. If unzipping to your package folder, the path
Expand Down Expand Up @@ -162,11 +176,11 @@ Get-ChocolateyUnzip
#>
param(
[parameter(Mandatory=$true, Position=0)][string] $packageName,
[parameter(Mandatory=$false, Position=1)][string] $url = '',
[alias("file","fileFullPath")][parameter(Mandatory=$false, Position=1)][string] $url = '',
[parameter(Mandatory=$true, Position=2)]
[alias("destination")][string] $unzipLocation,
[parameter(Mandatory=$false, Position=3)]
[alias("url64")][string] $url64bit = '',
[alias("url64","file64","fileFullPath64")][string] $url64bit = '',
[parameter(Mandatory=$false)][string] $specificFolder ='',
[parameter(Mandatory=$false)][string] $checksum = '',
[parameter(Mandatory=$false)][string] $checksumType = '',
Expand Down

0 comments on commit 6dd5408

Please sign in to comment.