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

Commit c154de1

Browse files
committed
Add check to confirm metadata isn't empty
1 parent e982d1c commit c154de1

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

dist/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ const detector = {
8080
};
8181
// If provided, set the metadata provided from the action workflow input
8282
const metadataInput = core.getInput('metadata');
83-
if (metadataInput === undefined) {
83+
if (metadataInput.length < 1) {
8484
(0, dependency_snapshot_action_1.run)(parseDependents, { command: 'go mod graph' }, { detector });
8585
}
8686
else {

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ const detector = {
5959

6060
// If provided, set the metadata provided from the action workflow input
6161
const metadataInput = core.getInput('metadata')
62-
63-
if (metadataInput === undefined) {
62+
if (metadataInput.length < 1) {
6463
run(parseDependents, { command: 'go mod graph' }, { detector })
6564
} else {
6665
const metadata = JSON.parse(metadataInput)

0 commit comments

Comments
 (0)