File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,14 +27,14 @@ if (!process.argv.slice(2).length)
2727function runQuery ( file , token ) {
2828
2929 try {
30- var queryText = fs . readFileSync ( process . argv [ 2 ] , "utf8" ) ;
30+ var queryText = fs . readFileSync ( file , "utf8" ) ;
3131 }
3232 catch ( e ) {
3333 console . log ( "Problem opening query file: " + e . message ) ;
3434 process . exit ( 1 ) ;
3535 }
3636
37- //If there is a variables section, extract the values and add them to the query JSON object.
37+ //If there is a variables section, extract the values and add them to the query JSON object.
3838 queryObj . variables = variablesRegex . test ( queryText ) ? JSON . parse ( queryText . match ( variablesRegex ) [ 0 ] . split ( "variables " ) [ 1 ] ) : { }
3939 //Remove the variables section from the query text, whether it exists or not
4040 queryObj . query = queryText . replace ( variablesRegex , '' ) ;
You can’t perform that action at this time.
0 commit comments