File tree Expand file tree Collapse file tree
lib/node_modules/@stdlib/_tools/pkgs/deps/bin Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -54,7 +54,6 @@ function done( error, results ) {
5454function main ( ) {
5555 var flags ;
5656 var args ;
57- var pkgs ;
5857 var opts ;
5958 var cli ;
6059 var sep ;
@@ -98,13 +97,12 @@ function main() {
9897 if ( ! process . stdin . isTTY ) {
9998 return stdin ( onData ) ;
10099 }
101- pkgs = args . slice ( ) ;
102- if ( pkgs . length === 0 ) {
100+ if ( args . length === 0 ) {
103101 err = new Error ( 'no input. Must provide a list of packages as command-line arguments or via `stdin`.' ) ;
104102 process . exitCode = 1 ;
105103 return console . error ( 'Error: %s' , err . message ) ; // eslint-disable-line no-console
106104 }
107- process . nextTick ( next ) ;
105+ return next ( args . slice ( ) ) ;
108106
109107 /**
110108 * Callback invoked after attempting to read data from `stdin`.
@@ -115,6 +113,7 @@ function main() {
115113 * @returns {void }
116114 */
117115 function onData ( error , data ) {
116+ var pkgs ;
118117 var i ;
119118 if ( error ) {
120119 process . exitCode = 1 ;
@@ -134,15 +133,16 @@ function main() {
134133 pkgs . push ( data [ i ] ) ;
135134 }
136135 }
137- next ( ) ;
136+ next ( pkgs ) ;
138137 } // end FUNCTION onData()
139138
140139 /**
141140 * Callback invoked once ready to resolve dependencies.
142141 *
143142 * @private
143+ * @param {StringArray } pkgs - list of packages
144144 */
145- function next ( ) {
145+ function next ( pkgs ) {
146146 find ( pkgs , opts , done ) ;
147147 } // end FUNCTION next()
148148} // end FUNCTION main()
You can’t perform that action at this time.
0 commit comments