rdkcentral / Lightning-SDK

SDK for Lightning framework
Apache License 2.0
130 stars 69 forks source link

Fix: wpe-lightning-sdk upgrade folder problem #141

Closed jhderojasUVa closed 4 years ago

jhderojasUVa commented 4 years ago

Problem: Sometimes when you are upgrading from SDK 2.x to SDK 3.x the postinstall.js script that runs after the installation fails to copy the files into some directories because doesn't know if it's running at wpe-lightning-sdk or at @lightningjs/sdk directory and need to have the correct path.

Solution: Use and if where generating the node_modules directory that choose if you are in one place or another by looking the proccess.cwd includes @lightningjs or wpe-lightning-sdk (well, if you are in @lightningjs you are not on wpe-lightning-sdk :)

michielvandergeest commented 4 years ago

Closing PR, since alternative solution has been implemented in v3.1.1