File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
build/src/src/modules/docker Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -106,7 +106,12 @@ export async function listContainerNoThrow(
106106 byName : string
107107) : Promise < PackageContainer | null > {
108108 const containers = await dockerList ( { filters : { name : [ byName ] } } ) ;
109- return containers [ 0 ] ? parseContainerInfo ( containers [ 0 ] ) : null ;
109+ if ( ! containers [ 0 ] ) return null ;
110+ const container = parseContainerInfo ( containers [ 0 ] ) ;
111+ // When querying "geth.dnp.dappnode.eth", if user has "goerli-geth.dnp.dappnode.eth"
112+ // The latter can be returned as the original container.
113+ if ( container . name !== byName ) return null ;
114+ else return container ;
110115}
111116
112117export async function listContainer ( byName : string ) : Promise < PackageContainer > {
@@ -140,7 +145,7 @@ function parseContainerInfo(container: ContainerInfo): PackageContainer {
140145 const isDnp = packageName . includes ( CONTAINER_NAME_PREFIX ) ;
141146 const isCoreByName = packageName . includes ( CONTAINER_CORE_NAME_PREFIX ) ;
142147
143- let name ;
148+ let name = "" ;
144149 if ( isDnp ) name = packageName . split ( CONTAINER_NAME_PREFIX ) [ 1 ] || "" ;
145150 else if ( isCoreByName )
146151 name = packageName . split ( CONTAINER_CORE_NAME_PREFIX ) [ 1 ] || "" ;
You can’t perform that action at this time.
0 commit comments