File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -27,14 +27,14 @@ if (!process.argv.slice(2).length)
27
27
function runQuery ( file , token ) {
28
28
29
29
try {
30
- var queryText = fs . readFileSync ( process . argv [ 2 ] , "utf8" ) ;
30
+ var queryText = fs . readFileSync ( file , "utf8" ) ;
31
31
}
32
32
catch ( e ) {
33
33
console . log ( "Problem opening query file: " + e . message ) ;
34
34
process . exit ( 1 ) ;
35
35
}
36
36
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.
38
38
queryObj . variables = variablesRegex . test ( queryText ) ? JSON . parse ( queryText . match ( variablesRegex ) [ 0 ] . split ( "variables " ) [ 1 ] ) : { }
39
39
//Remove the variables section from the query text, whether it exists or not
40
40
queryObj . query = queryText . replace ( variablesRegex , '' ) ;
You can’t perform that action at this time.
0 commit comments