Skip to content

Commit

Permalink
mark some required relations between CLI args
Browse files Browse the repository at this point in the history
  • Loading branch information
radumarias committed Aug 19, 2024
1 parent f7a4a43 commit b2c2e34
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ fn get_cli_args() -> ArgMatches {
.short('m')
.required(true)
.value_name("MOUNT_POINT")
.requires("data-dir")
.help("Act as a client, and mount FUSE at given path"),
)
.arg(
Expand All @@ -139,27 +140,34 @@ fn get_cli_args() -> ArgMatches {
.short('d')
.required(true)
.value_name("DATA_DIR")
.requires("mount-point")
.help("Where to store the encrypted data"),
)
.arg(
Arg::new("umount-on-start")
.long("umount-on-start")
.short('u')
.action(ArgAction::SetTrue)
.requires("mount-point")
.requires("data-dir")
.help("If we should try to umount the mountpoint before starting the FUSE server. This can be useful when the previous run crashed or was forced kll and the mountpoint is still mounted."),
)
.arg(
Arg::new("allow-root")
.long("allow-root")
.short('r')
.action(ArgAction::SetTrue)
.requires("mount-point")
.requires("data-dir")
.help("Allow root user to access filesystem"),
)
.arg(
Arg::new("allow-other")
.long("allow-other")
.short('o')
.action(ArgAction::SetTrue)
.requires("mount-point")
.requires("data-dir")
.help("Allow other user to access filesystem"),
)
.arg(
Expand All @@ -168,13 +176,16 @@ fn get_cli_args() -> ArgMatches {
.short('i')
.action(ArgAction::SetTrue)
.requires("mount-point")
.requires("data-dir")
.help("Use direct I/O (bypass page cache for an open file)"),
)
.arg(
Arg::new("suid")
.long("suid")
.short('s')
.action(ArgAction::SetTrue)
.requires("mount-point")
.requires("data-dir")
.help("If it should allow setting SUID and SGID when files are created. Default is false and it will unset those flags when creating files"),
)
).subcommand(
Expand Down

0 comments on commit b2c2e34

Please sign in to comment.