Update to only include changes to check for production required tags (#2273)

This commit is contained in:
sarahcaseybot
2024-01-24 17:12:46 -05:00
committed by GitHub
parent 891e7c0174
commit 2166c28d6d
2 changed files with 48 additions and 0 deletions
@@ -105,6 +105,12 @@ public class ConfigureTldCommand extends MutatingCommand {
@Override
protected void init() throws Exception {
if (RegistryToolEnvironment.get().equals(RegistryToolEnvironment.PRODUCTION)) {
checkArgument(
buildEnv || breakGlass != null,
"Either the --break_glass or --build_environment flag must be used when"
+ " running the configure_tld command on Production");
}
String name = convertFilePathToName(inputFile);
Map<String, Object> tldData = new Yaml().load(Files.newBufferedReader(inputFile));
checkName(name, tldData);