Skip to content

Commit

Permalink
fix signal log message; release on tag only
Browse files Browse the repository at this point in the history
  • Loading branch information
alexei-led committed Mar 27, 2020
1 parent 995a0a6 commit 03c4f6e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v1
if: startsWith(github.ref, 'refs/tags/')
with:
version: latest
args: release
Expand Down
13 changes: 8 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,14 @@ func run(ctx context.Context, provider secrets.Provider, commandSlice []string)
if sig != syscall.SIGCHLD {
// forward signal to the main process and its children
e := syscall.Kill(-cmd.Process.Pid, sig.(syscall.Signal))
log.WithFields(log.Fields{
"pid": cmd.Process.Pid,
"path": cmd.Path,
"args": cmd.Args,
}).WithError(e).Error("failed to kill process")
if e != nil {
log.WithFields(log.Fields{
"pid": cmd.Process.Pid,
"path": cmd.Path,
"args": cmd.Args,
"signal": sig,
}).WithError(e).Error("failed to send system signal to the process")
}
}
}
}()
Expand Down

0 comments on commit 03c4f6e

Please sign in to comment.