Don't set outputs if empty or nil

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2021-09-24 17:22:41 +02:00
parent bf8ce2e8a5
commit 6bbb1022a9
2 changed files with 10 additions and 2 deletions

6
dist/index.js generated vendored
View File

@@ -56,7 +56,11 @@ function getMetadata() {
if (!fs_1.default.existsSync(metadataFile)) {
return undefined;
}
return fs_1.default.readFileSync(metadataFile, { encoding: 'utf-8' });
const content = fs_1.default.readFileSync(metadataFile, { encoding: 'utf-8' }).trim();
if (content === 'null') {
return undefined;
}
return content;
});
}
exports.getMetadata = getMetadata;