Skip to content

Commit

Permalink
minor cli error output fix
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisweb committed Sep 30, 2014
1 parent 27fa878 commit d305aa3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions library/audioDataAnalyzer.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 129,13 @@ analyzer.prototype.getData = function getDataFunction(trackPath, callback) {

ffprobeSpawn.on('error', function(error) {

if (error === 'Error: spawn ENOENT') {
if (error.code === 'ENOENT') {

callback('Unable to locate ffprobe, check it is installed and in the path');

} else {

callback(error);
callback(error.syscall ' ' error.errno);

}

Expand Down Expand Up @@ -328,13 328,13 @@ analyzer.prototype.getPeaks = function getValuesFunction(trackPath, peaksAmountR

ffmpegSpawn.on('error', function(error) {

if (error === 'Error: spawn ENOENT') {
if (error.code === 'ENOENT') {

callback('Unable to locate ffmpeg, check it is installed and in the path');

} else {

callback(error);
callback(error.syscall ' ' error.errno);

}

Expand Down

0 comments on commit d305aa3

Please sign in to comment.