Skip to content

Commit

Permalink
fixed: stop spinner before prompt
Browse files Browse the repository at this point in the history
Moddable SDK 5.3.3 is released without pre-built binaries.
"xs-dev setup" requires the prompt, but it doesn't work in spinner working. 
#200

Reproduced on mac and linux.
This change fixes the prompt.
  • Loading branch information
kitazaki authored Jan 1, 2025
1 parent e970d77 commit 6b85b9a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/toolbox/setup/linux.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export default async function ({
const remoteRelease = await fetchRelease(release)

if (remoteRelease.assets.length === 0) {
spinner.stop()
print.warning(
`Moddable release ${release} does not have any pre-built assets.`,
)
Expand All @@ -90,6 +91,7 @@ export default async function ({
)
process.exit(0)
}
spinner.start()
}

await system.spawn(
Expand Down
2 changes: 2 additions & 0 deletions src/toolbox/setup/mac.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export default async function ({
const remoteRelease = await fetchRelease(release)

if (remoteRelease.assets.length === 0) {
spinner.stop()
print.warning(
`Moddable release ${release} does not have any pre-built assets.`,
)
Expand All @@ -94,6 +95,7 @@ export default async function ({
)
process.exit(0)
}
spinner.start()
}

await system.spawn(
Expand Down
2 changes: 2 additions & 0 deletions src/toolbox/setup/windows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ export default async function ({
const remoteRelease = await fetchRelease(release)

if (remoteRelease.assets.length === 0) {
spinner.stop()
print.warning(
`Moddable release ${release} does not have any pre-built assets.`,
)
Expand All @@ -237,6 +238,7 @@ export default async function ({
)
process.exit(0)
}
spinner.start()
}

await system.spawn(
Expand Down

0 comments on commit 6b85b9a

Please sign in to comment.