@@ -32,7 +32,6 @@ import { Flag } from "../flag/flag"
3232import { ulid } from "ulid"
3333import { spawn } from "child_process"
3434import { Command } from "../command"
35- import { $ } from "bun"
3635import { pathToFileURL , fileURLToPath } from "url"
3736import { ConfigMarkdown } from "../config/markdown"
3837import { SessionSummary } from "./summary"
@@ -48,6 +47,7 @@ import { iife } from "@/util/iife"
4847import { Shell } from "@/shell/shell"
4948import { Truncate } from "@/tool/truncate"
5049import { decodeDataUrl } from "@/util/data-url"
50+ import { Process } from "@/util/process"
5151
5252// @ts -ignore
5353globalThis . AI_SDK_LOG_WARNINGS = false
@@ -1812,15 +1812,13 @@ NOTE: At any point in time through this workflow you should feel free to ask the
18121812 template = template + "\n\n" + input . arguments
18131813 }
18141814
1815- const shell = ConfigMarkdown . shell ( template )
1816- if ( shell . length > 0 ) {
1815+ const shellMatches = ConfigMarkdown . shell ( template )
1816+ if ( shellMatches . length > 0 ) {
1817+ const sh = Shell . preferred ( )
18171818 const results = await Promise . all (
1818- shell . map ( async ( [ , cmd ] ) => {
1819- try {
1820- return await $ `${ { raw : cmd } } ` . quiet ( ) . nothrow ( ) . text ( )
1821- } catch ( error ) {
1822- return `Error executing command: ${ error instanceof Error ? error . message : String ( error ) } `
1823- }
1819+ shellMatches . map ( async ( [ , cmd ] ) => {
1820+ const out = await Process . text ( [ cmd ] , { shell : sh , nothrow : true } )
1821+ return out . text
18241822 } ) ,
18251823 )
18261824 let index = 0
0 commit comments