Skip to content

Commit 77c4aae

Browse files
committed
fix: windows binary
1 parent 0e37f53 commit 77c4aae

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

genkit-tools/cli/src/utils/runtime-detector.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,10 @@ export function detectRuntime(): RuntimeInfo {
124124
if (hasBunVersion || execMatchesBun || argv0MatchesBun) {
125125
// Check if this is a Bun-compiled binary
126126
// Bun compiled binaries have virtual paths like /$bunfs/root/...
127-
if (argv1 && argv1.startsWith('/$bunfs/')) {
127+
if (
128+
argv1 &&
129+
(argv1.startsWith('/$bunfs/') || /^[A-Za-z]:[\\/]+~BUN[\\/]+/.test(argv1))
130+
) {
128131
// This is a Bun-compiled binary
129132
type = RUNTIME_COMPILED;
130133
scriptPath = undefined;

0 commit comments

Comments
 (0)