Return an error instead of dying if flavor can't be detected.
Merge branch 'detect'