Skip to content

Commit

Permalink
revert one -q
Browse files Browse the repository at this point in the history
  • Loading branch information
freddydk committed May 17, 2023
1 parent d89b570 commit 2caae7b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ContainerInfo/Test-NavContainer.ps1
Expand Up @@ -26,9 +26,9 @@ try {
$a = ""
}

$id = docker ps $a --no-trunc --format "{{.ID}}/{{.Names}}" | Where-Object { $containerName -eq $_.split('/')[1] } | % { $_.split('/')[0] }
$id = docker ps $a --no-trunc --format "{{.ID}}/{{.Names}}" | Where-Object { $containerName -eq $_.split('/')[1] } | ForEach-Object { $_.split('/')[0] }
if (!($id)) {
$id = docker ps $a --no-trunc --filter "id=$containerName"
$id = docker ps $a -q --no-trunc --filter "id=$containerName"
}
if ($id) {
$inspect = docker inspect $id | ConvertFrom-Json
Expand Down

0 comments on commit 2caae7b

Please sign in to comment.