From 7b63c6b9df6f611678bfd7c0dd20a24bca0cdf43 Mon Sep 17 00:00:00 2001 From: James Pederson Date: Sat, 14 Jun 2014 20:28:46 -0500 Subject: [PATCH] Removing the check to see if the file exists - this is done by the transicc utility already so we can just return the response. --- transicc.js | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/transicc.js b/transicc.js index f4537a2..41812bc 100644 --- a/transicc.js +++ b/transicc.js @@ -1,7 +1,6 @@ -var spawn = require( "child_process" ).spawn, - fs = require( "fs" ); +var spawn = require( "child_process" ).spawn; // new switch in 1.1.2 to replace symlinks for shortcut profiles @@ -45,18 +44,6 @@ module.exports = function( input_profile, output_profile, args, callback ) { // create an array of arguments we'll pass to the transicc command var cmd_arg = []; - // error if input profile is invalid. - if ( !fs.existsSync( profile_path( input_profile ) ) ) { - callback( new Error('Invalid input profile.'), null ); - return; - } - - // error if output profile is invalid. - if ( !fs.existsSync( profile_path( output_profile ) ) ) { - callback( new Error('Invalid output profile.'), null ); - return; - } - // add the input profile cmd_arg.push( profile_path( input_profile ) ); @@ -76,6 +63,7 @@ module.exports = function( input_profile, output_profile, args, callback ) { cmd_arg.push( args[i] ); } + // spawn the command and create an empty response var cmd = spawn( "./shell/"+args.length+".sh", cmd_arg, { cwd: __dirname