From 91f999d88d6f9328b9f1e71eb5bc743695ab60b5 Mon Sep 17 00:00:00 2001 From: Nick Santos Date: Thu, 21 May 2015 11:50:31 -0400 Subject: [PATCH 1/2] add some better logging around file copying --- .travis.yml | 1 - install.js | 15 ++++++++++++--- package.json | 2 +- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2e4a07e88..8fba34a13 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,6 @@ node_js: - "iojs" - "0.12" - "0.10" - - "0.8" before_install: - npm install -g npm diff --git a/install.js b/install.js index ca52c9c37..50b5dd7ae 100644 --- a/install.js +++ b/install.js @@ -138,12 +138,21 @@ whichDeferred.promise var location = process.platform === 'win32' ? path.join(pkgPath, 'phantomjs.exe') : path.join(pkgPath, 'bin' ,'phantomjs') + + try { + // Ensure executable is executable by all users + fs.chmodSync(location, '755') + } catch (err) { + if (err.code == 'ENOENT') { + console.error('chmod failed: phantomjs was not successfully copied to', location) + exit(1) + } + throw err + } + var relativeLocation = path.relative(libPath, location) writeLocationFile(relativeLocation) - // Ensure executable is executable by all users - fs.chmodSync(location, '755') - console.log('Done. Phantomjs binary available at', location) exit(0) }) diff --git a/package.json b/package.json index 02a1d7d69..d0e8eaab3 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ }, "dependencies": { "adm-zip": "0.4.4", - "fs-extra": "~0.16.0", + "fs-extra": "~0.18", "kew": "0.4.0", "npmconf": "2.1.1", "progress": "1.1.8", From 9dbf3f99aeebbaf7defb00ee238528341d69da00 Mon Sep 17 00:00:00 2001 From: Nick Santos Date: Thu, 21 May 2015 11:51:06 -0400 Subject: [PATCH 2/2] bump version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d0e8eaab3..ac81d19bf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "phantomjs", - "version": "1.9.16", + "version": "1.9.17", "keywords": [ "phantomjs", "headless",