Skip to content

Commit 516c41f

Browse files
claude: Fix create-project to not pass non-existent dir to initialization
The create-project command was passing the to-be-created project directory to initializeProjectContextAndEngines(), which then tried to stat the directory in projectContext(). This failed because the directory doesn't exist yet - it's about to be created by the command. Solution: - Call initializeProjectContextAndEngines() without arguments - This uses current working directory instead of the new project directory - Engines are registered without needing the non-existent project context The initialization only needs to register engines, not load project config from the new directory (which doesn't exist yet and wouldn't have config anyway). Fixes test: smoke/project/project-simple.test.ts
1 parent 96a9897 commit 516c41f

File tree

1 file changed

+1
-1
lines changed
  • src/command/create-project

1 file changed

+1
-1
lines changed

src/command/create-project/cmd.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ export const createProjectCommand = new Command()
129129
// deno-lint-ignore no-explicit-any
130130
.action(async (options: any, dir?: string) => {
131131
// Initialize project context and register engines (including external ones)
132-
await initializeProjectContextAndEngines(dir);
132+
await initializeProjectContextAndEngines();
133133

134134
if (dir === undefined || dir === ".") {
135135
dir = Deno.cwd();

0 commit comments

Comments
 (0)