Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

CLI mode should have watch for a sigterm, sigkill, sighub, etc signal that logs when the program exits #11

Closed
kminehart opened this issue Mar 7, 2022 · 0 comments · Fixed by #21
Assignees

Comments

@kminehart
Copy link
Collaborator

kminehart commented Mar 7, 2022

Whenever a build finishes successfully or errors, we submit a new log:

When we find an error: https://github.com/grafana/shipwright/blob/main/shipwright.go#L148

When it finishes successfully: https://github.com/grafana/shipwright/blob/main/shipwright.go#L155

But if someone sends a sigterm (ctrl+c), the "execution completed" log never occurs. We should watch for os.Signals in the Done() function, and log an "execution completed" with a "terminated" status: https://pkg.go.dev/os/signal

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant