Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit c73ac5e

Browse files
SidHarderdaviddias
authored andcommitted
os.tmpDir has been depricated in favor of os.tmpdir (#760)
1 parent 6b0adff commit c73ac5e

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

examples/basics/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const IPFS = require('../../src/core')
1313
* Create a new IPFS instance, using default repo (fs) on default path (~/.ipfs)
1414
*/
1515
const node = new IPFS({
16-
repo: path.join(os.tmpDir() + '/' + new Date().toString()),
16+
repo: path.join(os.tmpdir() + '/' + new Date().toString()),
1717
EXPERIMENTAL: {
1818
pubsub: false
1919
}

test/cli/init.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ describe('init', () => {
1515
const repoExistsSync = (p) => fs.existsSync(path.join(repoPath, p))
1616

1717
beforeEach(() => {
18-
repoPath = os.tmpDir() + '/ipfs-' + Math.random().toString().substring(2, 8)
18+
repoPath = os.tmpdir() + '/ipfs-' + Math.random().toString().substring(2, 8)
1919
ipfs = ipfsExec(repoPath)
2020
})
2121

test/utils/ipfs-exec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ module.exports = (repoPath, opts) => {
3535

3636
const cp = exec(args)
3737
const res = cp.then((res) => {
38-
// We can't escape the os.tmpDir warning due to:
38+
// We can't escape the os.tmpdir warning due to:
3939
// https://github.com/shelljs/shelljs/blob/master/src/tempdir.js#L43
4040
// expect(res.stderr).to.be.eql('')
4141
return res.stdout

test/utils/ipfs-factory-daemon/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class Factory {
2525
config = undefined
2626
}
2727

28-
repoPath = repoPath || os.tmpDir() +
28+
repoPath = repoPath || os.tmpdir() +
2929
'/ipfs-' + Math.random().toString().substring(2, 8)
3030

3131
let node

test/utils/on-and-off.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function off (tests) {
1313
let repoPath
1414

1515
before(() => {
16-
repoPath = os.tmpDir() + '/ipfs-' + Math.random().toString().substring(2, 8)
16+
repoPath = os.tmpdir() + '/ipfs-' + Math.random().toString().substring(2, 8)
1717
thing.ipfs = ipfsExec(repoPath)
1818
thing.ipfs.repoPath = repoPath
1919
return thing.ipfs('init')

0 commit comments

Comments
 (0)