Skip to content

Commit 2d23237

Browse files
committed
Bug: bug on publish.ps1
Fixes #27
1 parent 53148ff commit 2d23237

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

publish.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ if ( [string]::IsNullOrWhiteSpace($NuGetApiKey) ) {
3535

3636
if ( [string]::IsNullOrWhiteSpace($env:NUGETAPIKEY) ) {
3737
Write-Error -Message '$Env:NUGETAPIKEY is not set. Try running `$Env:NUGETAPIKEY = fdf nuget | Get-SecretValue`'
38+
Write-Error -Message '$Env:NUGETAPIKEY is not set. Try running `$Env:NUGETAPIKEY = (Find-DocsFile nugetapikey | rsk | Get-SecretData).Get()`'
3839
return
3940
}
4041

@@ -68,10 +69,10 @@ if ($Force -and -not $Confirm){
6869
}
6970

7071
# Publish the module with ShouldProcess (-whatif, -confirm)
71-
if ($PSCmdlet.ShouldProcess($psd, "Publish-Module")) {
72+
if ($PSCmdlet.ShouldProcess($psdPath, "Publish-Module")) {
7273
$message ="Publishing {0} {1} {2} to PSGallery ..." -f $($psdPath.Name), $($psd1.ModuleVersion), $($psd1.PrivateData.pSData.Prerelease)
7374
# show an empty line
7475
Write-Information -InformationAction Continue -Message ""
7576
Write-Information -InformationAction Continue -Message $message
76-
publish-Module -Name $psd -NuGetApiKey $NuGetApiKey
77+
publish-Module -Name $psdPath -NuGetApiKey $NuGetApiKey
7778
}

0 commit comments

Comments
 (0)