File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
components/gitpod-protocol/src Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -296,17 +296,14 @@ export namespace EnvVar {
296296 ( imageAuth . value || "" ) . split ( "," ) . forEach ( ( entry ) => {
297297 const parts = entry . trim ( ) . split ( ":" ) ;
298298 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 ) {
303301 res . set ( host , token ) ;
304302 }
305303 } 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 ) {
310307 res . set ( hostWithPort , token ) ;
311308 }
312309 }
You can’t perform that action at this time.
0 commit comments