Skip to content

Commit

Permalink
Merge pull request #4 from CoreViewInc/azure-devops-build-agent-setup
Browse files Browse the repository at this point in the history
feat: handle error from BuildImage in docker build command
  • Loading branch information
DeanHnter authored Apr 24, 2024
2 parents a53a628 + cbb3f23 commit 99e278c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Client/cmd/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"github.com/spf13/cobra"
shared "github.com/CoreViewInc/CoreNiko/shared"
"fmt"
"os"
)

// DockerCLI provides methods which execute docker commands.
Expand Down Expand Up @@ -46,7 +47,11 @@ var (
// Retrieve the dockerfile path from the --file flag, or use the default "Dockerfile"
dockerfilePath, _ := cmd.Flags().GetString("file")
// Call the build service with the options, context path, and dockerfile path
DockerCLI.Service.BuildImage(buildOptions, contextPath, dockerfilePath)
err := DockerCLI.Service.BuildImage(buildOptions, contextPath, dockerfilePath)
if err!=nil{
fmt.Println(err)
os.Exit(1)
}
},
}

Expand Down

0 comments on commit 99e278c

Please sign in to comment.