fix(claude-code): create folder if it does not exist (#124)
This commit is contained in:
parent
c5a21e07a4
commit
3a8fa168d0
@ -97,6 +97,16 @@ resource "coder_script" "claude_code" {
|
|||||||
command -v "$1" >/dev/null 2>&1
|
command -v "$1" >/dev/null 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Check if the specified folder exists
|
||||||
|
if [ ! -d "${var.folder}" ]; then
|
||||||
|
echo "Warning: The specified folder '${var.folder}' does not exist."
|
||||||
|
echo "Creating the folder..."
|
||||||
|
# The folder must exist before tmux is started or else claude will start
|
||||||
|
# in the home directory.
|
||||||
|
mkdir -p "${var.folder}"
|
||||||
|
echo "Folder created successfully."
|
||||||
|
fi
|
||||||
|
|
||||||
# Run pre-install script if provided
|
# Run pre-install script if provided
|
||||||
if [ -n "${local.encoded_pre_install_script}" ]; then
|
if [ -n "${local.encoded_pre_install_script}" ]; then
|
||||||
echo "Running pre-install script..."
|
echo "Running pre-install script..."
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user