fix: correct syntax errors and typos in shell scripts#982
Conversation
- Fix DEBAIN_DATECODE typo to DEBIAN_DATECODE in Dockerfile - Fix malformed brace in bold variable check: "$bold"} -> "$bold" - Fix path comparison logic in file_on_host function - Quote KUBECONFIG variable in helm.sh for safety - Add missing $ prefix to GEODESIC_TF_PROMPT_ENABLED variable
📝 WalkthroughWalkthroughThe changes fix typos, syntax errors, and missing variable references across build configuration and shell initialization scripts. These include correcting a build argument name, fixing shell test syntax, adding variable quoting for robustness, enabling proper variable expansion in conditionals, and modifying path-matching logic in a utility function. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
📝 Coding Plan
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@rootfs/etc/profile.d/_50-workspace.sh`:
- Line 17: The mount-root comparison in the file_on_host check (the conditional
using "${file}" and "${path}") fails when GEODESIC_HOST_PATHS contains trailing
slashes; modify the conditional in file_on_host to normalize or strip trailing
slashes from path before comparison (e.g. use a normalized variable like
normalized_path="${path%/}" and compare "${file}" == "$normalized_path" or
"${file}" == "$normalized_path"*), or alternatively normalize both "${file}" and
"${path}" via parameter expansion before testing so exact mount roots are
correctly recognized (references: file_on_host, variables file and path used in
the conditional).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: be4bf5d9-9b46-4650-9be1-09ab7a5f9aec
📒 Files selected for processing (5)
os/debian/Dockerfile.debianrootfs/etc/profile.d/_10-colors.shrootfs/etc/profile.d/_50-workspace.shrootfs/etc/profile.d/helm.shrootfs/etc/profile.d/prompt.sh
why
what
ARGdefinition by renamingDEBAIN_DATECODEtoDEBIAN_DATECODEinos/debian/Dockerfile.debian.FROMline to use the correctedDEBIAN_DATECODEargument._geodesic_tput_cache_initby fixing the bracket placement inrootfs/etc/profile.d/_10-colors.sh.file_on_hostto correctly compare paths inrootfs/etc/profile.d/_50-workspace.sh.KUBECONFIGin the Helm initialization script inrootfs/etc/profile.d/helm.sh.GEODESIC_TF_PROMPT_ENABLEDingeodesic_promptinrootfs/etc/profile.d/prompt.sh.