Use base64 to preserve newlines

This commit is contained in:
Koury Lape 2026-01-29 14:36:43 -05:00
parent d401399c9f
commit d60546d4c4
No known key found for this signature in database
GPG Key ID: 6D4E8D151FDE8C59

View File

@ -99,10 +99,10 @@ resource "coder_app" "dotfiles" {
icon = "/icon/dotfiles.svg"
order = var.order
group = var.group
command = "/bin/bash -c ${jsonencode(templatefile("${path.module}/run.sh", {
command = "/bin/bash -c \"$(echo ${base64encode(templatefile("${path.module}/run.sh", {
DOTFILES_URI : local.dotfiles_uri,
DOTFILES_USER : local.user
}))}"
}))} | base64 -d)\""
}
output "dotfiles_uri" {