Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Throw error if destination does not exist

  • Loading branch information...
commit a0564787db0becbd62bbec275fdbf77188b9ccb9 1 parent fec2f1b
Hage Yaapa authored February 26, 2012

Showing 2 changed files with 3 additions and 3 deletions. Show diff stats Hide diff stats

  1. 4  index.js
  2. 2  package.json
4  index.js
@@ -5,7 +5,7 @@ var program = require('commander');
5 5
 var exec = require('child_process').exec;
6 6
 
7 7
 program
8  
-  .version('0.0.1')
  8
+  .version('0.0.2')
9 9
   .option('-f, --file <path>', 'FLV file path')
10 10
   .option('-o, --out [path]', 'Output directory')
11 11
   .parse(process.argv);
@@ -23,7 +23,7 @@ function convert(source_file, destination_dir) {
23 23
 			in_destination_dir = true;
24 24
 			process.chdir(destination_dir);			
25 25
 		}
26  
-		catch (err) { console.log(err); }
  26
+		catch (err) { throw err; }
27 27
 	}
28 28
 	var destination_file = source_file.split('/').slice(-1)[0].replace('.flv', '.mp3');
29 29
 	var ffmpeg = 'ffmpeg -y -i '+ source_file +' -f mp3 -vn -acodec copy ' + destination_file;
2  package.json
... ...
@@ -1,6 +1,6 @@
1 1
 {
2 2
 	"name": "flv2mp3",
3  
-	"version": "0.0.1",
  3
+	"version": "0.0.2",
4 4
 	"description": "Node.js module to convert FLV to MP3 files",
5 5
 	"preferGlobal": "true",
6 6
 	"main": "index.js",

0 notes on commit a056478

Please sign in to comment.
Something went wrong with that request. Please try again.