aboutsummaryrefslogtreecommitdiff
path: root/src/cli.rs
diff options
context:
space:
mode:
authorAlexander Bantyev2022-01-29 13:35:12 +0300
committerGitHub2022-01-29 13:35:12 +0300
commit3180b55ad44777edd90c08f9f9d4df74ec1549b9 (patch)
tree3ec4c68c7a2bb93baea99c91c272c592eac3447a /src/cli.rs
parent0ac333cdc03407538b5b19d60a8e7c64588490fb (diff)
parent874af9b05bec0bd73a333166a8b5291ecb1c0e3e (diff)
Merge pull request #148 from afontaine/afontaine/add-doas-support
Add custom sudo command support
Diffstat (limited to '')
-rw-r--r--src/cli.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cli.rs b/src/cli.rs
index 61890e4..cc5a3ac 100644
--- a/src/cli.rs
+++ b/src/cli.rs
@@ -89,6 +89,9 @@ pub struct Opts {
/// Revoke all previously succeeded deploys when deploying multiple profiles
#[clap(long)]
rollback_succeeded: Option<bool>,
+ /// Which sudo command to use. Must accept at least two arguments: user name to execute commands as and the rest is the command to execute
+ #[clap(long)]
+ sudo: Option<String>,
}
/// Returns if the available Nix installation supports flakes
@@ -635,6 +638,7 @@ pub async fn run(args: Option<&ArgMatches>) -> Result<(), RunError> {
temp_path: opts.temp_path,
confirm_timeout: opts.confirm_timeout,
dry_activate: opts.dry_activate,
+ sudo: opts.sudo,
};
let supports_flakes = test_flake_support().await.map_err(RunError::FlakeTest)?;