# Support multiple versions of a platform in metadata.rb?

**URL:** <https://discourse.chef.io/t/support-multiple-versions-of-a-platform-in-metadata-rb/7414>\
**Category:** Chef Infra (archive)\
**Created:** [December 9, 2015, 3:38pm UTC](https://discourse.chef.io/t/support-multiple-versions-of-a-platform-in-metadata-rb/7414 "2015-12-09T15:38:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Renier\_Morales](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/renier_morales/32/1265_2.png) [@Renier\_Morales](https://discourse.chef.io/u/Renier_Morales)\
**Post date:** [December 9, 2015, 3:38pm UTC](https://discourse.chef.io/t/support-multiple-versions-of-a-platform-in-metadata-rb/7414/1 "2015-12-09T15:38:11Z")

</div>

If I want to say that I support only version 6.1.0 and 6.3.0 of windows, how do I express that in the cookbook metadata?

```
supports 'windows', '~> 6.1.0', '~> 6.3.0' # will throw exception

```

From looking at the [code](https://github.com/chef/chef/blob/master/lib/chef/cookbook/metadata.rb#L729), specifying multiple version arguments will throw an ObsoleteDependencySyntax exception, and calling supports on the same platform will simply [overwrite the last version arg](https://github.com/chef/chef/blob/master/lib/chef/cookbook/metadata.rb#L284) from what I can tell.

```
supports 'windows', '~> 6.1.0'
supports 'windows', '~> 6.3.0' # overwrites the previous

```

Is there actually a way to do this?

---

<div class="post-metadata">

**Author:** ![yoshiwaan](https://avatars.discourse-cdn.com/v4/letter/y/ba9def/32.png) [@yoshiwaan](https://discourse.chef.io/u/yoshiwaan)\
**Post date:** [December 10, 2015, 2:47am UTC](https://discourse.chef.io/t/support-multiple-versions-of-a-platform-in-metadata-rb/7414/2 "2015-12-10T02:47:46Z")

</div>

Perhaps obtusely helpful, but I would just pick the higher of the two and  
state that version explicitly, i.e.

supports ‘windows’, ‘6.3.0’

---

<div class="post-metadata">

**Author:** ![Alexander\_Skwar](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/alexander_skwar/32/1205_2.png) [@Alexander\_Skwar](https://discourse.chef.io/u/Alexander_Skwar)\
**Post date:** [December 10, 2015, 6:16am UTC](https://discourse.chef.io/t/support-multiple-versions-of-a-platform-in-metadata-rb/7414/3 "2015-12-10T06:16:14Z")

</div>

But he’d like to support 6.1.0 as well, but not 6.2.0.

Viele Grüße

Alexander Skwar
