programmatic subagents
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix(core): run program host with bun when mill is compiled

+22 -1
+22 -1
packages/core/src/runtime/program-host.effect.ts
··· 48 48 const joinPath = (base: string, child: string): string => 49 49 normalizePath(base) === "/" ? `/${child}` : `${normalizePath(base)}/${child}`; 50 50 51 + const basename = (path: string): string => { 52 + const normalized = normalizePath(path); 53 + const index = normalized.lastIndexOf("/"); 54 + 55 + if (index < 0) { 56 + return normalized; 57 + } 58 + 59 + return normalized.slice(index + 1); 60 + }; 61 + 62 + const isBunExecutable = (path: string): boolean => { 63 + const name = basename(path).toLowerCase(); 64 + return name === "bun" || name.startsWith("bun-") || name.startsWith("bun."); 65 + }; 66 + 67 + const resolveProgramHostExecutable = (): string => 68 + isBunExecutable(process.execPath) ? process.execPath : "bun"; 69 + 51 70 const toMessage = (error: unknown): string => { 52 71 if (error instanceof Error) { 53 72 return error.message; ··· 290 309 }), 291 310 ); 292 311 293 - const baseCommand = Command.make(process.execPath, "run", hostProgramPath).pipe( 312 + const programHostExecutable = resolveProgramHostExecutable(); 313 + const baseCommand = Command.make(programHostExecutable, "run", hostProgramPath).pipe( 294 314 Command.workingDirectory(input.workingDirectory), 295 315 Command.stdin("pipe"), 296 316 Command.stdout("pipe"), ··· 305 325 runId: input.runId, 306 326 hostProgramPath, 307 327 workingDirectory: input.workingDirectory, 328 + executable: programHostExecutable, 308 329 }); 309 330 310 331 const processHandle = yield* Effect.mapError(