Skip to content

Commit 466a7bc

Browse files
wraithgarvasco-santos
authored andcommitted
fix:ipfsd-daemon remove broken code (#247)
the code checking for process.env.IPFS_TYPE was not working and isn't something we need anymore anyways. Consumers of this lib should pass in the option to override it.
1 parent fd7a590 commit 466a7bc

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,7 @@
101101
"shutdown": "~0.3.0",
102102
"stream-http": "^2.8.1",
103103
"subcomandante": "^1.0.5",
104-
"superagent": "^3.8.2",
105-
"truthy": "~0.0.1"
104+
"superagent": "^3.8.2"
106105
},
107106
"devDependencies": {
108107
"aegir": "^13.0.6",

src/ipfsd-daemon.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ const multiaddr = require('multiaddr')
88
const rimraf = require('rimraf')
99
const path = require('path')
1010
const once = require('once')
11-
const truthy = require('truthy')
1211
const defaults = require('lodash.defaults')
1312
const debug = require('debug')
1413
const os = require('os')
@@ -41,10 +40,8 @@ class Daemon {
4140
? process.env.testpath
4241
: __dirname
4342

44-
const type = truthy(process.env.IPFS_TYPE)
45-
46-
this.opts = opts || { type: type || 'go' }
47-
const td = tmpDir(opts.type === 'js')
43+
this.opts = opts || { type: 'go' }
44+
const td = tmpDir(this.opts.type === 'js')
4845
this.path = this.opts.disposable
4946
? td
5047
: (this.opts.repoPath || td)

0 commit comments

Comments
 (0)