From 874af9b05bec0bd73a333166a8b5291ecb1c0e3e Mon Sep 17 00:00:00 2001 From: Andrew Fontaine Date: Wed, 26 Jan 2022 22:10:49 -0500 Subject: Add custom sudo command support This is useful for nodes that utilize `doas` instead of `sudo`. --- src/cli.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/cli.rs') 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, + /// 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, } /// 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)?; -- cgit v1.2.3