Commit d63a431
committed
fix: return null from getShellFromEnv when environment variables are not set
- Modified getShellFromEnv() to return null instead of hardcoded fallback values when COMSPEC (Windows) or SHELL (Unix) environment variables are not set
- This ensures the function accurately reflects whether the shell path was obtained from environment variables
- Updated test comments to clarify the expected behavior with the fix
- All existing tests continue to pass as the fallback logic is handled by getSafeFallbackShell()
Fixes #85781 parent b011b63 commit d63a431
2 files changed
+10
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
| 250 | + | |
| 251 | + | |
250 | 252 | | |
251 | 253 | | |
252 | 254 | | |
| |||
303 | 305 | | |
304 | 306 | | |
305 | 307 | | |
| 308 | + | |
| 309 | + | |
306 | 310 | | |
307 | 311 | | |
308 | 312 | | |
| |||
345 | 349 | | |
346 | 350 | | |
347 | 351 | | |
| 352 | + | |
| 353 | + | |
348 | 354 | | |
349 | 355 | | |
350 | 356 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
272 | | - | |
| 272 | + | |
273 | 273 | | |
274 | 274 | | |
275 | | - | |
276 | | - | |
277 | | - | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
278 | 278 | | |
279 | 279 | | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | 280 | | |
285 | 281 | | |
286 | 282 | | |
| |||
0 commit comments