conditions were extracted into `detect_os` method