feat: enable basename of url to be added to custom path (git-clone) (#124)
This commit is contained in:
committed by
GitHub
parent
b968a2aa22
commit
38a2d86376
@@ -28,7 +28,7 @@ variable "agent_id" {
|
|||||||
resource "coder_script" "git_clone" {
|
resource "coder_script" "git_clone" {
|
||||||
agent_id = var.agent_id
|
agent_id = var.agent_id
|
||||||
script = templatefile("${path.module}/run.sh", {
|
script = templatefile("${path.module}/run.sh", {
|
||||||
CLONE_PATH : var.path != "" ? var.path : join("/", ["~", basename(var.url)]),
|
CLONE_PATH = var.path != "" ? join("/", [var.path, replace(basename(var.url), ".git", "")]) : join("/", ["~", replace(basename(var.url), ".git", "")])
|
||||||
REPO_URL : var.url,
|
REPO_URL : var.url,
|
||||||
})
|
})
|
||||||
display_name = "Git Clone"
|
display_name = "Git Clone"
|
||||||
|
|||||||
Reference in New Issue
Block a user