Commit 8a09cf7
authored
Return empty properties when
If the Java executable we are trying to run fails to be be executed
(i.e., locked file, broken symlink, or any raeson actually) we should
just return an empty dictionary. That way when running
`GetPathEnvironmentJdkPaths`, the invalid/not available executable is
just ignored.
Call stack from:
* https://developercommunity.visualstudio.com/t/visual-studio-does-not-see-detect-the-co/10888076
System.ComponentModel.Win32Exception (0x80004005): The system cannot find the path specified
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at Xamarin.Android.Tools.ProcessUtils.Exec(ProcessStartInfo processStartInfo, DataReceivedEventHandler output, Boolean includeStderr)
at Xamarin.Android.Tools.JdkInfo.GetJavaProperties(Action`2 logger, String java)
at Xamarin.Android.Tools.JdkInfo.<GetPathEnvironmentJdkPaths>d__61.MoveNext()
The message `The system cannot find the path specified` is a bit
misleading because we are already validating the file exist before
calling `GetJavaProperties`, and this can only occurr if we found a
broken symlink.java fails to run (#255)1 parent d4b5529 commit 8a09cf7
1 file changed
+10
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
277 | | - | |
| 277 | + | |
| 278 | + | |
278 | 279 | | |
279 | 280 | | |
280 | 281 | | |
| |||
307 | 308 | | |
308 | 309 | | |
309 | 310 | | |
310 | | - | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
311 | 319 | | |
312 | 320 | | |
313 | 321 | | |
| |||
0 commit comments