Skip to content

Commit ac49e6e

Browse files
jasonwbarnettJason BarnettDevelopmentCats
authored
docs(claude-code): document pre_install_script for module dependency ordering (#613)
## Summary Clarifies that the existing `pre_install_script` variable can be used to handle dependencies between modules during workspace startup. ## Problem When using multiple startup modules (e.g., git-clone and claude-code), there's a race condition where scripts execute in parallel. Module dependencies need to be managed, such as ensuring git-clone completes before Claude Code tries to access a workdir. ## Solution The existing `pre_install_script` variable already provides this capability. Updated documentation to clarify this use case. ## Example ```hcl module "claude-code" { source = "registry.coder.com/coder/claude-code/coder" workdir = "/path/to/repo" # Wait for git-clone to complete before starting pre_install_script = <<-EOT #!/bin/bash set -e while [ ! -f /tmp/.git-clone-complete ]; do sleep 1 done EOT } ``` Resolves issue #609. Co-authored-by: Jason Barnett <Jason.Barnett@altana.ai> Co-authored-by: DevCats <christofer@coder.com>
1 parent 63e28c0 commit ac49e6e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • registry/coder/modules/claude-code

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ variable "cli_app_display_name" {
6767

6868
variable "pre_install_script" {
6969
type = string
70-
description = "Custom script to run before installing Claude Code."
70+
description = "Custom script to run before installing Claude Code. Can be used for dependency ordering between modules (e.g., waiting for git-clone to complete before Claude Code initialization)."
7171
default = null
7272
}
7373

0 commit comments

Comments
 (0)