Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for overrides containing an entire product #2050

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/terraform
2 changes: 1 addition & 1 deletion build/terraform-beta
11 changes: 7 additions & 4 deletions compiler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,15 @@
raise "Product '#{product_name}' does not have an api.yaml file"
end

product_yaml = File.read(product_yaml_path)

if File.exist?(product_override_path)
orig = YAML.load_file(product_yaml_path)
result = orig.merge(YAML.load_file(product_override_path))
result = if File.exist?(product_yaml_path)
YAML.load_file(product_yaml_path).merge(YAML.load_file(product_override_path))
else
YAML.load_file(product_override_path)
end
product_yaml = result.to_yaml
else
product_yaml = File.read(product_yaml_path)
end

unless File.exist?(provider_yaml_path) || File.exist?(provider_override_path)
Expand Down