Skip to content

Commit

Permalink
Fix build script to read GITHUB_TOKEN from env whenever needed
Browse files Browse the repository at this point in the history
The script was only reading the token from the environment when config.json did
not exist. But the file could exist **and** not contain the right key.
  • Loading branch information
tidoust committed Dec 14, 2020
1 parent b38282c commit 5b6433b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/build-index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ const githubToken = (_ => {
return require("../config.json").githubToken;
}
catch {
return process.env.GITHUB_TOKEN;
return "";
}
})();
})() || process.env.GITHUB_TOKEN;;

// If the index already exists, reuse the info it contains when info cannot
// be refreshed due to some external (network) issue.
Expand Down

0 comments on commit 5b6433b

Please sign in to comment.