This commit is contained in:
SrGooglo 2023-12-19 21:55:13 +00:00
commit cca2ea96bf
2 changed files with 13 additions and 6 deletions

View File

@ -53,7 +53,7 @@ For local development you will need to have installed some tools:
### Setup ### Setup
- Getting the repository - Getting the repository
```shell ```shell
git clone https://github.com/ragestudio/comty && cd comty git clone --recurse-submodules https://github.com/ragestudio/comty && cd comty
``` ```
- Installing all dependencies - 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. Contributions to Comty are welcome. If you want to contribute, please follow the instructions mentioned in the CONTRIBUTING.md file.
## License 📜 ## License 📜
Comty is licensed under the LGPL-2.1 license. See the LICENSE file for more details. Comty is licensed under the LGPL-2.1 license. See the LICENSE file for more details.

View File

@ -47,9 +47,16 @@ async function linkSharedResources(pkgJSON, packagePath) {
fs.mkdirSync(path.resolve(finalLinkPath, ".."), { recursive: true }) fs.mkdirSync(path.resolve(finalLinkPath, ".."), { recursive: true })
} }
fs.symlinkSync(originClassPath, finalLinkPath, "dir") try {
fs.symlinkSync(originClassPath, finalLinkPath, "dir")
console.log(`🔗 Linked resouce [${resource}] to [${finalLinkPath}]`) 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 continue
} }
@ -138,4 +145,4 @@ async function main() {
console.timeEnd("✅ post-install tooks:") console.timeEnd("✅ post-install tooks:")
} }
main().catch(console.error) main().catch(console.error)