Commit 016037a
Fix ArgumentException warning when JDK path is not a directory
When JI_JAVA_HOME (or another JDK path source) points to a path that
exists but is not a directory, TryGetJdkInfo now checks Directory.Exists
before constructing JdkInfo. Non-directory paths are skipped silently
(logged at Verbose only) instead of generating a Warning in MSBuild output.
Fixes: ArgumentException "Not a directory" spurious warning
Co-authored-by: rmarinho <1235097+rmarinho@users.noreply.github.com>1 parent db0e9d2 commit 016037a
2 files changed
Lines changed: 35 additions & 0 deletions
File tree
- src/Xamarin.Android.Tools.AndroidSdk
- tests/Xamarin.Android.Tools.AndroidSdk-Tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
358 | 358 | | |
359 | 359 | | |
360 | 360 | | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
361 | 365 | | |
362 | 366 | | |
363 | 367 | | |
| |||
Lines changed: 31 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
309 | 309 | | |
310 | 310 | | |
311 | 311 | | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
312 | 343 | | |
313 | 344 | | |
314 | 345 | | |
| |||
0 commit comments