summaryrefslogtreecommitdiff
path: root/deps/npm/lib/config/gentle-fs.js
blob: c4a1f9fa22db43b3ff96de85e4c67e84bf5bb4ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
'use strict'

const npm = require('../npm.js')
const log = require('npmlog')

module.exports = gentleFSOpts

function gentleFSOpts (gently, base, abs) {
  return {
    // never rm the root, prefix, or bin dirs
    //
    // globals included because of `npm link` -- as far as the package
    // requesting the link is concerned, the linked package is always
    // installed globally
    prefixes: [
      npm.prefix,
      npm.globalPrefix,
      npm.dir,
      npm.root,
      npm.globalDir,
      npm.bin,
      npm.globalBin
    ],
    absolute: abs,
    log: log,
    prefix: npm.prefix,
    force: npm.config.get('force'),
    gently: gently,
    base: base,
    name: 'npm'
  }
}