diff --git a/src/agency-agents/devcontainer-feature.json b/src/agency-agents/devcontainer-feature.json index 992d685..5738d13 100644 --- a/src/agency-agents/devcontainer-feature.json +++ b/src/agency-agents/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "agency-agents", - "version": "0.5.0", + "version": "0.5.1", "name": "Agency Agents", "description": "A complete AI agency at your fingertips - From frontend wizards to Reddit community ninjas, from whimsy injectors to reality checkers. Each agent is a specialized expert with personality, processes, and proven deliverables. Credits: https://github.com/msitarzewski/agency-agents.", "documentationURL": "https://github.com/wcgomes/devcontainer-features?tab=readme-ov-file#feature-agency-agents", diff --git a/src/agency-agents/postStartCommand.sh b/src/agency-agents/postStartCommand.sh index cf2aad4..21ce727 100755 --- a/src/agency-agents/postStartCommand.sh +++ b/src/agency-agents/postStartCommand.sh @@ -116,12 +116,21 @@ do_install() { fi if [ "$(id -un)" = "$TARGET_USER" ]; then - cd "$repo_dir" && HOME="$TARGET_HOME" ./scripts/install.sh $install_args + if [ -n "$DIVISIONS" ]; then + OPENCODE_AGENTS_DIR="$opencode_agents_global" \ + cd "$repo_dir" && HOME="$TARGET_HOME" ./scripts/install.sh $install_args + else + cd "$repo_dir" && HOME="$TARGET_HOME" ./scripts/install.sh $install_args + fi else - su - "$TARGET_USER" -c "cd '$repo_dir' && HOME='$TARGET_HOME' ./scripts/install.sh $install_args" + if [ -n "$DIVISIONS" ]; then + su - "$TARGET_USER" -c "OPENCODE_AGENTS_DIR='$opencode_agents_global' cd '$repo_dir' && HOME='$TARGET_HOME' ./scripts/install.sh $install_args" + else + su - "$TARGET_USER" -c "cd '$repo_dir' && HOME='$TARGET_HOME' ./scripts/install.sh $install_args" + fi fi - if should_install_opencode && [ -d "$opencode_agents_src" ]; then + if should_install_opencode && [ -d "$opencode_agents_src" ] && [ -z "$DIVISIONS" ]; then log "Installing OpenCode agents globally to $opencode_agents_global..." mkdir -p "$opencode_agents_global" cp "$opencode_agents_src"/*.md "$opencode_agents_global/" 2>/dev/null || true