From 626a22decb9b21f0db024a23588db9e6634692f8 Mon Sep 17 00:00:00 2001 From: Ayaan Zaidi Date: Sat, 2 May 2026 16:08:16 +0530 Subject: [PATCH] refactor(daemon): reuse shared path normalizer --- src/daemon/service-path-policy.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/daemon/service-path-policy.ts b/src/daemon/service-path-policy.ts index d808de78daa..ffe5b6b24c6 100644 --- a/src/daemon/service-path-policy.ts +++ b/src/daemon/service-path-policy.ts @@ -1,13 +1,10 @@ import path from "node:path"; +import { normalizeLowercaseStringOrEmpty } from "../shared/string-coerce.js"; function getPathModule(platform: NodeJS.Platform) { return platform === "win32" ? path.win32 : path.posix; } -function normalizeLowercaseStringOrEmpty(value: string | undefined): string { - return value?.trim().toLowerCase() ?? ""; -} - export function normalizeServicePathEntry(entry: string, platform: NodeJS.Platform): string { const pathModule = getPathModule(platform); const normalized = pathModule.normalize(entry).replaceAll("\\", "/");