File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -2,13 +2,20 @@ const p = require('path')
2
2
const fs = require ( 'fs' )
3
3
const { spawn, exec } = require ( 'child_process' )
4
4
5
- const hyperfuse = require ( 'hyperdrive-fuse' )
5
+ try {
6
+ var hyperfuse = require ( 'hyperdrive-fuse' )
7
+ } catch ( err ) {
8
+ console . warn ( 'FUSE installation failed. You will be unable to mount your hyperdrives.' )
9
+ }
10
+
6
11
const ora = require ( 'ora' )
7
12
const chalk = require ( 'chalk' )
8
13
9
14
exports . command = 'setup'
10
15
exports . desc = 'Run a one-time configuration step for FUSE.'
11
16
exports . handler = async function ( argv ) {
17
+ if ( ! hyperfuse ) return onerror ( 'FUSE installation failed.' )
18
+
12
19
console . log ( chalk . blue ( 'Configuring FUSE...' ) )
13
20
14
21
configureFuse ( ( err , fuseMsg ) => {
Original file line number Diff line number Diff line change 37
37
"google-protobuf" : " ^3.8.0" ,
38
38
"hyperdrive" : " ^10.0.0-rc7" ,
39
39
"hyperdrive-daemon-client" : " ^0.9.10" ,
40
- "hyperdrive-fuse" : " ^1.1.0" ,
41
40
"level" : " ^4.0.0" ,
42
41
"mkdirp" : " ^0.5.1" ,
43
42
"ora" : " ^3.4.0" ,
49
48
"subleveldown" : " ^4.0.0" ,
50
49
"yargs" : " ^13.2.1"
51
50
},
51
+ "optionalDependencies" : {
52
+ "hyperdrive-fuse" : " ^1.1.0"
53
+ },
52
54
"devDependencies" : {
53
55
"memdb" : " ^1.3.1" ,
54
56
"random-access-memory" : " ^3.1.1" ,
You can’t perform that action at this time.
0 commit comments