This repository was archived by the owner on Aug 10, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,6 @@ class BaseCommand extends Command {
23
23
const projectRoot = findRoot ( process . cwd ( ) )
24
24
// Grab netlify API token
25
25
const token = getConfigToken ( )
26
-
27
26
// Get site config from netlify.toml
28
27
const configPath = getConfigPath ( projectRoot )
29
28
// TODO: https://github.com/request/caseless to handle key casing issues
@@ -72,8 +71,8 @@ class BaseCommand extends Command {
72
71
}
73
72
}
74
73
75
- async authenticate ( authToken ) {
76
- const token = getConfigToken ( authToken )
74
+ async authenticate ( authTokenFromFlag ) {
75
+ const token = getConfigToken ( authTokenFromFlag )
77
76
if ( ! token ) {
78
77
return this . expensivelyAuthenticate ( )
79
78
} else {
@@ -147,6 +146,11 @@ class BaseCommand extends Command {
147
146
}
148
147
}
149
148
149
+ /**
150
+ * Get user netlify API token
151
+ * @param {string } authTokenFromFlag - value passed in by CLI flag
152
+ * @return {string } - resolved Netlify API token
153
+ */
150
154
function getConfigToken ( authTokenFromFlag ) {
151
155
// 1. First honor command flag --auth
152
156
if ( authTokenFromFlag ) {
You can’t perform that action at this time.
0 commit comments