@@ -33,8 +33,8 @@ const colors = [chalk.cyan, chalk.green, chalk.magenta, chalk.yellow, chalk.red]
3333function selectColor ( taskName ) {
3434 let hash = 0
3535
36- for ( const i in taskName ) {
37- hash = ( ( hash << 5 ) - hash ) + taskName . charCodeAt ( i )
36+ for ( const c of taskName ) {
37+ hash = ( ( hash << 5 ) - hash ) + c
3838 hash |= 0
3939 }
4040
@@ -124,7 +124,7 @@ module.exports = function runTask(task, options) {
124124 const stdinKind = detectStreamKind ( stdin , process . stdin )
125125 const stdoutKind = detectStreamKind ( stdout , process . stdout )
126126 const stderrKind = detectStreamKind ( stderr , process . stderr )
127- const spawnOptions = { stdio : [ stdinKind , stdoutKind , stderrKind ] }
127+ const spawnOptions = { stdio : [ stdinKind , stdoutKind , stderrKind ] }
128128
129129 // Print task name.
130130 if ( options . printName && stdout != null ) {
@@ -164,10 +164,10 @@ module.exports = function runTask(task, options) {
164164 stdin . pipe ( cp . stdin )
165165 }
166166 if ( stdoutKind === "pipe" ) {
167- cp . stdout . pipe ( stdout , { end : false } )
167+ cp . stdout . pipe ( stdout , { end : false } )
168168 }
169169 if ( stderrKind === "pipe" ) {
170- cp . stderr . pipe ( stderr , { end : false } )
170+ cp . stderr . pipe ( stderr , { end : false } )
171171 }
172172
173173 // Register
@@ -177,7 +177,7 @@ module.exports = function runTask(task, options) {
177177 } )
178178 cp . on ( "close" , ( code ) => {
179179 cp = null
180- resolve ( { task, code} )
180+ resolve ( { task, code } )
181181 } )
182182 } )
183183
0 commit comments