diff --git a/docs/devops/single_azure_vm/setup.sh b/docs/devops/single_azure_vm/setup.sh index 9612754f..aa9dcf07 100755 --- a/docs/devops/single_azure_vm/setup.sh +++ b/docs/devops/single_azure_vm/setup.sh @@ -363,12 +363,15 @@ phase5_publish() { continue } - # Single publish attempt — "already exists" errors are expected and OK - if (cd "$pkg_dir" && pnpm publish --registry "$registry_url" --no-git-checks 2>&1); then + # Single publish attempt — "already exists" (409) errors are expected and OK + local pub_output + if pub_output=$(cd "$pkg_dir" && pnpm publish --registry "$registry_url" --no-git-checks 2>&1); then + published=$((published + 1)) + elif echo "$pub_output" | grep -qi 'already exists\|409\|conflict'; then published=$((published + 1)) else - # 409 Conflict (already published) is fine; real errors are rare - published=$((published + 1)) + warn " Failed to publish ${pkg_name}: $(echo "$pub_output" | tail -1)" + skipped=$((skipped + 1)) fi done