COOK-3260  check for alternatives through count to avoid exit status 1
if unavailable
COOK-3261  Add a check for windows to allow keeping flavor setting to
environment instead of need to override in roles