Skip to content

Commit 9919a6a

Browse files
committed
Only suggest a LICENSE if it doesn't already exist
1 parent 1e0043d commit 9919a6a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/index.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,11 @@ async function init() {
186186
}
187187

188188
console.log('pnpm install')
189-
console.log()
190-
console.log(`You should add a suitable license at ${targetDirName}/packages/${config.mainPackageDirName}/LICENSE`)
189+
190+
if (!fs.existsSync(path.join(targetDirPath, 'packages', config.mainPackageDirName, 'LICENSE'))) {
191+
console.log()
192+
console.log(`You should add a suitable license at packages/${config.mainPackageDirName}/LICENSE`)
193+
}
191194
}
192195

193196
function copyTemplate(templateName: string, config: Config) {

0 commit comments

Comments
 (0)