Make sure ref is not null or empty

This commit is contained in:
Aiqiao Yan committed 2020-05-11 10:16:07 -04:00
1 parent ccc66f769e
commit 2403bbedac
3 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -3309,7 +3309,7 @@ exports.resolvePaths = resolvePaths;
// Cache token authorized for all events that are tied to a ref
// See GitHub Context https://help.github.com/actions/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions#github-context
function isValidEvent() {
return constants_1.RefKey in process.env;
return constants_1.RefKey in process.env && Boolean(process.env[constants_1.RefKey]);
}
exports.isValidEvent = isValidEvent;
function unlinkFile(path) {