TypeScript
cross platform expandHomePath
Julius Marmingebe526df88ae1
diff --git a/apps/server/src/main.ts b/apps/server/src/main.tsindex 5e87a7a9126..4e6e840bcce 100644--- a/apps/server/src/main.ts+++ b/apps/server/src/main.ts@@ -60,10 +60,10 @@ const CliEnvConfig = Config.all({});const expandHomePath = Effect.fn(function* (input: string) {- const { join } = yield* Path.Path;+ const { join, sep } = yield* Path.Path;if (input === "~") return os.homedir();- if (input.startsWith("~/")) {- return join(os.homedir(), input.slice(2));+ if (input.startsWith(`~${sep}`)) {+ return join(os.homedir(), input.slice(sep.length));}return input;});