# HG changeset patch # User Emmanuel Gil Peyrot # Date 1330027613 -3600 # Node ID e6f5077c2ea9578420099ebfc71929c0b1d1fe5e # Parent 0082e861cf16ad7702ab24207b54b1274bd0b564 Display an error message when there is no video, and fix exit. diff --git a/isshouni.js b/isshouni.js --- a/isshouni.js +++ b/isshouni.js @@ -17,6 +17,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +if (process.argv.length < 3) { + console.log('You should put at least a video on your command line.'); + process.exit(); +} var config = require('./config'); var args = ['-slave'].concat(process.argv.slice(2)); @@ -147,6 +151,7 @@ var commands = { 'q': function() { tty.setRawMode(false); disconnect(); + process.exit(); return 'quit'; }, };