Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/kind-bananas-joke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'sv': patch
---

fix(cli): printed args now also display path used during directory prompt
6 changes: 3 additions & 3 deletions packages/cli/commands/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ const OptionsSchema = v.strictObject({
});
type Options = v.InferOutput<typeof OptionsSchema>;
type ProjectPath = v.InferOutput<typeof ProjectPathSchema>;
const defaultPath = './';

export const create = new Command('create')
.description('scaffolds a new SvelteKit project')
Expand Down Expand Up @@ -147,8 +146,9 @@ async function createProject(cwd: ProjectPath, options: Options) {
const { directory, template, language } = await p.group(
{
directory: () => {
const defaultPath = './';
if (cwd) {
return Promise.resolve(path.resolve(cwd));
return Promise.resolve(cwd);
}
return p.text({
message: 'Where would you like your project to be created?',
Expand Down Expand Up @@ -307,7 +307,7 @@ async function createProject(cwd: ProjectPath, options: Options) {

if (argsFormattedAddons.length > 0) argsFormatted.push('--add', ...argsFormattedAddons);

common.logArgs(packageManager, 'create', argsFormatted, [cwd ?? defaultPath]);
common.logArgs(packageManager, 'create', argsFormatted, [directory]);

await addPnpmBuildDependencies(projectPath, packageManager, ['esbuild']);
if (packageManager) await installDependencies(packageManager, projectPath);
Expand Down
Loading