mikeal / node.couchapp.js

Utility for writing couchapps.
Apache License 2.0
406 stars 78 forks source link

Only play sound if you can play sound #71

Closed jamescostian closed 11 years ago

jamescostian commented 11 years ago

On my Raspberry Pi (and surely on other devices) the file /usr/bin/afplay does not exist. This pull request makes couchapp check to see if the machine that it's running on has that file, and if it does, then it will work like normally, but if it doesn't (like in the case of my Raspberry Pi), then it won't bother trying to play the sound (instead of failing)

diwu1989 commented 11 years ago

Please merge this in, it's really dumb that something as simple as playing a sound can crash the app. Also, this repro on a minimal server Ubuntu install.