Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
alxndrsn committed Feb 28, 2018
1 parent 315b6bc commit 43cc208
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lib/google-auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ function oauthClient() {
(configFile.redirect_uris && configFile.redirect_uris[0]);

const missingConfig =
checkRequred(clientId, 'client_id', 'GOOGLE_CLIENT_ID') |
checkRequred(clientSecret, 'client_secret', 'GOOGLE_CLIENT_SECRET') |
checkRequred(redirectUri, 'redirect_uris', 'GOOGLE_REDIRECT_URI');
checkRequired(clientId, 'client_id', 'GOOGLE_CLIENT_ID') |
checkRequired(clientSecret, 'client_secret', 'GOOGLE_CLIENT_SECRET') |
checkRequired(redirectUri, 'redirect_uris', 'GOOGLE_REDIRECT_URI');

if(missingConfig) throw new Error('Missing required config for google drive access. Please check warnings.');

Expand All @@ -57,7 +57,7 @@ function openBrowserAt(url) {
child_process.exec(`open "${url}" || firefox "${url}" || chromium-browser "${url}" || chrome "${url}"`);
}

function checkRequred(value, jsonKey, envVar) {
function checkRequired(value, jsonKey, envVar) {
if(value) return;

warn(`Missing .${jsonKey} in ${SECRETS_FILE} or env var ${envVar}!`);
Expand Down

0 comments on commit 43cc208

Please sign in to comment.