Fix default git values
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
6d28bb447f
commit
4a29221bf9
@ -131,7 +131,7 @@ data "coder_parameter" "git_user_name" {
|
||||
name = "git_user_name"
|
||||
display_name = "Git user.name"
|
||||
description = "Name used for git commits"
|
||||
default = data.coder_workspace.me.owner
|
||||
{# default = data.coder_workspace.me.owner #}
|
||||
type = "string"
|
||||
icon = "https://s3.mcmaster.io/images/programmer.png"
|
||||
mutable = true
|
||||
@ -141,7 +141,7 @@ data "coder_parameter" "git_email" {
|
||||
name = "git_email"
|
||||
display_name = "Git user.email"
|
||||
description = "Email used for git commits"
|
||||
default = data.coder_workspace.me.owner_email
|
||||
{# default = data.coder_workspace.me.owner_email #}
|
||||
type = "string"
|
||||
icon = "https://s3.mcmaster.io/images/email.png"
|
||||
mutable = true
|
||||
@ -182,8 +182,8 @@ resource "coder_agent" "main" {
|
||||
[ ! -f ~/.profile ] && [ -f /etc/skel/.profile ] && cp /etc/skel/.profile $HOME
|
||||
[ ! -f ~/.bashrc ] && [ -f /etc/skel/.bashrc ] && cp /etc/skel/.bashrc $HOME
|
||||
|
||||
git config --global user.name "${data.coder_parameter.git_user_name.value}"
|
||||
git config --global user.email "${data.coder_parameter.git_email.value}"
|
||||
git config --global user.name "${data.coder_parameter.git_user_name.value == "" ? data.coder_workspace.me.owner : data.coder_parameter.git_user_name.value}"
|
||||
git config --global user.email "${data.coder_parameter.git_email.value == "" ? data.coder_workspace.me.owner_email : data.coder_parameter.git_email.value}"
|
||||
{% endblock %}
|
||||
|
||||
{% block post_startup_script_setup_home %}
|
||||
|
||||
Reference in New Issue
Block a user