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 1833977282

View File

@ -47,9 +47,16 @@ async function linkSharedResources(pkgJSON, packagePath) {
fs.mkdirSync(path.resolve(finalLinkPath, ".."), { recursive: true })
}
fs.symlinkSync(originClassPath, finalLinkPath, "dir")
console.log(`🔗 Linked resouce [${resource}] to [${finalLinkPath}]`)
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
}