Skip to content

Commit

Permalink
fix: aborter before exit
Browse files Browse the repository at this point in the history
  • Loading branch information
snowyu committed Sep 19, 2024
1 parent c3a7fd0 commit 0c9092c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/lib/run-script.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,12 @@ export async function runScript(filename: string, options: IRunScriptOptions) {
let script
const aborter = new AbortController()
process.once('SIGINT', () => {
aborter.abort()}
)
aborter.abort()
})

process.once('exit', function () {
aborter.abort()
})

try {
script = await AIScriptEx.loadFile(filename,
Expand Down

0 comments on commit 0c9092c

Please sign in to comment.