Skip to content

Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.

cross platform expandHomePath

Julius Marmingebe526df88ae1
diff --git a/apps/server/src/main.ts b/apps/server/src/main.ts
index 5e87a7a91..4e6e840bc 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;
});