Skip to content

Commit

Permalink
fix(install): mkdirp node_modules/.bin
Browse files Browse the repository at this point in the history
  • Loading branch information
watilde committed Aug 11, 2017
1 parent 4d2a3f5 commit bdfb743
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
@@ -1,10 +1,12 @@
const fs = require('fs')
const path = require('path')
const mkdirp = require('mkdirp')
const nm = require('../../utils/nm')

const bin = (key, target) => {
const pkgJSON = require(path.join(target, 'package.json'))
if (!pkgJSON.bin) return
mkdirp.sync(path.join(nm, '.bin'))
if (typeof pkgJSON.bin === 'string') {
try {
fs.unlinkSync(path.join(nm, '.bin', key))
Expand Down

0 comments on commit bdfb743

Please sign in to comment.