From 79439a5c832efb0765a757bbb9158e503dbaf84c Mon Sep 17 00:00:00 2001 From: Rhys Koedijk Date: Thu, 24 Oct 2024 10:27:40 +1300 Subject: [PATCH] Tidy code --- internal/infra/run.go | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/internal/infra/run.go b/internal/infra/run.go index 37e7ccd..faa644f 100644 --- a/internal/infra/run.go +++ b/internal/infra/run.go @@ -6,16 +6,6 @@ import ( "encoding/base64" "encoding/json" "fmt" - "io" - "log" - "net/http" - "os" - "os/signal" - "regexp" - "strings" - "syscall" - "time" - "github.com/dependabot/cli/internal/model" "github.com/dependabot/cli/internal/server" "github.com/docker/docker/api/types" @@ -27,6 +17,15 @@ import ( "github.com/moby/moby/api/types/registry" "github.com/moby/moby/client" "gopkg.in/yaml.v3" + "io" + "log" + "net/http" + "os" + "os/signal" + "regexp" + "strings" + "syscall" + "time" ) type RunParams struct { @@ -150,12 +149,7 @@ func Run(params RunParams) error { return diff(params, outFile, output) } - // if the containers failed, propagate the error - if runContainersErr != nil { - return runContainersErr - } - - return nil + return runContainersErr } func generateOutput(params RunParams, api *server.API, outFile *os.File) ([]byte, error) {