13
votes

in the docs
https://firebase.google.com/docs/firestore/security/get-started#use_the_firebase_cli

I know i can deploy rules using:

firebase deploy --only firestore:rules

is there a way for me to specify the location of the rules file?

1
for which platform? like web angular or... - Hareesh
i dont think you understand the question. i want to use the cli to update the rules for firestore. take a look at the docs i linked - w--
You can't specify it on the command line. It will take the name of the rules file from firebase.json. - Doug Stevenson

1 Answers

15
votes

You cannot specify the rules file location in a command-line flag, but you can set it in firebase.json:

{
  "firestore": {
    "rules": "path/to/your/firestore.rules"
  }
}