Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/webtorrent/webtorrent.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'bin/cmd.js')
-rwxr-xr-xbin/cmd.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/bin/cmd.js b/bin/cmd.js
index a8835b4..8c8d1bc 100755
--- a/bin/cmd.js
+++ b/bin/cmd.js
@@ -258,7 +258,10 @@ function onReady () {
var vlcPath = key.InstallDir.value + path.sep + 'vlc'
VLC_ARGS = VLC_ARGS.split(' ')
VLC_ARGS.unshift(href)
- cp.execFile(vlcPath, VLC_ARGS, errorAndExit)
+ cp.execFile(vlcPath, VLC_ARGS, function (err) {
+ if (err) return errorAndExit(err)
+ done()
+ })
}
} else if (argv.vlc) {
var root = '/Applications/VLC.app/Contents/MacOS/VLC'
@@ -275,10 +278,10 @@ function onReady () {
}
if (cmd) {
- player = cp.exec(cmd, errorAndExit)
- .on('exit', function () {
- done()
- })
+ player = cp.exec(cmd, function (err) {
+ if (err) return errorAndExit(err)
+ done()
+ })
}
if (argv.airplay) {