Skip to content

Commit fb9c334

Browse files
committed
fix(cli): recognize drive-relative project paths
1 parent bf5147f commit fb9c334

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

‎apps/server/src/cli/app.test.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ describe("t3 server command safety", () => {
182182
["start"],
183183
["."],
184184
["node_modules"],
185+
["C:new-project"],
185186
[newDirectory],
186187
["start", newDirectory],
187188
]) {

‎apps/server/src/cli/server.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export const runDefaultServerCommand = (flags: CliServerFlags) =>
3434
if (Option.isSome(flags.cwd)) {
3535
const cwd = flags.cwd.value.trim();
3636
const fs = yield* FileSystem.FileSystem;
37-
const explicitPath = cwd === "." || cwd === ".." || cwd === "~" || /[/\\]/.test(cwd);
37+
const explicitPath = cwd === "." || cwd === ".." || cwd === "~" || /[/\\]|^[a-z]:/i.test(cwd);
3838
if (
3939
!explicitPath &&
4040
(!(yield* fs.exists(cwd)) || (yield* fs.stat(cwd)).type !== "Directory")

0 commit comments

Comments
 (0)