fix: catch permission errors when copying custom Dockerfile build context (#1808) - #1931
Conversation
…text (#1808) Signed-off-by: zyang-dev <267119621+zyang-dev@users.noreply.github.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughA permission-denied error handler was added to the Docker build context copy operation in Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~7 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
## Summary - Add "Ollama network exposure warning during onboard" troubleshooting entry (from #1877) - Document snapshot restore liveness preflight and clean restore behavior (from #1901) - Update Jetson troubleshooting for BSP R39+ support (from #1910) - Document `--from` Dockerfile permission error handling (from #1931) - Bump doc version switcher through 0.0.17 - Regenerate agent skills from updated docs ## Test plan - [x] `make docs` builds without warnings - [x] All pre-commit hooks pass - [ ] Verify rendered pages in docs build output 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Clarified onboarding error when build context contains unreadable files. * Updated snapshot restore: sandbox must be running; restore cleanly replaces state directories and removes files added after the snapshot. * Added Jetson BSP R39 automatic configuration guidance. * Added Ollama network-exposure security guidance for local provider selection during onboarding. * **Documentation (versions)** * Added docs entry for version 0.0.17 and updated project docs version. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
When
nemoclaw onboard --from Dockerfileis run in a directory with unreadable files (e.g., a user's home directory on WSL with Windows system files), the build context copy crashes with a raw Node.js stack trace. This catches theEACCESerror and shows a clear message telling the user to move the Dockerfile to a dedicated directory.Related Issue
Fixes #1808
Changes
src/lib/onboard.ts: Wrap the build contextfs.cpSynccall in a try/catch. OnEACCES, print an actionable error message and exit instead of crashing with a stack trace.Type of Change
Verification
npx prek run --all-filespassesnpm testpassesmake docsbuilds without warnings (doc changes only)AI Disclosure
Signed-off-by: zyang-dev 267119621+zyang-dev@users.noreply.github.com
Summary by CodeRabbit