filter out empty ports

This commit is contained in:
Nikola Jokic
2022-06-08 16:49:44 +02:00
parent 51bd8b62a4
commit ee2554e2c0
2 changed files with 4 additions and 4 deletions

View File

@@ -271,7 +271,7 @@ export async function healthCheck({
export async function containerPorts(id: string): Promise<string[]> {
const dockerArgs = ['port', id]
const portMappings = (await runDockerCommand(dockerArgs)).trim()
return portMappings.split('\n')
return portMappings.split('\n').filter(p => !!p)
}
export async function registryLogin(registry?: Registry): Promise<string> {