Skip to content

fix(setup): install to a temp directory and then swap (Windows)#91

Draft
andycarle wants to merge 2 commits into
HipsterBrown:mainfrom
andycarle:win_setup_temp
Draft

fix(setup): install to a temp directory and then swap (Windows)#91
andycarle wants to merge 2 commits into
HipsterBrown:mainfrom
andycarle:win_setup_temp

Conversation

@andycarle

Copy link
Copy Markdown
Contributor

This PR is an attempt to address the problem discussed in #73 on Windows. It does this by cloning the Moddable SDK into a temporary directory, building the Moddable SDK tools there, and then swapping the temp directory to the permanent location when complete.

If we like this approach, it could be applied to the other host platform tool setups, ESP32/ESP8266 setup, etc.

Clones the Moddable SDK and builds tools in a temporary directory and then swaps to the permanent location when complete. One potential fix for HipsterBrown#73. (Windows only.)
@andycarle andycarle marked this pull request as draft December 21, 2022 02:02
try {
spinner.start('Cloning Moddable-OpenSource/moddable repo')
await system.spawn(`git clone ${MODDABLE_REPO} ${INSTALL_PATH}`)
await system.spawn(`git clone ${MODDABLE_REPO} ${MODDABLE_TEMP}`)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could try getting the Windows setup to use the versioned release artifacts, like the Mac setup. At the very least, we should do a shallow clone to speed up this process: git clone --depth 1 --single-branch --branch public ${MODDABLE_REPO} ${MODDABLE_TEMP}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants