Skip to content

Commit

Permalink
fix: Fix emulator command arg data-dir (#1695)
Browse files Browse the repository at this point in the history
The current gcloudRunner doesn't take any `--data-dir` flag due to a bug. This PR is to fix the `--data-dir` flag.
  • Loading branch information
cindy-peng authored Jan 4, 2025
1 parent 732ae66 commit 9d53195
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,15 +163,15 @@ private LocalDatastoreHelper(Builder builder) {
if (!builder.storeOnDisk) {
gcloudCommand.add("--no-store-on-disk");
}
if (builder.dataDir != null) {
gcloudCommand.add("--data-dir=" + getGcdPath());
}
GcloudEmulatorRunner gcloudRunner =
new GcloudEmulatorRunner(gcloudCommand, VERSION_PREFIX, MIN_VERSION);
List<String> binCommand = new ArrayList<>(Arrays.asList(binName, "start"));
binCommand.add("--testing");
binCommand.add(BIN_CMD_PORT_FLAG + getPort());
binCommand.add(CONSISTENCY_FLAG + getConsistency());
if (builder.dataDir != null) {
gcloudCommand.add("--data-dir=" + getGcdPath());
}
DownloadableEmulatorRunner downloadRunner =
new DownloadableEmulatorRunner(binCommand, EMULATOR_URL, MD5_CHECKSUM, ACCESS_TOKEN);
this.emulatorRunners = ImmutableList.of(gcloudRunner, downloadRunner);
Expand Down

0 comments on commit 9d53195

Please sign in to comment.