Skip to content

Commit

Permalink
(maint) Fix chocolatey package install script
Browse files Browse the repository at this point in the history
There were a couple of typos for parameters, and also switch to Join-Path to build
the path to the module zip archive
  • Loading branch information
steviecoaster committed Jul 22, 2021
1 parent 184ca25 commit 3404db7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/nuget/NexuShell.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<authors>Stephen Valdinger</authors>
<projectUrl>https://github.com/steviecoaster/NexuShell</projectUrl>
<projectSourceUrl>https://github.com/steviecoaster/NexuShell</projectSourceUrl>
<iconUrl></iconUrl>
<iconUrl>https://cdn.jsdelivr.net/gh/steviecoaster/NexuShell@develop/logo/nexushell.svg</iconUrl>
<copyright>(c) 2021 steviecoaster. All rights reserved.</copyright>
<docsUrl>https://steviecoaster.dev/NexuShell/</docsUrl>
<bugTrackerUrl>https://github.com/steviecoaster/NexuShell/issues</bugTrackerUrl>
Expand Down
6 changes: 3 additions & 3 deletions src/nuget/tools/chocolateyInstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if (Test-Path -Path $savedParamsPath) {
Remove-Item -Path $savedParamsPath -Force
}

$sourcePath = Convert-Path $toolsDir\$ModuleName.*.zip
$sourcePath = Join-Path $toolsDir -ChildPath "$($ModuleName).zip"
$destinationPath = @()

$PathSegment = @{
Expand All @@ -30,14 +30,14 @@ $PathSegment = @{

$Parameters = Get-PackageParameters

if (-not $Parameters.ContainsKey('Windows') -and -not $Parameter.ContainsKey('Core')) {
if (-not $Parameters.ContainsKey('Windows') -and -not $Parameters.ContainsKey('Core')) {
$Parameters += @{
Windows = $PSVersionTable.PSVersion.Major -le 5
Core = $PSVersionTable.PSVersion.Major -gt 5
}
}

if (-not $Parameters.ContainsKey('AllUsers') -and -not $Parameter.ContainsKey('CurrentUser')) {
if (-not $Parameters.ContainsKey('AllUsers') -and -not $Parameters.ContainsKey('CurrentUser')) {
$Parameters += @{
AllUsers = Test-ProcessAdminRights
CurrentUser = -not (Test-ProcessAdminRights)
Expand Down

0 comments on commit 3404db7

Please sign in to comment.