File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
packages/opencode/src/tool Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -146,11 +146,6 @@ export const BashTool = Tool.define("bash", {
146146 } )
147147 }
148148
149- const pause = ( ms : number ) =>
150- new Promise < void > ( ( resolve ) => {
151- setTimeout ( resolve , ms )
152- } )
153-
154149 const proc = spawn ( params . command , {
155150 shell : true ,
156151 cwd : Instance . directory ,
@@ -202,13 +197,13 @@ export const BashTool = Tool.define("bash", {
202197
203198 try {
204199 process . kill ( - pid , "SIGTERM" )
205- await pause ( SIGKILL_TIMEOUT_MS )
200+ await Bun . sleep ( SIGKILL_TIMEOUT_MS )
206201 if ( ! exited ) {
207202 process . kill ( - pid , "SIGKILL" )
208203 }
209204 } catch ( _e ) {
210205 proc . kill ( "SIGTERM" )
211- await pause ( SIGKILL_TIMEOUT_MS )
206+ await Bun . sleep ( SIGKILL_TIMEOUT_MS )
212207 if ( ! exited ) {
213208 proc . kill ( "SIGKILL" )
214209 }
You can’t perform that action at this time.
0 commit comments