mirror of
https://jihulab.com/DGP-Studio/Snap.Hutao.git
synced 2025-11-19 21:02:53 +08:00
fix #567
This commit is contained in:
@@ -16,7 +16,7 @@ internal sealed class RuntimeEnvironmentException : Exception
|
||||
/// <param name="message">消息</param>
|
||||
/// <param name="innerException">内部错误</param>
|
||||
public RuntimeEnvironmentException(string message, Exception innerException)
|
||||
: base(message, innerException)
|
||||
: base($"{message}\n{innerException.Message}", innerException)
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -94,7 +94,7 @@ internal static class RegistryInterop
|
||||
{
|
||||
if (path.HasValue && path.Length > 0)
|
||||
{
|
||||
if (path.AsSpan().IndexOf("WindowsPowerShell") > 0)
|
||||
if (path.Value.Contains("WindowsPowerShell", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return Path.Combine(path.Value, "powershell.exe");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user