Skip to content

Commit

Permalink
Merge pull request facebook#956 from frantic/debug-watchman
Browse files Browse the repository at this point in the history
Debugging watchman
  • Loading branch information
frantic committed Apr 21, 2015
2 parents 4792707 + 784ab78 commit 532c780
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion scripts/e2e-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,17 @@ export REACT_PACKAGER_LOG="$TEMP/server.log"
MARKER=$(mktemp $ROOT/Examples/SampleApp/XXXXXXXX)

function cleanup {
EXIT_CODE=$?
set +e
[ -f $REACT_PACKAGER_LOG ] && cat $REACT_PACKAGER_LOG

if [ $EXIT_CODE -ne 0 ];
then
WATCHMAN_LOGS=/usr/local/Cellar/watchman/3.1/var/run/watchman/$USER.log
[ -f $WATCHMAN_LOGS ] && cat $WATCHMAN_LOGS

[ -f $REACT_PACKAGER_LOG ] && cat $REACT_PACKAGER_LOG
fi

rm $MARKER
[ $SINOPIA_PID ] && kill -9 $SINOPIA_PID
[ -f ~/.npmrc.bak ] && mv ~/.npmrc.bak ~/.npmrc
Expand Down

0 comments on commit 532c780

Please sign in to comment.