File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import process from 'process'
4
4
import { format , inspect } from 'util'
5
5
6
6
import type { NetlifyAPI } from '@netlify/api'
7
- import { getGlobalConfigStore } from '@netlify/dev-utils'
7
+ import { getAPIToken } from '@netlify/dev-utils'
8
8
import { Chalk } from 'chalk'
9
9
import WSL from 'is-wsl'
10
10
import terminalLink from 'terminal-link'
@@ -138,9 +138,7 @@ export const getToken = async (tokenFromOptions?: string): Promise<TokenTuple> =
138
138
return [ NETLIFY_AUTH_TOKEN , 'env' ]
139
139
}
140
140
// 3. If no env var use global user setting
141
- const globalConfig = await getGlobalConfigStore ( )
142
- const userId = globalConfig . get ( 'userId' )
143
- const tokenFromConfig = globalConfig . get ( `users.${ userId } .auth.token` )
141
+ const tokenFromConfig = await getAPIToken ( )
144
142
if ( tokenFromConfig ) {
145
143
return [ tokenFromConfig , 'config' ]
146
144
}
You can’t perform that action at this time.
0 commit comments