Skip to content

Commit

Permalink
Set GOTRACEBACK=crash by default
Browse files Browse the repository at this point in the history
Ensure if a go program crashes we get a coredump (especially to nail
down that's causing openshift/oc#58).

To get the dump, use coredumpctl:
  coredumpctl -o oc.coredump dump /usr/local/bin/oc
  • Loading branch information
stbenjam committed Aug 29, 2019
1 parent ebbd4fb commit 7f5329c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

eval "$(go env)"

# Ensure if a go program crashes we get a coredump (especially to nail
# down that's causing https://github.com/openshift/oc/issues/58).
#
# To get the dump, use coredumpctl:
# coredumpctl -o oc.coredump dump /usr/local/bin/oc
#
export GOTRACEBACK=crash

SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
USER=`whoami`

Expand Down

0 comments on commit 7f5329c

Please sign in to comment.