Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit ce057be

Browse files
committedAug 7, 2020
fix push
1 parent a3b1f7e commit ce057be

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎fcs/build.fsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,16 @@ let packagesPatterns =
9595
++ (sprintf "%s/FSharp.DependencyManager.Nuget.%s.nupkg" packagesDir release.NugetVersion)
9696

9797
Target.create "PublishNuGet" (fun _ ->
98-
let apikey = lazy(Environment.environVarOrDefault "NUGET_APIKEY" (UserInput.getUserPassword "Nuget API Key: "))
98+
let apikey =
99+
Environment.environVarOrNone "NUGET_APIKEY"
100+
|> Option.defaultWith (fun _ -> UserInput.getUserPassword "Nuget API Key: ")
99101

100102
packagesPatterns
101103
|> Seq.iter (fun nupkg ->
102104
DotNet.nugetPush (fun p -> {
103105
p with
104106
PushParams = { p.PushParams with
105-
ApiKey = Some apikey.Value
107+
ApiKey = Some apikey
106108
Source = Some "https://api.nuget.org/v3/index.json" }
107109
}) nupkg
108110
)

0 commit comments

Comments
 (0)
Please sign in to comment.