fix: normalize gateway dev mode detection

This commit is contained in:
Peter Steinberger
2026-01-18 01:08:42 +00:00
parent 2c070952e1
commit 36d88f6079
29 changed files with 95 additions and 107 deletions

View File

@@ -1,5 +1,3 @@
import path from "node:path";
import { resolveGatewayLaunchAgentLabel } from "../daemon/constants.js";
import { resolveGatewayProgramArguments } from "../daemon/program-args.js";
import {
@@ -20,7 +18,8 @@ export type GatewayInstallPlan = {
export function resolveGatewayDevMode(argv: string[] = process.argv): boolean {
const entry = argv[1];
return Boolean(entry?.includes(`${path.sep}src${path.sep}`) && entry.endsWith(".ts"));
const normalizedEntry = entry?.replaceAll("\\", "/");
return Boolean(normalizedEntry?.includes("/src/") && normalizedEntry.endsWith(".ts"));
}
export async function buildGatewayInstallPlan(params: {