diff --git a/tools/Google.Cloud.Tools.ReleaseManager/ContainerCommands/GenerateCommand.cs b/tools/Google.Cloud.Tools.ReleaseManager/ContainerCommands/GenerateCommand.cs index e62afbe73b78..66ae4435a03e 100644 --- a/tools/Google.Cloud.Tools.ReleaseManager/ContainerCommands/GenerateCommand.cs +++ b/tools/Google.Cloud.Tools.ReleaseManager/ContainerCommands/GenerateCommand.cs @@ -56,6 +56,11 @@ public int Execute(Dictionary options) } else { + // Set environment variables used by scripts invoked by GenerateApisCommand. + Environment.SetEnvironmentVariable(GenerateApisCommand.GeneratorInputDirectoryEnvironmentVariable, rootLayout.GeneratorInput); + Environment.SetEnvironmentVariable(GenerateApisCommand.GeneratorOutputDirectoryEnvironmentVariable, rootLayout.GeneratorOutput); + Environment.SetEnvironmentVariable(GenerateApisCommand.GoogleApisDirectoryEnvironmentVariable, rootLayout.Googleapis); + if (apiPath is not null) { var catalog = ApiCatalog.Load(rootLayout);