refactor(daemon): share runtime and service probe helpers
This commit is contained in:
11
src/daemon/runtime-binary.ts
Normal file
11
src/daemon/runtime-binary.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import path from "node:path";
|
||||
|
||||
export function isNodeRuntime(execPath: string): boolean {
|
||||
const base = path.basename(execPath).toLowerCase();
|
||||
return base === "node" || base === "node.exe";
|
||||
}
|
||||
|
||||
export function isBunRuntime(execPath: string): boolean {
|
||||
const base = path.basename(execPath).toLowerCase();
|
||||
return base === "bun" || base === "bun.exe";
|
||||
}
|
||||
Reference in New Issue
Block a user