Skip to content

Commit 985c0e9

Browse files
committed
Update init next-steps logs
1 parent d861dfb commit 985c0e9

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

.changeset/healthy-mayflies-crash.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@codeshift/cli': patch
3+
---
4+
5+
Correctly output "next steps" logs when using the init command, based on the --config-only command

packages/cli/src/init.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export default async function init(
2424
if (transform) initTransform(packageName, transform, 'version', targetPath);
2525
if (preset) initTransform(packageName, preset, 'preset', targetPath);
2626

27-
if (targetPath !== '.') {
27+
if (!configOnly) {
2828
console.log(
2929
chalk.green(`🚚 New codemod package created at: ${targetPath}`),
3030
);
@@ -50,11 +50,11 @@ export default async function init(
5050
${chalk.blueBright(`npm install`)}
5151
${chalk.blueBright(`npm start test`)}
5252
`);
53-
}
5453

55-
if (targetPath === '.') {
56-
console.log(
57-
chalk.green(`🚚 New codeshift.config.js created at: ${targetPath}`),
58-
);
54+
return;
5955
}
56+
57+
console.log(
58+
chalk.green(`🚚 New codeshift.config.js created at: ${targetPath}`),
59+
);
6060
}

0 commit comments

Comments
 (0)