You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've got an intermittent failure running my tests. When this occurs guard explodes in glorious fashion with the attached stack trace.
This is happening on a Mac Book Pro: Darwin res-mppi6 15.6.0 Darwin Kernel Version 15.6.0: Mon Jan 9 23:07:29 PST 2017; root:xnu-3248.60.11.2.1~1/RELEASE_X86_64 x86_64
Under the following ruby: ruby 2.2.5p319 (2016-04-26 revision 54774) [x86_64-darwin15]
This looks like it's due to Kernel.system being able to return true, false, or nil and the runner only checking for nil per the docs. It looks like the exception in run is trying to catch ENOENT but that returns false as well.
You can see this in action here:
[1] pry(main)> Kernel.system('echo $((1 / 1))')
1
=> true
[2] pry(main)> Kernel.system('echo $((1 / 0))')
sh: 1 / 0: division by 0 (error token is "0")
=> false
[3] pry(main)> Kernel.system('cat file_dun_exist')
cat: file_dun_exist: No such file or directory
=> false
A little more investigating reveals that for whatever reason my tests are being terminated with signal 15. This still returns false and not nil. It looks like Open3 might behave the way that's expected. I also don't think raising ENOENT is the right thing to be raising.
PR coming shortly.
rickr
pushed a commit
to rickr/guard-minitest
that referenced
this issue
Mar 24, 2017
I've got an intermittent failure running my tests. When this occurs guard explodes in glorious fashion with the attached stack trace.
This is happening on a Mac Book Pro:
Darwin res-mppi6 15.6.0 Darwin Kernel Version 15.6.0: Mon Jan 9 23:07:29 PST 2017; root:xnu-3248.60.11.2.1~1/RELEASE_X86_64 x86_64
Under the following ruby:
ruby 2.2.5p319 (2016-04-26 revision 54774) [x86_64-darwin15]
This looks like it's due to Kernel.system being able to return true, false, or nil and the runner only checking for nil per the docs. It looks like the exception in
run
is trying to catchENOENT
but that returns false as well.You can see this in action here:
Stack trace:
The text was updated successfully, but these errors were encountered: