File tree 1 file changed +5
-8
lines changed
components/gitpod-protocol/src
1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -296,17 +296,14 @@ export namespace EnvVar {
296
296
( imageAuth . value || "" ) . split ( "," ) . forEach ( ( entry ) => {
297
297
const parts = entry . trim ( ) . split ( ":" ) ;
298
298
if ( parts . length === 2 ) {
299
- // host:token
300
- const host = parts [ 0 ] ;
301
- const token = parts [ 1 ] ;
302
- if ( host && token && host . length > 0 && token . length > 0 ) {
299
+ const [ host , token ] = parts ;
300
+ if ( host && token ) {
303
301
res . set ( host , token ) ;
304
302
}
305
303
} else if ( parts . length === 3 ) {
306
- // host:port:token
307
- const hostWithPort = `${ parts [ 0 ] } :${ parts [ 1 ] } ` ;
308
- const token = parts [ 2 ] ;
309
- if ( hostWithPort && token && hostWithPort . length > 0 && token . length > 0 ) {
304
+ const [ host , port , token ] = parts ;
305
+ const hostWithPort = `${ host } :${ port } ` ;
306
+ if ( hostWithPort && token ) {
310
307
res . set ( hostWithPort , token ) ;
311
308
}
312
309
}
You can’t perform that action at this time.
0 commit comments