From 76a32aa44e3c884c8f6ff0d729f344245b57a378 Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Fri, 21 Sep 2018 15:44:01 -0400 Subject: [PATCH] config: Only determine AMI for aws platform. A recent commit, d01ac5d70bfcfa6f0c1da7e57e24dc0554e3122c, introduced a regression for libvirt. $ tectonic init --config=../libvirt.yaml FATA[0020] failed to get configuration from file "../libvirt.yaml": ../libvirt.yaml is not a valid config file: failed to determine default AMI: ... Fix this by only bothering to determine the default AMI when the platform is aws. --- pkg/types/config/parser.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/types/config/parser.go b/pkg/types/config/parser.go index d2b92acfcfd..ab0d98667c1 100644 --- a/pkg/types/config/parser.go +++ b/pkg/types/config/parser.go @@ -33,7 +33,7 @@ func ParseConfig(data []byte) (*Cluster, error) { cluster.PullSecret = string(data) } - if cluster.EC2AMIOverride == "" { + if cluster.Platform == PlatformAWS && cluster.EC2AMIOverride == "" { ctx, cancel := context.WithTimeout(context.TODO(), 30*time.Second) defer cancel()