Skip to content
This repository has been archived by the owner on Jul 24, 2019. It is now read-only.

Commit

Permalink
Merge pull request #342 from Medium/nick-fs
Browse files Browse the repository at this point in the history
add better logging around file copying
  • Loading branch information
nicks committed May 21, 2015
2 parents c3493f1 + 9dbf3f9 commit 0d8bea7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ node_js:
- "iojs"
- "0.12"
- "0.10"
- "0.8"

before_install:
- npm install -g npm
15 changes: 12 additions & 3 deletions install.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "phantomjs",
"version": "1.9.16",
"version": "1.9.17",
"keywords": [
"phantomjs",
"headless",
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 0d8bea7

Please sign in to comment.