@@ -26,13 +26,12 @@ const outputFileName = argv.filename
2626// callback function for getting input from prompt
2727
2828const getAuth = function ( auth , silent , callback ) {
29- read ( { prompt : `${ auth } : ` , silent : silent } , function ( er , password ) {
29+ read ( { prompt : `${ auth } : ` , silent : silent } , function ( er , password ) {
3030 callback ( password )
3131 } )
3232}
3333
3434// callback function for getting requested options
35-
3635const getRequestedOptions = exports . getRequestedOptions = function ( username , password , url , callback ) {
3736 const requestOptions = {
3837 headers : {
@@ -86,14 +85,13 @@ const getRequestedOptions = exports.getRequestedOptions = function (username, pa
8685const main = exports . main = function ( data , requestedOptions ) {
8786 logExceptOnTest ( 'Requesting API...' )
8887 requestBody ( requestedOptions , ( error , response , body ) => {
89- linkObject = responseToObject ( response . headers )
88+ const linkObject = responseToObject ( response . headers )
89+
9090 if ( error ) {
9191 chalk . red ( 'There has been an error requesting data from GitHub' )
9292 console . error ( error )
9393 }
9494
95- const linkObject = responseToObject ( response . headers )
96-
9795 // take body, parse it and add it to data
9896
9997 data = _ . concat ( data , body )
@@ -211,4 +209,4 @@ function logExceptOnTest (string) {
211209
212210const argvRepository = argv . _ [ argv . _ . length - 1 ]
213211
214- this . execute ( argvRepository )
212+ execute ( argvRepository )
0 commit comments