Skip to content

Commit

Permalink
fix: pw compose down by abridged hash fixed (needed to check one more…
Browse files Browse the repository at this point in the history
… char)

chore: pw compose down by challenge name+version (flavor) separator changed from ':' to '@' to match pw compose ps format
  • Loading branch information
Z-a-r-a-k-i authored and moul committed Nov 27, 2019
1 parent c09b59c commit 194571f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions go/pkg/pwcompose/compose.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ func Down(

for _, id := range ids {
for _, flavor := range pwInfo.RunningFlavors {
if id == flavor.Name || id == flavor.Name+":"+flavor.Version {
if id == flavor.Name || id == flavor.Name+"@"+flavor.Version {
for _, instance := range flavor.Instances {
containersToRemove = append(containersToRemove, instance.ID)
if removeImages == true {
Expand All @@ -257,7 +257,7 @@ func Down(
}
}
for _, container := range pwInfo.RunningInstances {
if id == container.ID || id == container.ID[0:6] {
if id == container.ID || id == container.ID[0:7] {
containersToRemove = append(containersToRemove, container.ID)
if removeImages == true {
imagesToRemove = append(imagesToRemove, container.ImageID)
Expand Down

0 comments on commit 194571f

Please sign in to comment.