Fix spinner behavior in Neon command execution

This commit is contained in:
Aman Varshney
2025-04-30 17:03:12 +05:30
parent 8c2995ba09
commit 0510a27bde
2 changed files with 7 additions and 2 deletions

View File

@@ -0,0 +1,5 @@
---
"create-better-t-stack": patch
---
Fix spinner behavior in Neon command execution

View File

@@ -26,9 +26,9 @@ async function executeNeonCommand(
commandArgsString,
);
if (s) s.start(spinnerText);
if (spinnerText) s.start(spinnerText);
const result = await execa(fullCommand, { shell: true });
if (s) s.stop(spinnerText);
if (spinnerText) s.stop(pc.green("Completed"));
return result;
} catch (error) {
if (s) s.stop(pc.red(`Failed: ${spinnerText}`));