File tree Expand file tree Collapse file tree 2 files changed +13
-9
lines changed
Expand file tree Collapse file tree 2 files changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ import fs from "fs/promises"
99import { Installation } from "../../installation"
1010import { Config } from "../../config/config"
1111import { Bus } from "../../bus"
12- import { AuthLoginCommand } from "./auth"
1312
1413export const TuiCommand = cmd ( {
1514 command : "$0 [project]" ,
@@ -100,11 +99,15 @@ export const TuiCommand = cmd({
10099 if ( result === "needs_provider" ) {
101100 UI . empty ( )
102101 UI . println ( UI . logo ( " " ) )
102+ const result = await Bun . spawn ( {
103+ cmd : [ process . execPath , "auth" , "login" ] ,
104+ cwd : process . cwd ( ) ,
105+ stdout : "inherit" ,
106+ stderr : "inherit" ,
107+ stdin : "inherit" ,
108+ } ) . exited
109+ if ( result !== 0 ) return
103110 UI . empty ( )
104- await AuthLoginCommand . handler ( args )
105- UI . empty ( )
106- UI . println ( "Provider configured - please run again" )
107- return
108111 }
109112 }
110113 } ,
Original file line number Diff line number Diff line change @@ -74,15 +74,15 @@ try {
7474 ...obj . data ,
7575 } )
7676 }
77-
77+
7878 if ( e instanceof Error ) {
7979 Object . assign ( data , {
8080 name : e . name ,
8181 message : e . message ,
8282 cause : e . cause ?. toString ( ) ,
8383 } )
84- }
85-
84+ }
85+
8686 if ( e instanceof ResolveMessage ) {
8787 Object . assign ( data , {
8888 name : e . name ,
9292 referrer : e . referrer ,
9393 position : e . position ,
9494 importKind : e . importKind ,
95- } ) ;
95+ } )
9696 }
9797 Log . Default . error ( "fatal" , data )
9898 const formatted = FormatError ( e )
@@ -101,6 +101,7 @@ try {
101101 UI . error (
102102 "Unexpected error, check log file at " + Log . file ( ) + " for more details" ,
103103 )
104+ process . exitCode = 1
104105}
105106
106107cancel . abort ( )
You can’t perform that action at this time.
0 commit comments