Skip to content

Commit

Permalink
return job exit code
Browse files Browse the repository at this point in the history
  • Loading branch information
davixcky committed Jun 11, 2024
1 parent 23ddba8 commit b55a64f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ require (
github.com/oklog/run v1.1.0
github.com/panta/machineid v1.0.2
github.com/r3labs/sse/v2 v2.10.0
github.com/signadot/go-sdk v0.3.8-0.20240529233641-955e0237e964
github.com/signadot/go-sdk v0.3.8-0.20240605180141-b29704b26c36
github.com/signadot/libconnect v0.1.1-0.20240306100356-4c865b888453
github.com/spf13/cobra v1.6.0
github.com/spf13/viper v1.11.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,8 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR
github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=
github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/signadot/go-sdk v0.3.8-0.20240529233641-955e0237e964 h1:S8mXSuI/JcNTkaoXL2L0HDLGgakKffmMMswmZwrLSmM=
github.com/signadot/go-sdk v0.3.8-0.20240529233641-955e0237e964/go.mod h1:LBc3zdVqtLQpXo78HN/DrMhf6PBcfyhlg/tVRrDL+sg=
github.com/signadot/go-sdk v0.3.8-0.20240605180141-b29704b26c36 h1:0oZtASGceJIN8WzRT1dnQ4JhmokO/tRGnBabYuiSVrI=
github.com/signadot/go-sdk v0.3.8-0.20240605180141-b29704b26c36/go.mod h1:LBc3zdVqtLQpXo78HN/DrMhf6PBcfyhlg/tVRrDL+sg=
github.com/signadot/libconnect v0.1.1-0.20240306100356-4c865b888453 h1:omG9Iuz5vO0wNvpX/o1sAu+yuHnjHp6okvV9dDRCcd4=
github.com/signadot/libconnect v0.1.1-0.20240306100356-4c865b888453/go.mod h1:hS/87oYNXxPg5+sSQuHnQgc8q1xEsBIExnbLEeC46+8=
github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM=
Expand Down
3 changes: 2 additions & 1 deletion internal/command/jobs/printers.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"github.com/signadot/cli/internal/command/logs"
"github.com/signadot/go-sdk/client/jobs"
"io"
"os"
"sort"
"text/tabwriter"
"time"
Expand Down Expand Up @@ -126,7 +127,7 @@ func waitForJob(cfg *config.JobSubmit, out io.Writer, jobName string) error {

switch j.Status.Phase {
case "completed":
fmt.Fprintf(out, "\n%s\n", j.Status.Attempts[0].State)
os.Exit(int(j.Status.Attempts[0].State.Completed.ExitCode))

return nil
case "queued":
Expand Down

0 comments on commit b55a64f

Please sign in to comment.