Skip to content

Commit

Permalink
fix(install): change the permission of bin file
Browse files Browse the repository at this point in the history
While making the symlinks of the bin files, dep will update the
permission of them to executable `0755` since it's supposed to
be called as a command.

Fixes: https://github.com/watilde/dep/issues/22
  • Loading branch information
watilde committed Sep 9, 2017
1 parent d371266 commit 17f3fb6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/install/installer/bin.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const bin = (key, target) => {
path.join(target, pkgJSON.bin),
path.join(nm, '.bin', key)
)
fs.chmodSync(path.join(target, pkgJSON.bin), '0755')
} else if (typeof pkgJSON.bin === 'object') {
Object.keys(pkgJSON.bin).forEach((cmd) => {
try {
Expand All @@ -23,6 +24,7 @@ const bin = (key, target) => {
path.join(target, pkgJSON.bin[cmd]),
path.join(nm, '.bin', cmd)
)
fs.chmodSync(path.join(target, pkgJSON.bin[cmd]), '0755')
})
}
}
Expand Down

0 comments on commit 17f3fb6

Please sign in to comment.