Skip to content

Commit

Permalink
fix: handle switch properly
Browse files Browse the repository at this point in the history
  • Loading branch information
vchandela committed Sep 12, 2024
1 parent 6b7d9ab commit b6949e4
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions wait/host_port.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,19 +216,15 @@ func internalCheck(ctx context.Context, internalPort nat.Port, target StrategyTa
// Docker has a issue which override exit code 127 to 126 due to:
// https://github.com/moby/moby/issues/45795
// Handle both to ensure compatibility with Docker and Podman for now.
if exitCode == 0 {
break
select exitCode {
switch exitCode {
case 0:
return nil
case exitEaccess:
return errShellNotExecutable
case exitCmdNotFound:
return errShellNotFound
}
}
}
return nil
}

func buildInternalCheckCommand(internalPort int) string {
Expand Down

0 comments on commit b6949e4

Please sign in to comment.