Skip to content

Commit

Permalink
config: Only determine AMI for aws platform.
Browse files Browse the repository at this point in the history
A recent commit, d01ac5d, 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.
  • Loading branch information
russellb committed Sep 21, 2018
1 parent 3539305 commit 76a32aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/types/config/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit 76a32aa

Please sign in to comment.