File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -11,13 +11,13 @@ export default defineCommand({
11
11
async setup ( ) {
12
12
const config = loadConfig ( )
13
13
if ( ! config . token ) {
14
- consola . log ( 'Not currently logged in.' )
14
+ consola . info ( 'Not currently logged in.' )
15
15
return
16
16
}
17
17
18
- const user = await $api ( '/user' )
18
+ const user = await $api ( '/user' ) . catch ( ( ) => null )
19
19
if ( ! user ?. name ) {
20
- consola . log ( 'Not currently logged in.' )
20
+ consola . info ( 'Not currently logged in.' )
21
21
return
22
22
}
23
23
consola . info ( `Logged in as \`${ user . name } \`` )
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import { ofetch } from 'ofetch'
8
8
9
9
const CONFIG_DIR = XDGAppPaths ( 'com.nuxt.hub.cli' ) . dataDirs ( ) [ 0 ]
10
10
const CONFIG_PATH = join ( CONFIG_DIR , 'auth.json' )
11
- export const NUXT_HUB_URL = process . env . NUXT_HUB_URL || 'http ://nuxthub-admin.pages.dev'
11
+ export const NUXT_HUB_URL = process . env . NUXT_HUB_URL || 'https ://nuxthub-admin.pages.dev'
12
12
13
13
export function loadConfig ( ) {
14
14
try {
You can’t perform that action at this time.
0 commit comments