Skip to content

Commit

Permalink
fix!: rename args to cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisGorbachev committed Feb 22, 2025
1 parent 40a992e commit cb8c292
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,13 @@ pub struct CreateRustGithubRepo {
project_test_cmd: String,

#[arg(long, help = "Shell command to add new files (supports substitutions - see help below)", default_value = "git add .")]
repo_add_args: String,
repo_add_cmd: String,

#[arg(long, help = "Shell command to make a commit (supports substitutions - see help below)", default_value = "git commit -m \"feat: setup project\"")]
repo_commit_args: String,
repo_commit_cmd: String,

#[arg(long, help = "Shell command to push the commit (supports substitutions - see help below)", default_value = "git push")]
repo_push_args: String,
repo_push_cmd: String,

#[arg(long, help = "Shell command to execute after all other commands (supports substitutions - see help below)")]
after_all_cmd: Option<String>,
Expand Down Expand Up @@ -208,19 +208,19 @@ impl CreateRustGithubRepo {

// add
executor
.exec(replace_all(self.repo_add_args, &substitutions), &dir, stderr)
.exec(replace_all(self.repo_add_cmd, &substitutions), &dir, stderr)
.await
.context("Failed to add files for commit")?;

// commit
executor
.exec(replace_all(self.repo_commit_args, &substitutions), &dir, stderr)
.exec(replace_all(self.repo_commit_cmd, &substitutions), &dir, stderr)
.await
.context("Failed to commit changes")?;

// push
executor
.exec(replace_all(self.repo_push_args, &substitutions), &dir, stderr)
.exec(replace_all(self.repo_push_cmd, &substitutions), &dir, stderr)
.await
.context("Failed to push changes")?;

Expand Down

0 comments on commit cb8c292

Please sign in to comment.