Skip to content

Commit e811937

Browse files
fix: Do not show the info log of cd . (#102)
* Do not show the info log of `cd .` * Use single quotes * Handle other edge cases * format --------- Co-authored-by: Yusuke Wada <yusuke@kamawada.com>
1 parent a90b6c5 commit e811937

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/index.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,10 +211,15 @@ async function main(
211211

212212
emitter.on('completed', () => {
213213
console.log(picocolor.green(`🎉 ${picocolor.bold('Copied project files')}`))
214-
console.log(
215-
picocolor.gray('Get started with:'),
216-
picocolor.bold(`cd ${target}`),
217-
)
214+
const resolvedTarget = path.resolve(target)
215+
const currentDir = process.cwd()
216+
217+
if (resolvedTarget !== currentDir) {
218+
console.log(
219+
picocolor.gray('Get started with:'),
220+
picocolor.bold(`cd ${target}`),
221+
)
222+
}
218223
// eslint-disable-next-line n/no-process-exit
219224
process.exit(0)
220225
})

0 commit comments

Comments
 (0)