This commit is contained in:
DismissedLight
2023-02-28 12:35:49 +08:00
parent f3387bb8c8
commit ac68579d6a
2 changed files with 2 additions and 2 deletions

View File

@@ -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)
{
}
}

View File

@@ -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");
}