Browse Source

pass opts to hyperdrive-fuse (we need this for passing through the logger

ameba23 3 years ago
parent
commit
68689fb6d8
1 changed files with 3 additions and 2 deletions
  1. 3
    2
      index.js

+ 3
- 2
index.js View File

@@ -2,10 +2,11 @@ const rimraf = require('rimraf')
2 2
 const hyperfuse = require('hyperdrive-fuse')
3 3
 const mkdirp = require('mkdirp')
4 4
 
5
-module.exports = function mount (drive, dir, cb) {
5
+module.exports = function mount (drive, dir, opts, cb) {
6
+  if ((typeof opts === 'function') && !cb) return mount(drive, dir, {}, opts)
6 7
   mkdirp.sync(dir)
7 8
 
8
-  var mounting = hyperfuse.mount(drive, dir)
9
+  var mounting = hyperfuse.mount(drive, dir, opts)
9 10
   mounting.catch(cb)
10 11
 
11 12
   mounting.then(({ destroy }) => {