Skip to content

Commit 9630d36

Browse files
committed
Merge pull request #45 from ipfs/feat/path
feat: Expose repo.path
2 parents 5d29951 + 35c5155 commit 9630d36

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ function Repo (repoPath, options) {
2020
}
2121
}
2222

23+
this.path = repoPath
24+
2325
this.init = (config, callback) => {
2426
this.exists((err, exists) => {
2527
if (err) { throw err }

test/repo-test.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ module.exports = function (repo) {
2222
})
2323
})
2424

25+
it('exposes the path', () => {
26+
expect(typeof repo.path).to.be.equal('string')
27+
})
28+
2529
describe('locks', () => {
2630
it('lock, unlock', (done) => {
2731
repo.locks.lock((err) => {

0 commit comments

Comments
 (0)