-
Notifications
You must be signed in to change notification settings - Fork 1
Fix error when installing vendor dir directly to build #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThis PR updates documentation guidance in the README to reference Agentic Commerce and adds a feature flag instruction, while modifying the production build script to install dependencies to a temporary directory before relocating them to the final build output. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes
Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Alright, the zip here looks good https://github.com/woocommerce/OpenAI-Product-Feed/actions/runs/18968180054 The current build on trunk https://github.com/woocommerce/OpenAI-Product-Feed/actions/runs/18967626322 is giving fatal error. I think that's because the relative path when installing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
bin/build-prod-zip.sh (1)
29-30: Add cleanup trap for temporary vendor_prod directory on error.If the build script exits unexpectedly (e.g., move fails at line 30), the temporary
./vendor_proddirectory will be left behind. Consider adding an error trap to clean it up.Add a cleanup trap at the top of the script (after
set -e):set -e + +# Cleanup trap to remove temporary vendor directory on script exit/error +trap "rm -rf ./vendor_prod" EXITThis ensures
./vendor_prodis removed whether the script succeeds or fails, keeping the working directory clean.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
README.md(1 hunks)bin/build-prod-zip.sh(1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.18.1)
README.md
23-23: Unordered list indentation
Expected: 0; Actual: 2
(MD007, ul-indent)
🔇 Additional comments (1)
bin/build-prod-zip.sh (1)
29-30: Good fix for decoupling vendor installation from build directory.The change to install dependencies into a temporary
vendor_proddirectory before moving to the final location cleanly resolves the vendor installation issue. This approach avoids potential path/permission problems when installing directly to the final build directory.
|
FYI, I am going to merge this right away @RadoslavGeorgiev |
Description
Testing instructions
Checklist
npm run test:phpdoes not return errors.npm run lint:phpdoes not return errors.Summary by CodeRabbit
Documentation
Chores