run: Set OCAMLRUNPARAM to display stack traces by default.
authorRichard W.M. Jones <rjones@redhat.com>
Sat, 18 Jan 2020 20:52:36 +0000 (20:52 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Sat, 18 Jan 2020 20:52:36 +0000 (20:52 +0000)
run.in

diff --git a/run.in b/run.in
index 928882d..9e04a5a 100644 (file)
--- a/run.in
+++ b/run.in
@@ -38,6 +38,10 @@ prepend PATH "$b/src"
 # Set up environment variables to add default flags.
 export GOALS_DATADIR="$b"
 
+# Set OCAMLRUNPARAM so stack traces are displayed, but don't
+# override the user's value.
+if [ -z "$OCAMLRUNPARAM" ]; then export OCAMLRUNPARAM=b; fi
+
 # Run the program.
 #echo "$@"
 exec "$@"