Prepare TUI lifecycle for scenario tests (#28258)
This commit is contained in:
@@ -67,7 +67,6 @@ export const AttachCommand = cmd({
|
||||
})()
|
||||
const headers = ServerAuth.headers({ password: args.password, username: args.username })
|
||||
const config = await TuiConfig.get()
|
||||
const { tui } = await import("./app")
|
||||
|
||||
try {
|
||||
await validateSession({
|
||||
@@ -82,9 +81,12 @@ export const AttachCommand = cmd({
|
||||
return
|
||||
}
|
||||
|
||||
await tui({
|
||||
const { createTuiRenderer, tui } = await import("./app")
|
||||
const renderer = await createTuiRenderer(config)
|
||||
const handle = tui({
|
||||
url: args.url,
|
||||
config,
|
||||
renderer,
|
||||
args: {
|
||||
continue: args.continue,
|
||||
sessionID: args.session,
|
||||
@@ -93,6 +95,7 @@ export const AttachCommand = cmd({
|
||||
directory,
|
||||
headers,
|
||||
})
|
||||
await handle.done
|
||||
} finally {
|
||||
unguard?.()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user