The library for web and native user interfaces.
Ensure that the phantomjs binary has appropriate UNIX mode.
The 755 mode corresponds to a UNIX mode string of -rwxr-xr-x. Closes #166.
Ben Newman committed
Jul 5, 2013 at 19:01 UTC
70a2f8046c8acd8c9422f9c6b3f2ceeb4da91875
1 file changed
+9
-6
grunt/tasks/phantom.js
+9
-6
@@ -1,6 +1,7 @@
1
'use strict';
2
3
var assert = require("assert");
4
+var fs = require("fs");
5
var grunt = require("grunt");
6
var spawn = grunt.util.spawn;
7
var semver = require("semver");
@@ -58,11 +59,13 @@ module.exports = function() {
59
var config = this.data;
60
var done = this.async();
61
61
- spawn({
62
- cmd: phantomjs,
63
- args: ["--version"]
64
- }, function(error, result, code) {
65
- checkVersion(error, result, code);
66
- run(config, done);
62
+ fs.chmod(phantomjs, 755, function(err) {
63
+ spawn({
64
+ cmd: phantomjs,
65
+ args: ["--version"]
66
+ }, function(error, result, code) {
67
+ checkVersion(error, result, code);
68
+ run(config, done);
69
+ });
70
});
71
};