Merge pull request #112 from RubenPX/small-fixes-from-initial-build

small fixes
This commit is contained in:
srgooglo 2023-12-10 00:11:16 +01:00 committed by GitHub
commit 674cba86e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -47,9 +47,16 @@ async function linkSharedResources(pkgJSON, packagePath) {
fs.mkdirSync(path.resolve(finalLinkPath, ".."), { recursive: true })
}
try {
fs.symlinkSync(originClassPath, finalLinkPath, "dir")
console.log(`🔗 Linked resouce [${resource}] to [${finalLinkPath}]`)
} catch (error) {
if (error.code && error.code == 'EEXIST') {
fs.unlinkSync(finalLinkPath)
fs.symlinkSync(originClassPath, finalLinkPath, "dir")
console.log(`🔗 Linked resouce [${resource}] to [${finalLinkPath}]`)
}
}
continue
}