Skip to content

Commit f6cb63a

Browse files
authored
Ensure the firestore API is enabled before deploying to it (#9196)
* Ensure the firestore API is enabled before deploying to it * Autocomplete strikes again
1 parent a0b6c83 commit f6cb63a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/deploy/firestore/prepare.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import { Options } from "../../options";
77
import * as fsConfig from "../../firestore/fsConfig";
88
import { logger } from "../../logger";
99
import { DeployOptions } from "..";
10+
import { ensure } from "../../ensureApiEnabled";
11+
import { firestoreOrigin } from "../../api";
1012

1113
export interface RulesContext {
1214
databaseId: string;
@@ -72,6 +74,7 @@ function prepareIndexes(
7274
* @param options The CLI options object.
7375
*/
7476
export default async function (context: any, options: DeployOptions): Promise<void> {
77+
await ensure(context.projectId, firestoreOrigin(), "firestore");
7578
if (options.only) {
7679
const targets = options.only.split(",");
7780

0 commit comments

Comments
 (0)