Skip to content

Commit 03c4f6e

Browse files
committed
fix signal log message; release on tag only
1 parent 995a0a6 commit 03c4f6e

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

.github/workflows/release.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121

2222
- name: Run GoReleaser
2323
uses: goreleaser/goreleaser-action@v1
24+
if: startsWith(github.ref, 'refs/tags/')
2425
with:
2526
version: latest
2627
args: release

main.go

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,11 +165,14 @@ func run(ctx context.Context, provider secrets.Provider, commandSlice []string)
165165
if sig != syscall.SIGCHLD {
166166
// forward signal to the main process and its children
167167
e := syscall.Kill(-cmd.Process.Pid, sig.(syscall.Signal))
168-
log.WithFields(log.Fields{
169-
"pid": cmd.Process.Pid,
170-
"path": cmd.Path,
171-
"args": cmd.Args,
172-
}).WithError(e).Error("failed to kill process")
168+
if e != nil {
169+
log.WithFields(log.Fields{
170+
"pid": cmd.Process.Pid,
171+
"path": cmd.Path,
172+
"args": cmd.Args,
173+
"signal": sig,
174+
}).WithError(e).Error("failed to send system signal to the process")
175+
}
173176
}
174177
}
175178
}()

0 commit comments

Comments
 (0)