Skip to content

Commit b85b7ad

Browse files
committed
don't use absolute path
1 parent ddc0928 commit b85b7ad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/cli/commands/create.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ const OptionsSchema = v.strictObject({
6969
});
7070
type Options = v.InferOutput<typeof OptionsSchema>;
7171
type ProjectPath = v.InferOutput<typeof ProjectPathSchema>;
72+
const defaultPath = './';
7273

7374
export const create = new Command('create')
7475
.description('scaffolds a new SvelteKit project')
@@ -149,7 +150,6 @@ async function createProject(cwd: ProjectPath, options: Options) {
149150
if (cwd) {
150151
return Promise.resolve(path.resolve(cwd));
151152
}
152-
const defaultPath = './';
153153
return p.text({
154154
message: 'Where would you like your project to be created?',
155155
placeholder: ` (hit Enter to use '${defaultPath}')`,
@@ -307,7 +307,7 @@ async function createProject(cwd: ProjectPath, options: Options) {
307307

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

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

312312
await addPnpmBuildDependencies(projectPath, packageManager, ['esbuild']);
313313
if (packageManager) await installDependencies(packageManager, projectPath);

0 commit comments

Comments
 (0)