Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
lint
  • Loading branch information
sreya committed Mar 31, 2025
commit ce73172e9ecb032aae5e88813e90a10f2aad63a5
3 changes: 2 additions & 1 deletion cli/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ func dockerCmd() *cobra.Command {

httpClient, err := xhttp.Client(log, flags.extraCertsPath)
if err != nil {
//nolint
return xerrors.Errorf("http client: %w", err)
}

Expand Down Expand Up @@ -395,7 +396,7 @@ func dockerCmd() *cobra.Command {
log.Debug(ctx, "killing container", slog.F("bootstrap_pid", bootstrapPID))

// The PID returned is the PID _outside_ the container...
out, err := exec.Command("kill", "-TERM", strconv.Itoa(bootstrapPID)).CombinedOutput()
out, err := exec.Command("kill", "-TERM", strconv.Itoa(bootstrapPID)).CombinedOutput() //nolint:gosec
if err != nil {
log.Error(ctx, "kill bootstrap process", slog.Error(err), slog.F("output", string(out)))
return
Expand Down
3 changes: 2 additions & 1 deletion dockerutil/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ func BootstrapContainer(ctx context.Context, client Client, conf BootstrapConfig

var err error
for r, n := retry.New(time.Second, time.Second*2), 0; r.Wait(ctx) && n < 10; n++ {
out, err := ExecContainer(ctx, client, ExecConfig{
var out []byte
out, err = ExecContainer(ctx, client, ExecConfig{
ContainerID: conf.ContainerID,
User: conf.User,
Cmd: "/bin/sh",
Expand Down
Loading