Description
When installing an SDK if a module has symlinks and that version of the module already existed on the system we will get the below error. I think we need to check if the file exists and either remove it first, or not create the symlink.
Error: EEXIST: file already exists, symlink 'Versions/Current/Resources' -> '/Users/awam/Library/Application Support/Titanium/modules/iphone/ti.applesignin/2.0.0/TiApplesignin.xcframework/ios-arm64_x86_64-maccatalyst/TiApplesignin.framework/Resources'
at Object.symlinkSync (fs.js:909:3)
at ReadStream.readStream.on (/Users/awam/git/titanium/node_modules/node-appc/lib/zip.js:94:11)
at ReadStream.emit (events.js:198:13)
at endReadableNT (_stream_readable.js:1145:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
Steps to reproduce
1. Install the latest SDK ti sdk install -b master -d
2. Remove that SDK
3. Install it again ti sdk install -b master -d
Actual
Above error
Expected
No error
https://github.com/appcelerator/node-appc/pull/285
Verified the fix with CLI 8.1.1-master.9