Skip to content

Commit

Permalink
Fix arg order for Storage Emulator command
Browse files Browse the repository at this point in the history
  • Loading branch information
tohhsinpei committed Feb 18, 2022
1 parent aa178b2 commit c1d4485
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/emulator/downloadableEmulators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,10 @@ const Commands: { [s in DownloadableEmulators]: DownloadableEmulatorCommand } =
// separately in ./storage/runtime.ts (not via the start function below).
binary: "java",
args: [
"-jar",
// Required for rules error/warning messages, which are in English only.
// Attempts to fetch the messages in another language leads to crashes.
"-Duser.language=en",
"-jar",
getExecPath(Emulators.STORAGE),
"serve",
],
Expand Down
1 change: 1 addition & 0 deletions src/emulator/storage/rules/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ export class StorageRulesRuntime {
this._childprocess.stderr?.on("data", (buf: Buffer) => {
const error = buf.toString();
if (error.includes("jarfile")) {
EmulatorLogger.forEmulator(Emulators.STORAGE).log("ERROR", error);
throw new FirebaseError(
"There was an issue starting the rules emulator, please run 'firebase setup:emulators:storage` again"
);
Expand Down

0 comments on commit c1d4485

Please sign in to comment.