Skip to content

Commit 0ebdea0

Browse files
committed
Conditionally set build property for PSGallery API key
1 parent 5e431a5 commit 0ebdea0

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

psakeFile.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
properties {
2-
$PSBPreference.Publish.PSRepositoryApiKey = $galleryApiKey.GetNetworkCredential().password
2+
if ($galleryApiKey) {
3+
$PSBPreference.Publish.PSRepositoryApiKey = $galleryApiKey.GetNetworkCredential().password
4+
}
35
}
46

57
task default -depends test

0 commit comments

Comments
 (0)