Skip to content

Commit 8cb1ced

Browse files
authored
Support force & buildFromSource options in yarn (#140)
1 parent f6d0cee commit 8cb1ced

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

bin.js

+1-6
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
var path = require('path')
44
var fs = require('fs')
5-
var whichPmRuns = require('which-pm-runs')
65
var napi = require('napi-build-utils')
76

87
var pkg = require(path.resolve('package.json'))
@@ -42,13 +41,9 @@ var opts = Object.assign({}, rc, { pkg: pkg, log: log })
4241

4342
if (napi.isNapiRuntime(rc.runtime)) napi.logUnsupportedVersion(rc.target, log)
4443

45-
var pm = whichPmRuns()
46-
var isNpm = !pm || pm.name === 'npm'
4744
var origin = util.packageOrigin(process.env, pkg)
4845

49-
if (!isNpm && /node_modules/.test(process.cwd())) {
50-
// From yarn repository
51-
} else if (opts.force) {
46+
if (opts.force) {
5247
log.warn('install', 'prebuilt binaries enforced with --force!')
5348
log.warn('install', 'prebuilt binaries may be out of date!')
5449
} else if (origin && origin.length > 4 && origin.substr(0, 4) === 'git+') {

package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@
3333
"rc": "^1.2.7",
3434
"simple-get": "^3.0.3",
3535
"tar-fs": "^2.0.0",
36-
"tunnel-agent": "^0.6.0",
37-
"which-pm-runs": "^1.0.0"
36+
"tunnel-agent": "^0.6.0"
3837
},
3938
"devDependencies": {
4039
"a-native-module": "^1.0.0",

0 commit comments

Comments
 (0)