Skip to content

Commit 73f990b

Browse files
committed
fix: exit if folder does not exist
1 parent c5a21e0 commit 73f990b

File tree

1 file changed

+7
-0
lines changed
  • registry/coder/modules/claude-code

1 file changed

+7
-0
lines changed

registry/coder/modules/claude-code/main.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,13 @@ resource "coder_script" "claude_code" {
9797
command -v "$1" >/dev/null 2>&1
9898
}
9999
100+
# Check if the specified folder exists
101+
if [ ! -d "${var.folder}" ]; then
102+
echo "Error: The specified folder '${var.folder}' does not exist."
103+
echo "Please ensure the folder exists before running Claude Code."
104+
exit 1
105+
fi
106+
100107
# Run pre-install script if provided
101108
if [ -n "${local.encoded_pre_install_script}" ]; then
102109
echo "Running pre-install script..."

0 commit comments

Comments
 (0)