Skip to content

Commit

Permalink
Rename cmd to action
Browse files Browse the repository at this point in the history
  • Loading branch information
lucperkins committed Jul 23, 2024
1 parent e26269e commit 4c450dd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions src/cli/cmd/apply/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,16 @@ impl CommandExecute for ApplySubcommand {
let permissions = script_path_metadata.permissions();
if permissions.mode() & 0o111 != 0 {
match self.system {
System::NixOS(NixOS { ref run, .. }) => {
System::NixOS(NixOS { ref action, .. }) => {
tracing::info!(
"{} {}",
&script_path.display().to_string(),
run.to_string(),
action.to_string(),
);

// switch-to-configuration <action>
let output = tokio::process::Command::new(&script_path)
.args([&run.to_string()])
.args([&action.to_string()])
.output()
.await
.wrap_err("failed to run switch-to-configuration")?;
Expand Down
6 changes: 3 additions & 3 deletions src/cli/cmd/apply/nixos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ pub(super) struct NixOS {
pub(super) output_ref: String,

/// The command to run from the profile's switch-to-configuration script.
/// Takes the form: switch-to-configuration <cmd>.
#[clap(name = "CMD", default_value = "switch")]
pub(super) run: Verb,
/// Takes the form: switch-to-configuration <action>.
#[clap(name = "ACTION", default_value = "switch")]
pub(super) action: Verb,
}

// For available commands, see
Expand Down

0 comments on commit 4c450dd

Please sign in to comment.