Skip to content

popen4 can return nil status #21

Closed
wants to merge 1 commit into from

7 participants

@gregolsen

According to popen4 source code comments:

On windows executing a non existent command does not raise an error
(as in unix) so on unix we return nil instead of a status object

It means that when java is not installed on unix 84 line in compressor.rb will throw "undefined method `exitstatus' for nil:NilClass (tested on Ubuntu with no java installed). That's why I've added validation for status presence.

@marcbowes

+1 to getting this merged in. Under Linux, this manifests when Java is not installed, resulting in a NoMethodError - very confusing when running remotely, e.g. under Rails+Capistrano using rake assets:precompile.

@shingara

I have this issue and can be usefull to know there are no java install instead of a YuiCompressor exception

@SamSaffron

this took a while to track down .. a fix will be appreciated

@stormsilver

:+1: for merging this in. Failing for me when Java is not installed.

@robconery

+1 for the merge...

@stevecrozz
Collaborator

This issue should be resolved now that I've taken care of:
better error messaging: #20
and
replace Popen4 with tempfiles: #14

@stevecrozz stevecrozz closed this Jul 15, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.