Skip to content

Commit

Permalink
Update MavenPhantomJSBinaryResolver.java
Browse files Browse the repository at this point in the history
Test testSimple() in TestDriver currently fails on Windows.
Problem: If no path is provided the created file has 0 bytes but is executable.
  • Loading branch information
and-k committed Nov 2, 2013
1 parent 5b2c1b2 commit 02534e7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class MavenPhantomJSBinaryResolver implements PhantomJSBinaryResolver {
@Override
public PhantomJSBinary resolve(File destination) throws IOException {
File realDestination = destination.isDirectory() ? new File(destination, PHANTOMJS) : destination;
if (realDestination.exists() && realDestination.canExecute()) {
if (realDestination.exists() && realDestination.length() > 0 && realDestination.canExecute()) {
return new PhantomJSBinary(realDestination);
}
return resolveFreshExtracted(realDestination);
Expand Down

0 comments on commit 02534e7

Please sign in to comment.