Skip to content

Commit f68207c

Browse files
fix(new-command): reorder project directory change and configuration setup for clarity
1 parent 559e74b commit f68207c

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

  • packages/cli/lib/commands

packages/cli/lib/commands/new.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,16 +155,16 @@ const command: NewCommandType = {
155155
cd14: theme
156156
});
157157

158-
process.chdir(argv.name);
159-
await configure(argv.agents as (AIAgentTarget | "none")[] ?? [], argv.assistants as (AiCodingAssistant | "none")[] ?? []);
160-
process.chdir("..");
161-
162158
const config = projTemplate.generateConfig(argv.name, theme);
163159
for (const templatePath of projTemplate.templatePaths) {
164160
await Util.processTemplates(templatePath, path.join(process.cwd(), argv.name),
165161
config, projTemplate.delimiters, false);
166162
}
167163

164+
process.chdir(argv.name);
165+
await configure(argv.agents as (AIAgentTarget | "none")[], argv.assistants as (AiCodingAssistant | "none")[]);
166+
process.chdir("..");
167+
168168
Util.log(Util.greenCheck() + " Project Created");
169169

170170
if (!argv.skipInstall) {

0 commit comments

Comments
 (0)