Skip to content

Commit b9e08fc

Browse files
committed
Update setup script
1 parent 1bb8522 commit b9e08fc

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

bin/setup.js

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,9 @@ exports.handler = async function (argv) {
2727
})
2828

2929
function configure (cb) {
30-
exec('which node', (err, nodePath) => {
31-
if (err) return onerror(err)
32-
nodePath = nodePath.trim()
33-
const child = spawn('sudo', [nodePath, p.join(__dirname, '../scripts/configure.js')], {
34-
stdio: 'inherit'
35-
})
36-
child.on('exit', code => {
37-
if (code !== 0) return cb(new Error('hyperdrive-fuse configuration failed.'))
38-
return cb(null, 'Successfully configured FUSE!')
39-
})
30+
exec(`sudo ${process.execPath} ${p.join(__dirname, '../scripts/configure.js')}`, err => {
31+
if (err) return cb(new Error(`Could not configure hyperdrive-fuse: ${err}`))
32+
return cb(null, 'Successfully configured FUSE!')
4033
})
4134
}
4235
}

bin/start.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,13 @@ exports.builder = {
2828
type: 'string',
2929
default: 'info'
3030
},
31-
'bootstrap': {
31+
bootstrap: {
3232
description: 'Comma-separated bootstrap servers to use.',
3333
type: 'array',
3434
default: []
3535
}
3636
}
37+
3738
exports.handler = async function (argv) {
3839
const client = new HyperdriveClient(`localhost:${argv.port}`)
3940
client.ready(err => {

0 commit comments

Comments
 (0)