Skip to content

Commit e935670

Browse files
juliangruberandrewosh
authored andcommitted
Fix fuse flags on Windows. Closes #81
1 parent 618f120 commit e935670

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

bin/commands/fuse-setup.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,21 @@ const { Command, flags } = require('@oclif/command')
88
const { HyperdriveClient } = require('hyperdrive-daemon-client')
99
const constants = require('hyperdrive-daemon-client/lib/constants')
1010

11+
const isPosix = process.platform !== 'win32'
12+
1113
class SetupCommand extends Command {
1214
static usage = 'fuse-setup'
1315
static description = 'Perform a one-time configuration step for FUSE.'
1416
static flags = {
1517
user: flags.integer({
1618
description: `User that should own the ${constants.mountpoint} directory`,
1719
char: 'U',
18-
default: process.geteuid()
20+
default: isPosix && process.geteuid()
1921
}),
2022
group: flags.integer({
2123
description: `Group that should own the ${constants.mountpoint} directory`,
2224
char: 'G',
23-
default: process.getegid()
25+
default: isPosix && process.getegid()
2426
}),
2527
force: flags.boolean({
2628
description: 'Force the setup to execute, even if it\'s already been performed once.',

0 commit comments

Comments
 (0)