Skip to content

Commit

Permalink
fix: avoid overriding vcs user name (#374)
Browse files Browse the repository at this point in the history
  • Loading branch information
morgante authored Jun 18, 2024
1 parent 675d2ed commit b012f71
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions crates/cli/src/workflows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,10 @@ where
})?;

if let Some(username) = auth.get_user_name()? {
arg.input
.insert(GRIT_VCS_USER_NAME.to_string(), username.into());
if !arg.input.contains_key(GRIT_VCS_USER_NAME) {
arg.input
.insert(GRIT_VCS_USER_NAME.to_string(), username.into());
}
}

let runner_path = updater
Expand Down Expand Up @@ -231,7 +233,9 @@ pub async fn run_remote_workflow(
let mut input = args.get_payload()?;

if let Some(username) = auth.get_user_name()? {
input.insert(GRIT_VCS_USER_NAME.to_string(), username.into());
if !input.contains_key(GRIT_VCS_USER_NAME) {
input.insert(GRIT_VCS_USER_NAME.to_string(), username.into());
}
}

let settings =
Expand Down

0 comments on commit b012f71

Please sign in to comment.