don't know how to build these paths: /nix/store/kpl6ra7q3bwxaxdqqk3ri07yk0n95gdb-treefmt-check.drv warning: ignoring the client-specified setting 'store', because it is a restricted setting and you are not a trusted user building '/nix/store/zapk51figdhrycl8zq1hdvynr1yhg4w3-sizelint.toml.drv' on nix-store.geninf.io:50051 sizelint.toml> build04: building zapk51figdhrycl8zq1hdvynr1yhg4w3-sizelint.toml.drv building '/nix/store/dv93yp2pbfs23vq1vgcxq078s7vci0j4-statix.toml.drv' on nix-store.geninf.io:50051 statix.toml> build04: building dv93yp2pbfs23vq1vgcxq078s7vci0j4-statix.toml.drv statix.toml> structuredAttrs is enabled sizelint.toml> structuredAttrs is enabled building '/nix/store/71l7alvn16by3a9ir0rd2mpakn2pv5hv-statix-config.drv' on nix-store.geninf.io:50051 statix-config> build04: building 71l7alvn16by3a9ir0rd2mpakn2pv5hv-statix-config.drv building '/nix/store/x5iwshxmrcn70y6hb3yqyzdhckkblaj4-mdformat-wrapped.drv' on nix-store.geninf.io:50051 mdformat-wrapped> build04: building x5iwshxmrcn70y6hb3yqyzdhckkblaj4-mdformat-wrapped.drv building '/nix/store/y9ahyw3psnf1f5h7sk3zx1wf8x97by9s-statix-fix.drv' on nix-store.geninf.io:50051 statix-fix> build04: building y9ahyw3psnf1f5h7sk3zx1wf8x97by9s-statix-fix.drv building '/nix/store/gvq3nzvphqzrf2ds4bx0nsaiswa1a43g-treefmt.toml.drv' on nix-store.geninf.io:50051 treefmt.toml> build04: building gvq3nzvphqzrf2ds4bx0nsaiswa1a43g-treefmt.toml.drv treefmt.toml> structuredAttrs is enabled building '/nix/store/79rdfgpgma6rvqsb820ay9fclqj58542-treefmt.drv' on nix-store.geninf.io:50051 treefmt> build04: building 79rdfgpgma6rvqsb820ay9fclqj58542-treefmt.drv building '/nix/store/kpl6ra7q3bwxaxdqqk3ri07yk0n95gdb-treefmt-check.drv' on nix-store.geninf.io:50051 treefmt-check> build04: building kpl6ra7q3bwxaxdqqk3ri07yk0n95gdb-treefmt-check.drv treefmt-check> treefmt v2.5.0traversed 204 files treefmt-check> emitted 159 files for processing treefmt-check> formatted 159 files (1 changed) in 3.389s treefmt-check> M nix/packages/update-go-modules/update-go-modules.sh treefmt-check> diff --git a/nix/packages/update-go-modules/update-go-modules.sh b/nix/packages/update-go-modules/update-go-modules.sh treefmt-check> index 6f88c09..146e90c 100755 treefmt-check> --- a/nix/packages/update-go-modules/update-go-modules.sh treefmt-check> +++ b/nix/packages/update-go-modules/update-go-modules.sh treefmt-check> @@ -22,198 +22,198 @@ YELLOW='\033[1;33m' treefmt-check> NC='\033[0m' # No Color treefmt-check> treefmt-check> log() { treefmt-check> - echo -e "${GREEN}[$(date +'%Y-%m-%d %H:%M:%S')]${NC} $*" treefmt-check> + echo -e "${GREEN}[$(date +'%Y-%m-%d %H:%M:%S')]${NC} $*" treefmt-check> } treefmt-check> treefmt-check> error() { treefmt-check> - echo -e "${RED}[ERROR]${NC} $*" >&2 treefmt-check> + echo -e "${RED}[ERROR]${NC} $*" >&2 treefmt-check> } treefmt-check> treefmt-check> warning() { treefmt-check> - echo -e "${YELLOW}[WARNING]${NC} $*" treefmt-check> + echo -e "${YELLOW}[WARNING]${NC} $*" treefmt-check> } treefmt-check> treefmt-check> # Validate required environment variables treefmt-check> validate_env() { treefmt-check> - local missing=() treefmt-check> + local missing=() treefmt-check> treefmt-check> - if [[ -z ${GITEA_TOKEN:-} ]]; then treefmt-check> - missing+=("GITEA_TOKEN") treefmt-check> - fi treefmt-check> + if [[ -z ${GITEA_TOKEN:-} ]]; then treefmt-check> + missing+=("GITEA_TOKEN") treefmt-check> + fi treefmt-check> treefmt-check> - if [[ -z ${GITEA_URL:-} ]]; then treefmt-check> - missing+=("GITEA_URL") treefmt-check> - fi treefmt-check> + if [[ -z ${GITEA_URL:-} ]]; then treefmt-check> + missing+=("GITEA_URL") treefmt-check> + fi treefmt-check> treefmt-check> - if [[ -z ${REPO_OWNER:-} ]]; then treefmt-check> - missing+=("REPO_OWNER") treefmt-check> - fi treefmt-check> + if [[ -z ${REPO_OWNER:-} ]]; then treefmt-check> + missing+=("REPO_OWNER") treefmt-check> + fi treefmt-check> treefmt-check> - if [[ -z ${REPO_NAME:-} ]]; then treefmt-check> - missing+=("REPO_NAME") treefmt-check> - fi treefmt-check> + if [[ -z ${REPO_NAME:-} ]]; then treefmt-check> + missing+=("REPO_NAME") treefmt-check> + fi treefmt-check> treefmt-check> - if [[ ${#missing[@]} -gt 0 ]]; then treefmt-check> - error "Missing required environment variables: ${missing[*]}" treefmt-check> - error "Please set these variables before running the script" treefmt-check> - exit 1 treefmt-check> - fi treefmt-check> + if [[ ${#missing[@]} -gt 0 ]]; then treefmt-check> + error "Missing required environment variables: ${missing[*]}" treefmt-check> + error "Please set these variables before running the script" treefmt-check> + exit 1 treefmt-check> + fi treefmt-check> } treefmt-check> treefmt-check> # Clean up worktrees on exit treefmt-check> cleanup() { treefmt-check> - if [[ -d $WORKTREE_BASE ]]; then treefmt-check> - log "Cleaning up worktrees..." treefmt-check> - find "$WORKTREE_BASE" -mindepth 1 -maxdepth 1 -type d | while read -r worktree; do treefmt-check> - git worktree remove --force "$worktree" 2>/dev/null || true treefmt-check> - done treefmt-check> - rm -rf "$WORKTREE_BASE" treefmt-check> - fi treefmt-check> + if [[ -d $WORKTREE_BASE ]]; then treefmt-check> + log "Cleaning up worktrees..." treefmt-check> + find "$WORKTREE_BASE" -mindepth 1 -maxdepth 1 -type d | while read -r worktree; do treefmt-check> + git worktree remove --force "$worktree" 2>/dev/null || true treefmt-check> + done treefmt-check> + rm -rf "$WORKTREE_BASE" treefmt-check> + fi treefmt-check> } treefmt-check> treefmt-check> trap cleanup EXIT treefmt-check> treefmt-check> # Find all Go modules in the repository treefmt-check> find_go_modules() { treefmt-check> - find "$REPO_ROOT" -name "go.mod" -type f | while read -r mod_file; do treefmt-check> - dirname "$mod_file" treefmt-check> - done treefmt-check> + find "$REPO_ROOT" -name "go.mod" -type f | while read -r mod_file; do treefmt-check> + dirname "$mod_file" treefmt-check> + done treefmt-check> } treefmt-check> treefmt-check> # Get list of outdated dependencies for a module treefmt-check> get_outdated_dependencies() { treefmt-check> - local module_dir="$1" treefmt-check> + local module_dir="$1" treefmt-check> treefmt-check> - cd "$module_dir" treefmt-check> + cd "$module_dir" treefmt-check> treefmt-check> - # Get list of all direct dependencies and their available updates treefmt-check> - go list -u -f '{{if (and (not (or .Main .Indirect)) .Update)}}{{.Path}}|{{.Version}}|{{.Update.Version}}{{end}}' -m all 2>/dev/null | grep -v '^$' || true treefmt-check> + # Get list of all direct dependencies and their available updates treefmt-check> + go list -u -f '{{if (and (not (or .Main .Indirect)) .Update)}}{{.Path}}|{{.Version}}|{{.Update.Version}}{{end}}' -m all 2>/dev/null | grep -v '^$' || true treefmt-check> } treefmt-check> treefmt-check> # Create pull request using curl API treefmt-check> create_pull_request() { treefmt-check> - local branch_name="$1" treefmt-check> - local pr_title="$2" treefmt-check> - local pr_body="$3" treefmt-check> + local branch_name="$1" treefmt-check> + local pr_title="$2" treefmt-check> + local pr_body="$3" treefmt-check> treefmt-check> - log "Creating pull request for branch: $branch_name" treefmt-check> + log "Creating pull request for branch: $branch_name" treefmt-check> treefmt-check> - # Push the branch treefmt-check> - git push origin "+HEAD:${branch_name}" treefmt-check> + # Push the branch treefmt-check> + git push origin "+HEAD:${branch_name}" treefmt-check> treefmt-check> - # Create PR using curl treefmt-check> - local resp treefmt-check> - resp=$(curl -s -X POST \ treefmt-check> - -H "Authorization: token $GITEA_TOKEN" \ treefmt-check> - -H "Content-Type: application/json" \ treefmt-check> - -d "{ treefmt-check> + # Create PR using curl treefmt-check> + local resp treefmt-check> + resp=$(curl -s -X POST \ treefmt-check> + -H "Authorization: token $GITEA_TOKEN" \ treefmt-check> + -H "Content-Type: application/json" \ treefmt-check> + -d "{ treefmt-check> \"head\": \"${branch_name}\", treefmt-check> \"base\": \"${BASE_BRANCH}\", treefmt-check> \"title\": \"${pr_title}\", treefmt-check> \"body\": \"${pr_body}\" treefmt-check> }" \ treefmt-check> - "${GITEA_URL}/api/v1/repos/${REPO_OWNER}/${REPO_NAME}/pulls") treefmt-check> + "${GITEA_URL}/api/v1/repos/${REPO_OWNER}/${REPO_NAME}/pulls") treefmt-check> treefmt-check> - local pr_number treefmt-check> - pr_number=$(echo "$resp" | jq -r '.number') treefmt-check> + local pr_number treefmt-check> + pr_number=$(echo "$resp" | jq -r '.number') treefmt-check> treefmt-check> - # Check if PR already exists treefmt-check> - local error_msg treefmt-check> - error_msg=$(echo "$resp" | jq -r '.message // empty') treefmt-check> + # Check if PR already exists treefmt-check> + local error_msg treefmt-check> + error_msg=$(echo "$resp" | jq -r '.message // empty') treefmt-check> treefmt-check> - if [[ $error_msg == *"pull request already exists"* ]]; then treefmt-check> - log "Pull request already exists for branch: $branch_name" treefmt-check> - return 0 treefmt-check> - fi treefmt-check> + if [[ $error_msg == *"pull request already exists"* ]]; then treefmt-check> + log "Pull request already exists for branch: $branch_name" treefmt-check> + return 0 treefmt-check> + fi treefmt-check> treefmt-check> - if [[ $pr_number == "null" ]]; then treefmt-check> - error "Error creating pull request:" treefmt-check> - echo "$resp" | jq . >&2 treefmt-check> - return 1 treefmt-check> - fi treefmt-check> + if [[ $pr_number == "null" ]]; then treefmt-check> + error "Error creating pull request:" treefmt-check> + echo "$resp" | jq . >&2 treefmt-check> + return 1 treefmt-check> + fi treefmt-check> treefmt-check> - local pr_url="${GITEA_URL}/${REPO_OWNER}/${REPO_NAME}/pulls/${pr_number}" treefmt-check> - log "Created pull request #$pr_number: $pr_url" treefmt-check> + local pr_url="${GITEA_URL}/${REPO_OWNER}/${REPO_NAME}/pulls/${pr_number}" treefmt-check> + log "Created pull request #$pr_number: $pr_url" treefmt-check> treefmt-check> - # Enable auto-merge for the newly created PR treefmt-check> - enable_auto_merge "$pr_number" treefmt-check> + # Enable auto-merge for the newly created PR treefmt-check> + enable_auto_merge "$pr_number" treefmt-check> } treefmt-check> treefmt-check> # Enable auto-merge for a pull request treefmt-check> enable_auto_merge() { treefmt-check> - local pr_number="$1" treefmt-check> + local pr_number="$1" treefmt-check> treefmt-check> - log "Enabling auto-merge for PR #$pr_number" treefmt-check> + log "Enabling auto-merge for PR #$pr_number" treefmt-check> treefmt-check> - # Merge when checks succeed treefmt-check> - while true; do treefmt-check> - local resp treefmt-check> - resp=$(curl -s -X POST \ treefmt-check> - -H "Authorization: token $GITEA_TOKEN" \ treefmt-check> - -H "Content-Type: application/json" \ treefmt-check> - -d '{ treefmt-check> + # Merge when checks succeed treefmt-check> + while true; do treefmt-check> + local resp treefmt-check> + resp=$(curl -s -X POST \ treefmt-check> + -H "Authorization: token $GITEA_TOKEN" \ treefmt-check> + -H "Content-Type: application/json" \ treefmt-check> + -d '{ treefmt-check> "Do": "merge", treefmt-check> "merge_when_checks_succeed": true, treefmt-check> "delete_branch_after_merge": true treefmt-check> }' \ treefmt-check> - "${GITEA_URL}/api/v1/repos/${REPO_OWNER}/${REPO_NAME}/pulls/$pr_number/merge") treefmt-check> - treefmt-check> - local msg treefmt-check> - msg=$(echo "$resp" | jq -r '.message') treefmt-check> - if [[ $msg != "Please try again later" ]]; then treefmt-check> - break treefmt-check> - fi treefmt-check> - log "Retrying auto-merge in 2 seconds..." treefmt-check> - sleep 2 treefmt-check> - done treefmt-check> - treefmt-check> - log "Pull request #$pr_number merge initiated" treefmt-check> + "${GITEA_URL}/api/v1/repos/${REPO_OWNER}/${REPO_NAME}/pulls/$pr_number/merge") treefmt-check> + treefmt-check> + local msg treefmt-check> + msg=$(echo "$resp" | jq -r '.message') treefmt-check> + if [[ $msg != "Please try again later" ]]; then treefmt-check> + break treefmt-check> + fi treefmt-check> + log "Retrying auto-merge in 2 seconds..." treefmt-check> + sleep 2 treefmt-check> + done treefmt-check> + treefmt-check> + log "Pull request #$pr_number merge initiated" treefmt-check> } treefmt-check> treefmt-check> # Update a single dependency treefmt-check> update_single_dependency() { treefmt-check> - local module_dir="$1" treefmt-check> - local dep_path="$2" treefmt-check> - local current_version="$3" treefmt-check> - local new_version="$4" treefmt-check> - local module_name="$5" treefmt-check> - treefmt-check> - # Create safe branch name (replace special characters) treefmt-check> - local safe_dep_name="${dep_path//\//-}" treefmt-check> - safe_dep_name="${safe_dep_name//./-}" treefmt-check> - local branch_name treefmt-check> - branch_name="update-go-dep-${safe_dep_name}-${new_version}" treefmt-check> - local worktree_dir="$WORKTREE_BASE/$branch_name" treefmt-check> - treefmt-check> - log "Updating $dep_path from $current_version to $new_version" treefmt-check> - treefmt-check> - # Create worktree treefmt-check> - mkdir -p "$WORKTREE_BASE" treefmt-check> - git worktree add -b "$branch_name" "$worktree_dir" "$BASE_BRANCH" treefmt-check> - treefmt-check> - # Change to module directory in worktree treefmt-check> - # module_dir is an absolute path - make it relative to repo root treefmt-check> - local relative_module_dir="${module_dir#"$REPO_ROOT"}" treefmt-check> - relative_module_dir="${relative_module_dir#/}" # Remove leading slash if present treefmt-check> - cd "$worktree_dir/${relative_module_dir:-.}" # Default to . if at repo root treefmt-check> - treefmt-check> - # Update specific dependency treefmt-check> - log "Updating dependency $dep_path to $new_version..." treefmt-check> - go get "${dep_path}@${new_version}" treefmt-check> - go mod tidy treefmt-check> - treefmt-check> - # Check if there are any changes treefmt-check> - if ! git diff --quiet; then treefmt-check> - # Update vendor hash if needed treefmt-check> - nix run .#data-mesher.update-vendor-hash -- "$worktree_dir" treefmt-check> - treefmt-check> - # Commit changes treefmt-check> - git add -A treefmt-check> - git commit -m "fix(deps): update module $dep_path to $new_version" treefmt-check> - treefmt-check> - # Create pull request treefmt-check> - local pr_title="fix(deps): update module $dep_path to $new_version" treefmt-check> - local pr_body="## Automated Go Dependency Update treefmt-check> + local module_dir="$1" treefmt-check> + local dep_path="$2" treefmt-check> + local current_version="$3" treefmt-check> + local new_version="$4" treefmt-check> + local module_name="$5" treefmt-check> + treefmt-check> + # Create safe branch name (replace special characters) treefmt-check> + local safe_dep_name="${dep_path//\//-}" treefmt-check> + safe_dep_name="${safe_dep_name//./-}" treefmt-check> + local branch_name treefmt-check> + branch_name="update-go-dep-${safe_dep_name}-${new_version}" treefmt-check> + local worktree_dir="$WORKTREE_BASE/$branch_name" treefmt-check> + treefmt-check> + log "Updating $dep_path from $current_version to $new_version" treefmt-check> + treefmt-check> + # Create worktree treefmt-check> + mkdir -p "$WORKTREE_BASE" treefmt-check> + git worktree add -b "$branch_name" "$worktree_dir" "$BASE_BRANCH" treefmt-check> + treefmt-check> + # Change to module directory in worktree treefmt-check> + # module_dir is an absolute path - make it relative to repo root treefmt-check> + local relative_module_dir="${module_dir#"$REPO_ROOT"}" treefmt-check> + relative_module_dir="${relative_module_dir#/}" # Remove leading slash if present treefmt-check> + cd "$worktree_dir/${relative_module_dir:-.}" # Default to . if at repo root treefmt-check> + treefmt-check> + # Update specific dependency treefmt-check> + log "Updating dependency $dep_path to $new_version..." treefmt-check> + go get "${dep_path}@${new_version}" treefmt-check> + go mod tidy treefmt-check> + treefmt-check> + # Check if there are any changes treefmt-check> + if ! git diff --quiet; then treefmt-check> + # Update vendor hash if needed treefmt-check> + nix run .#data-mesher.update-vendor-hash -- "$worktree_dir" treefmt-check> + treefmt-check> + # Commit changes treefmt-check> + git add -A treefmt-check> + git commit -m "fix(deps): update module $dep_path to $new_version" treefmt-check> + treefmt-check> + # Create pull request treefmt-check> + local pr_title="fix(deps): update module $dep_path to $new_version" treefmt-check> + local pr_body="## Automated Go Dependency Update treefmt-check> treefmt-check> This pull request updates a single Go dependency for the module \`$module_name\`: treefmt-check> treefmt-check> @@ -227,86 +227,86 @@ https://pkg.go.dev/$dep_path?tab=versions treefmt-check> treefmt-check> This is an automated update generated by the update-go-modules script." treefmt-check> treefmt-check> - create_pull_request "$branch_name" "$pr_title" "$pr_body" treefmt-check> + create_pull_request "$branch_name" "$pr_title" "$pr_body" treefmt-check> treefmt-check> - log "Successfully processed $dep_path update" treefmt-check> - else treefmt-check> - log "No changes detected for $dep_path update" treefmt-check> - fi treefmt-check> + log "Successfully processed $dep_path update" treefmt-check> + else treefmt-check> + log "No changes detected for $dep_path update" treefmt-check> + fi treefmt-check> treefmt-check> - # Clean up worktree treefmt-check> - cd "$REPO_ROOT" treefmt-check> - git worktree remove --force "$worktree_dir" treefmt-check> + # Clean up worktree treefmt-check> + cd "$REPO_ROOT" treefmt-check> + git worktree remove --force "$worktree_dir" treefmt-check> } treefmt-check> treefmt-check> # Process a single Go module treefmt-check> process_go_module() { treefmt-check> - local module_dir="$1" treefmt-check> - local module_name treefmt-check> - module_name=$(cd "$module_dir" && go list -m) treefmt-check> - treefmt-check> - log "Processing Go module: $module_name in $module_dir" treefmt-check> - treefmt-check> - # Get outdated dependencies treefmt-check> - local outdated_deps treefmt-check> - outdated_deps=$(get_outdated_dependencies "$module_dir") treefmt-check> - treefmt-check> - if [[ -z $outdated_deps ]]; then treefmt-check> - log "No outdated dependencies found for $module_name" treefmt-check> - return treefmt-check> - fi treefmt-check> - treefmt-check> - # Count dependencies treefmt-check> - local dep_count treefmt-check> - dep_count=$(echo "$outdated_deps" | wc -l) treefmt-check> - log "Found $dep_count outdated dependencies for $module_name" treefmt-check> - treefmt-check> - # Process each outdated dependency treefmt-check> - while IFS='|' read -r dep_path current_version new_version; do treefmt-check> - if [[ -n $dep_path ]]; then treefmt-check> - update_single_dependency "$module_dir" "$dep_path" "$current_version" "$new_version" "$module_name" treefmt-check> - treefmt-check> - # Add a small delay between PRs to avoid overwhelming the API treefmt-check> - sleep 2 treefmt-check> - fi treefmt-check> - done <<<"$outdated_deps" treefmt-check> + local module_dir="$1" treefmt-check> + local module_name treefmt-check> + module_name=$(cd "$module_dir" && go list -m) treefmt-check> + treefmt-check> + log "Processing Go module: $module_name in $module_dir" treefmt-check> + treefmt-check> + # Get outdated dependencies treefmt-check> + local outdated_deps treefmt-check> + outdated_deps=$(get_outdated_dependencies "$module_dir") treefmt-check> + treefmt-check> + if [[ -z $outdated_deps ]]; then treefmt-check> + log "No outdated dependencies found for $module_name" treefmt-check> + return treefmt-check> + fi treefmt-check> + treefmt-check> + # Count dependencies treefmt-check> + local dep_count treefmt-check> + dep_count=$(echo "$outdated_deps" | wc -l) treefmt-check> + log "Found $dep_count outdated dependencies for $module_name" treefmt-check> + treefmt-check> + # Process each outdated dependency treefmt-check> + while IFS='|' read -r dep_path current_version new_version; do treefmt-check> + if [[ -n $dep_path ]]; then treefmt-check> + update_single_dependency "$module_dir" "$dep_path" "$current_version" "$new_version" "$module_name" treefmt-check> + treefmt-check> + # Add a small delay between PRs to avoid overwhelming the API treefmt-check> + sleep 2 treefmt-check> + fi treefmt-check> + done <<<"$outdated_deps" treefmt-check> } treefmt-check> treefmt-check> # Main execution treefmt-check> main() { treefmt-check> - log "Starting Go module update process" treefmt-check> + log "Starting Go module update process" treefmt-check> treefmt-check> - # Validate environment treefmt-check> - validate_env treefmt-check> + # Validate environment treefmt-check> + validate_env treefmt-check> treefmt-check> - # Ensure we're in a git repository treefmt-check> - if ! git rev-parse --git-dir >/dev/null 2>&1; then treefmt-check> - error "Not in a git repository" treefmt-check> - exit 1 treefmt-check> - fi treefmt-check> + # Ensure we're in a git repository treefmt-check> + if ! git rev-parse --git-dir >/dev/null 2>&1; then treefmt-check> + error "Not in a git repository" treefmt-check> + exit 1 treefmt-check> + fi treefmt-check> treefmt-check> - # Fetch latest changes treefmt-check> - git fetch origin treefmt-check> + # Fetch latest changes treefmt-check> + git fetch origin treefmt-check> treefmt-check> - # Find and process all Go modules treefmt-check> - local modules=() treefmt-check> - while IFS= read -r module; do treefmt-check> - modules+=("$module") treefmt-check> - done < <(find_go_modules) treefmt-check> + # Find and process all Go modules treefmt-check> + local modules=() treefmt-check> + while IFS= read -r module; do treefmt-check> + modules+=("$module") treefmt-check> + done < <(find_go_modules) treefmt-check> treefmt-check> - if [[ ${#modules[@]} -eq 0 ]]; then treefmt-check> - warning "No Go modules found in the repository" treefmt-check> - exit 0 treefmt-check> - fi treefmt-check> + if [[ ${#modules[@]} -eq 0 ]]; then treefmt-check> + warning "No Go modules found in the repository" treefmt-check> + exit 0 treefmt-check> + fi treefmt-check> treefmt-check> - log "Found ${#modules[@]} Go module(s)" treefmt-check> + log "Found ${#modules[@]} Go module(s)" treefmt-check> treefmt-check> - # Process each module treefmt-check> - for module in "${modules[@]}"; do treefmt-check> - process_go_module "$module" treefmt-check> - done treefmt-check> + # Process each module treefmt-check> + for module in "${modules[@]}"; do treefmt-check> + process_go_module "$module" treefmt-check> + done treefmt-check> treefmt-check> - log "Go module update process completed" treefmt-check> + log "Go module update process completed" treefmt-check> } treefmt-check> treefmt-check> # Run main function error: Cannot build '/nix/store/kpl6ra7q3bwxaxdqqk3ri07yk0n95gdb-treefmt-check.drv'. Reason: builder failed with exit code 1. Output paths: /nix/store/fz8p9ffg827s0i5dcagv0lim4giypfca-treefmt-check Last 25 log lines: > - warning "No Go modules found in the repository" > - exit 0 > - fi > + if [[ ${#modules[@]} -eq 0 ]]; then > + warning "No Go modules found in the repository" > + exit 0 > + fi > > - log "Found ${#modules[@]} Go module(s)" > + log "Found ${#modules[@]} Go module(s)" > > - # Process each module > - for module in "${modules[@]}"; do > - process_go_module "$module" > - done > + # Process each module > + for module in "${modules[@]}"; do > + process_go_module "$module" > + done > > - log "Go module update process completed" > + log "Go module update process completed" > } > > # Run main function For full logs, run: nix log /nix/store/kpl6ra7q3bwxaxdqqk3ri07yk0n95gdb-treefmt-check.drv