Skip to content

Commit

Permalink
Don't prompt on non-interactive mode (#6541)
Browse files Browse the repository at this point in the history
* Don't prompt on non-interactive mode

* Updated changelog

* Updated changelog

---------

Co-authored-by: joehan <[email protected]>
  • Loading branch information
aalej and joehan authored Nov 27, 2023
1 parent f0c2471 commit dbedf74
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
- Added the ability to deploy Angular apps using [the new application-builder](https://angular.dev/tools/cli/esbuild). (#6480)
- Fixed an issue where `--non-interactive` flag is not respected in Firestore indexes deploys. (#6539)
- Fixed an issue where `login:use` would not work outside of a Firebase project directory. (#6526)
14 changes: 7 additions & 7 deletions src/firestore/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import * as types from "./api-types";
import * as Spec from "./api-spec";
import * as sort from "./api-sort";
import * as util from "./util";
import { promptOnce } from "../prompt";
import { confirm } from "../prompt";
import { firestoreOrigin } from "../api";
import { FirebaseError } from "../error";
import { Client } from "../apiv2";
Expand Down Expand Up @@ -89,9 +89,9 @@ export class FirestoreApi {
}

if (!shouldDeleteIndexes) {
shouldDeleteIndexes = await promptOnce({
type: "confirm",
name: "confirm",
shouldDeleteIndexes = await confirm({
nonInteractive: options.nonInteractive,
force: options.force,
default: false,
message:
"Would you like to delete these indexes? Selecting no will continue the rest of the deployment.",
Expand Down Expand Up @@ -135,9 +135,9 @@ export class FirestoreApi {
}

if (!shouldDeleteFields) {
shouldDeleteFields = await promptOnce({
type: "confirm",
name: "confirm",
shouldDeleteFields = await confirm({
nonInteractive: options.nonInteractive,
force: options.force,
default: false,
message:
"Would you like to delete these field overrides? Selecting no will continue the rest of the deployment.",
Expand Down

0 comments on commit dbedf74

Please sign in to comment.