zeus: Zeus Test intermittently exits with code 2

Description of Problem

Sometimes when running zeus test (or rspec) I get an immediate exit with code 2. It seems like a timing issue, if I run a spec right after I save a file it seems to happen.

System details

  • uname -a: Darwin robin.local 13.2.0 Darwin Kernel Version 13.2.0: Thu Apr 17 23:03:13 PDT 2014; root:xnu-2422.100.13~1/RELEASE_X86_64 x86_64
  • ruby -v: ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-darwin13.0]

Steps to Reproduce

  1. zeus start in a new rails project

  2. Run zeus test from a script, something like this:

for i in {1..10}
do
  zeus rspec $1
done

Observed Behavior

  • One of the test runs will exit with code 2

Expected Behavior

  • Should run tests

About this issue

  • Original URL
  • State: open
  • Created 10 years ago
  • Comments: 18 (3 by maintainers)

Most upvoted comments

I had to modify @aaronjensen 's function a bit to get it working for me in zsh, when passing multiple arguments like zeus rspec spec/models/user_spec.rb :

zeus () {
  ARGS=$@;
  command zeus "$@";
  ZE_EC=$?;
  if [ $ZE_EC = 2 ]; then
    stty sane;
    zeus ${=ARGS};
  fi
}