Skip to content
This repository was archived by the owner on Oct 26, 2022. It is now read-only.

Commit 7c32ffb

Browse files
cuzzlorbrandedoutcast
authored andcommitted
fix cross platform dotnet check & log missing nuget_key
fix cross platform dotnet check & log missing nuget_key * make dotnet check cross-platform (the `command` command is not available outside powershell on windows) * log output when `nuget_key` input is not supplied
1 parent a70929f commit 7c32ffb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,18 @@ function run() {
5252
// pack & push
5353
const nugetKey = process.env.INPUT_NUGET_KEY
5454

55-
if (!nugetKey)
55+
if (!nugetKey) {
56+
console.log(`😢 no nuget_key input supplied`)
5657
return
58+
}
5759

58-
if (!runCap("command -v dotnet")) {
60+
if (!runCap("dotnet --version")) {
5961
failure("😭 dotnet not found")
6062
return
6163
}
6264

6365
runProc(`dotnet pack -c Release ${projPath} -o .`)
64-
65-
if (nugetKey)
66-
runProc(`dotnet nuget push *.nupkg -s https://api.nuget.org/v3/index.json -k ${nugetKey}`)
66+
runProc(`dotnet nuget push *.nupkg -s https://api.nuget.org/v3/index.json -k ${nugetKey}`)
6767
}
6868

6969
function runCap(cmd) { return runCmd(cmd, { encoding: "utf-8" }).stdout }

0 commit comments

Comments
 (0)