mirror of
https://github.com/google/nomulus
synced 2026-09-19 14:34:18 +00:00
Fix the tool that was broken in []
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=219629901
This commit is contained in:
@@ -31,6 +31,7 @@ import com.google.common.collect.Iterables;
|
|||||||
import google.registry.config.RegistryConfig;
|
import google.registry.config.RegistryConfig;
|
||||||
import google.registry.model.ofy.ObjectifyService;
|
import google.registry.model.ofy.ObjectifyService;
|
||||||
import google.registry.tools.params.ParameterFactory;
|
import google.registry.tools.params.ParameterFactory;
|
||||||
|
import java.net.URL;
|
||||||
import java.security.Security;
|
import java.security.Security;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import org.bouncycastle.jce.provider.BouncyCastleProvider;
|
import org.bouncycastle.jce.provider.BouncyCastleProvider;
|
||||||
@@ -191,7 +192,7 @@ final class RegistryCli implements AutoCloseable, CommandRunner {
|
|||||||
installer = new RemoteApiInstaller();
|
installer = new RemoteApiInstaller();
|
||||||
RemoteApiOptions options = new RemoteApiOptions();
|
RemoteApiOptions options = new RemoteApiOptions();
|
||||||
options.server(
|
options.server(
|
||||||
getConnection().getServer().getHost(), getConnection().getServer().getPort());
|
getConnection().getServer().getHost(), getPort(getConnection().getServer()));
|
||||||
if (RegistryConfig.areServersLocal()) {
|
if (RegistryConfig.areServersLocal()) {
|
||||||
// Use dev credentials for localhost.
|
// Use dev credentials for localhost.
|
||||||
options.useDevelopmentServerCredential();
|
options.useDevelopmentServerCredential();
|
||||||
@@ -211,6 +212,10 @@ final class RegistryCli implements AutoCloseable, CommandRunner {
|
|||||||
command.run();
|
command.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int getPort(URL url) {
|
||||||
|
return url.getPort() == -1 ? url.getDefaultPort() : url.getPort();
|
||||||
|
}
|
||||||
|
|
||||||
void setEnvironment(RegistryToolEnvironment environment) {
|
void setEnvironment(RegistryToolEnvironment environment) {
|
||||||
this.environment = environment;
|
this.environment = environment;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user