mirror of
https://github.com/withastro/astro.git
synced 2025-02-24 22:46:02 -05:00
fix bug in prompt logic
This commit is contained in:
parent
54a981cd5c
commit
1c69feecf0
1 changed files with 15 additions and 14 deletions
|
@ -97,7 +97,7 @@ async function pushSchema({
|
||||||
const confirmations = missingMigrationContents.reduce((acc, curr) => {
|
const confirmations = missingMigrationContents.reduce((acc, curr) => {
|
||||||
return [...acc, ...(curr.confirm || [])];
|
return [...acc, ...(curr.confirm || [])];
|
||||||
}, [] as string[]);
|
}, [] as string[]);
|
||||||
|
if (confirmations.length > 0) {
|
||||||
const response = await prompts([
|
const response = await prompts([
|
||||||
...confirmations.map((message, index) => ({
|
...confirmations.map((message, index) => ({
|
||||||
type: 'confirm' as const,
|
type: 'confirm' as const,
|
||||||
|
@ -112,6 +112,7 @@ async function pushSchema({
|
||||||
) {
|
) {
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// combine all missing migrations into a single batch
|
// combine all missing migrations into a single batch
|
||||||
const queries = missingMigrationContents.reduce((acc, curr) => {
|
const queries = missingMigrationContents.reduce((acc, curr) => {
|
||||||
|
|
Loading…
Add table
Reference in a new issue