Skip to content

Commit

Permalink
(doc) Get-PackageParameters - fix example
Browse files Browse the repository at this point in the history
Ensure the example is updated to match the fixes on the wiki.
  • Loading branch information
ferventcoder committed Mar 23, 2018
1 parent b9e1474 commit 47ec81c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
7 changes: 4 additions & 3 deletions docs/generated/HelpersGetPackageParameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,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." }
~~~
Expand Down Expand Up @@ -114,7 +115,7 @@ 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
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ 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
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
Expand Down Expand Up @@ -100,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
Expand Down

0 comments on commit 47ec81c

Please sign in to comment.