From 1022817384a903162f6e1a2ac79c0135afa93020 Mon Sep 17 00:00:00 2001 From: Shicong Huang Date: Thu, 30 Jul 2020 14:10:09 -0400 Subject: [PATCH] Fix broken RegistryCli (#728) --- core/src/main/java/google/registry/tools/RegistryCli.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/src/main/java/google/registry/tools/RegistryCli.java b/core/src/main/java/google/registry/tools/RegistryCli.java index 25c0b7779..1d3dded40 100644 --- a/core/src/main/java/google/registry/tools/RegistryCli.java +++ b/core/src/main/java/google/registry/tools/RegistryCli.java @@ -29,7 +29,6 @@ import com.google.appengine.tools.remoteapi.RemoteApiOptions; import com.google.common.base.Throwables; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Iterables; -import google.registry.backup.AppEngineEnvironment; import google.registry.config.RegistryConfig; import google.registry.model.ofy.ObjectifyService; import google.registry.persistence.transaction.TransactionManagerFactory; @@ -179,7 +178,7 @@ final class RegistryCli implements AutoCloseable, CommandRunner { Iterables.getOnlyElement(jcommander.getCommands().get(parsedCommand).getObjects()); loggingParams.configureLogging(); // Must be called after parameters are parsed. - try (AppEngineEnvironment env = new AppEngineEnvironment()) { + try { runCommand(command); } catch (RuntimeException ex) { if (Throwables.getRootCause(ex) instanceof LoginRequiredException) {