Browse code

Merge "Set PS4 in stack.sh to provide additional debug info"

Jenkins authored on 2016/02/03 09:26:03
Showing 1 changed files
... ...
@@ -23,6 +23,7 @@
23 23
 # Print the commands being run so that we can see the command that triggers
24 24
 # an error.  It is also useful for following along as the install occurs.
25 25
 set -o xtrace
26
+export PS4='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
26 27
 
27 28
 # Make sure custom grep options don't get in the way
28 29
 unset GREP_OPTIONS
... ...
@@ -240,6 +241,7 @@ echo "$STACK_USER ALL=(root) NOPASSWD:ALL" >$TEMPFILE
240 240
 # see them by forcing ``PATH``
241 241
 echo "Defaults:$STACK_USER secure_path=/sbin:/usr/sbin:/usr/bin:/bin:/usr/local/sbin:/usr/local/bin" >> $TEMPFILE
242 242
 echo "Defaults:$STACK_USER !requiretty" >> $TEMPFILE
243
+echo "Defaults env_keep += PS4" >> $TEMPFILE
243 244
 chmod 0440 $TEMPFILE
244 245
 sudo chown root:root $TEMPFILE
245 246
 sudo mv $TEMPFILE /etc/sudoers.d/50_stack_sh