travis-ci / travis-yml

Travis CI build config processing
MIT License
113 stars 90 forks source link

The :bool type coerces every string into a bool #77

Closed mjm closed 4 years ago

mjm commented 5 years ago

It's not currently possible to combine the :bool type with other types. The use case for this is to be able to have a value be a boolean if the user puts true or false or a string version of them, but have the value be a string if they specify some other string value.

Currently, if you use [:bool, :scalar] as the type, you will always get a boolean, regardless of the string given. It is as though you just specified :bool.

svenfuchs commented 4 years ago

Thank you, @mjm :)

Using [:bool, :scalar] is now possible, and i've changed brewfile accordingly: https://github.com/travis-ci/travis-yml/commit/6a6612f7971f415e60dc45d2b054b2bf901ece33