Skip to content

Commit 98f521d

Browse files
authored
Do a better job capturing errors, fix context variable access
1 parent 36c64d7 commit 98f521d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/package-update.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,11 @@ jobs:
3131
run: node -e "$SCRIPT"
3232
env:
3333
PKG: ${{ inputs.package }}
34-
VERSION: ${{ steps.view.version }}
34+
VERSION: ${{ steps.view.outputs.version }}
3535
SCRIPT: |
3636
const {PKG, VERSION} = process.env
37+
if (!PKG) throw new Error("Missing $PKG")
38+
if (!VERSION) throw new Error("Missing $VERSION")
3739
const pkg = JSON.parse(fs.readFileSync("package.json"))
3840
pkg.dependencies[PKG] = VERSION
3941
fs.writeFileSync("package.json", JSON.stringify(pkg, null, 2))
@@ -54,6 +56,6 @@ jobs:
5456
fi
5557
env:
5658
PKG: ${{ inputs.package }}
57-
VERSION: ${{ steps.view.version }}
59+
VERSION: ${{ steps.view.outputs.version }}
5860
ACTOR: ${{ github.actor }}
5961
TRIGGERING_ACTOR: ${{ github.triggering_actor }}

0 commit comments

Comments
 (0)