diff --git a/git-clone/main.tf b/git-clone/main.tf index 90d5428..c1e65cf 100644 --- a/git-clone/main.tf +++ b/git-clone/main.tf @@ -14,9 +14,9 @@ variable "url" { type = string } -variable "path" { +variable "base_dir" { default = "" - description = "The path to clone the repository. Defaults to \"$HOME/\"." + description = "The base directory to clone the repository. Defaults to \"$HOME\"." type = string } @@ -26,7 +26,7 @@ variable "agent_id" { } locals { - clone_path = var.path != "" ? join("/", [var.path, replace(basename(var.url), ".git", "")]) : join("/", ["~", replace(basename(var.url), ".git", "")]) + clone_path = var.base_dir != "" ? join("/", [var.base_dir, replace(basename(var.url), ".git", "")]) : join("/", ["~", replace(basename(var.url), ".git", "")]) } output "repo_dir" {