mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 18:44:16 +00:00
Merge pull request #112 from RubenPX/small-fixes-from-initial-build
small fixes
This commit is contained in:
commit
674cba86e3
@ -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
|
||||
}
|
||||
@ -138,4 +145,4 @@ async function main() {
|
||||
console.timeEnd("✅ post-install tooks:")
|
||||
}
|
||||
|
||||
main().catch(console.error)
|
||||
main().catch(console.error)
|
||||
|
Loading…
x
Reference in New Issue
Block a user