Commit 3988a3a
Improve rvm/nvm support with robust error handling
Enhanced the ci-switch-config script based on code review feedback:
**Error Handling & Validation:**
- Add comprehensive error checking for rvm/nvm commands with helpful messages
- Detect and fail early when only rvm or only nvm is installed
- Guide users to source shell configs or install missing managers
- Make rvm version check more flexible (handles with/without ruby- prefix)
**nvm Installation Detection:**
- Support multiple common nvm locations (standard, Homebrew, XDG config)
- Try ~/.nvm, /opt/homebrew/opt/nvm, and ~/.config/nvm
- Provide clear error messages showing which locations were tried
**Documentation:**
- Update SWITCHING_CI_CONFIGS.md with complete rvm+nvm installation guide
- Add troubleshooting sections for each version manager
- Include verification commands for all supported managers
- Add note clarifying asdf sourcing only affects script's subshell
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent 8eceea6 commit 3988a3a
2 files changed
+118
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
57 | 63 | | |
58 | 64 | | |
59 | | - | |
| 65 | + | |
60 | 66 | | |
61 | 67 | | |
62 | 68 | | |
63 | 69 | | |
64 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
65 | 77 | | |
66 | 78 | | |
67 | 79 | | |
68 | 80 | | |
69 | | - | |
| 81 | + | |
70 | 82 | | |
71 | 83 | | |
72 | 84 | | |
73 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
74 | 100 | | |
75 | 101 | | |
76 | 102 | | |
| |||
107 | 133 | | |
108 | 134 | | |
109 | 135 | | |
110 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
111 | 139 | | |
112 | 140 | | |
113 | 141 | | |
| |||
137 | 165 | | |
138 | 166 | | |
139 | 167 | | |
140 | | - | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
141 | 171 | | |
142 | 172 | | |
143 | 173 | | |
| |||
243 | 273 | | |
244 | 274 | | |
245 | 275 | | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
246 | 292 | | |
247 | 293 | | |
248 | 294 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
| 68 | + | |
68 | 69 | | |
69 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
70 | 75 | | |
71 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
72 | 90 | | |
73 | 91 | | |
74 | 92 | | |
| |||
83 | 101 | | |
84 | 102 | | |
85 | 103 | | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
90 | 125 | | |
91 | | - | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
92 | 129 | | |
93 | | - | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
94 | 134 | | |
95 | | - | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
96 | 150 | | |
97 | 151 | | |
98 | 152 | | |
| |||
218 | 272 | | |
219 | 273 | | |
220 | 274 | | |
| 275 | + | |
221 | 276 | | |
222 | 277 | | |
223 | 278 | | |
| |||
325 | 380 | | |
326 | 381 | | |
327 | 382 | | |
| 383 | + | |
328 | 384 | | |
329 | 385 | | |
330 | 386 | | |
| |||
0 commit comments