Skip to content

Commit

Permalink
Don't print stack trace on user terminal interrupt
Browse files Browse the repository at this point in the history
  • Loading branch information
ValentaTomas committed Oct 16, 2024
1 parent 0a09d5c commit 5d87002
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/eleven-tomatoes-talk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@e2b/cli': patch
---

Don't print stack trace when user interrupts sandbox terminal connection
4 changes: 4 additions & 0 deletions packages/cli/src/terminal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ export async function spawnConnectedTerminal(sandbox: e2b.Sandbox) {
if (err.exitCode === -1 && err.error === 'signal: killed') {
return
}
if (err.exitCode === 130) {
console.warn('Terminal session was killed by user')
return
}
}
throw err
} finally {
Expand Down

0 comments on commit 5d87002

Please sign in to comment.