diff --git a/README.md b/README.md index 67ede721..8f9a7493 100755 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ For local development you will need to have installed some tools: ### Setup - Getting the repository ```shell -git clone https://github.com/ragestudio/comty && cd comty +git clone --recurse-submodules https://github.com/ragestudio/comty && cd comty ``` - Installing all dependencies @@ -74,4 +74,4 @@ yarn Contributions to Comty are welcome. If you want to contribute, please follow the instructions mentioned in the CONTRIBUTING.md file. ## License 📜 -Comty is licensed under the LGPL-2.1 license. See the LICENSE file for more details. \ No newline at end of file +Comty is licensed under the LGPL-2.1 license. See the LICENSE file for more details. diff --git a/scripts/post-install.js b/scripts/post-install.js index 34b631af..1c953a81 100644 --- a/scripts/post-install.js +++ b/scripts/post-install.js @@ -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) \ No newline at end of file +main().catch(console.error)