Skip to content

Commit dbedf74

Browse files
aalejjoehan
andauthored
Don't prompt on non-interactive mode (#6541)
* Don't prompt on non-interactive mode * Updated changelog * Updated changelog --------- Co-authored-by: joehan <joehanley@google.com>
1 parent f0c2471 commit dbedf74

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
- Added the ability to deploy Angular apps using [the new application-builder](https://angular.dev/tools/cli/esbuild). (#6480)
2+
- Fixed an issue where `--non-interactive` flag is not respected in Firestore indexes deploys. (#6539)
23
- Fixed an issue where `login:use` would not work outside of a Firebase project directory. (#6526)

src/firestore/api.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import * as types from "./api-types";
88
import * as Spec from "./api-spec";
99
import * as sort from "./api-sort";
1010
import * as util from "./util";
11-
import { promptOnce } from "../prompt";
11+
import { confirm } from "../prompt";
1212
import { firestoreOrigin } from "../api";
1313
import { FirebaseError } from "../error";
1414
import { Client } from "../apiv2";
@@ -89,9 +89,9 @@ export class FirestoreApi {
8989
}
9090

9191
if (!shouldDeleteIndexes) {
92-
shouldDeleteIndexes = await promptOnce({
93-
type: "confirm",
94-
name: "confirm",
92+
shouldDeleteIndexes = await confirm({
93+
nonInteractive: options.nonInteractive,
94+
force: options.force,
9595
default: false,
9696
message:
9797
"Would you like to delete these indexes? Selecting no will continue the rest of the deployment.",
@@ -135,9 +135,9 @@ export class FirestoreApi {
135135
}
136136

137137
if (!shouldDeleteFields) {
138-
shouldDeleteFields = await promptOnce({
139-
type: "confirm",
140-
name: "confirm",
138+
shouldDeleteFields = await confirm({
139+
nonInteractive: options.nonInteractive,
140+
force: options.force,
141141
default: false,
142142
message:
143143
"Would you like to delete these field overrides? Selecting no will continue the rest of the deployment.",

0 commit comments

Comments
 (0)