Skip to content

Commit

Permalink
Fix disabling Windows error reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
tareqimbasher committed Jun 8, 2024
1 parent 485f83a commit dfa270c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Reflection;
using NetPad.ExecutionModel.External.Interface;
using NetPad.Presentation;
using Utils = NetPad.Utilities;

/// <summary>
/// Meant to be injected into script code so it can initialize <see cref="ExternalProcessDumpSink"/>.
Expand All @@ -20,9 +21,9 @@ public partial class Program

static Program()
{
if (PlatformUtil.IsOSWindows())
if (Utils.PlatformUtil.IsOSWindows())
{
WindowsNative.DisableWindowsErrorReporting();
Utils.WindowsNative.DisableWindowsErrorReporting();
}

var args = Environment.GetCommandLineArgs();
Expand Down
2 changes: 1 addition & 1 deletion src/Core/NetPad.Runtime/Utilities/WindowsNative.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace NetPad.Utilities;

public static class WindowsNative
{
internal static void DisableWindowsErrorReporting()
public static void DisableWindowsErrorReporting()
{
// If older than Window 7
if (Environment.OSVersion.Version < new Version(6, 1, 0, 0))
Expand Down

0 comments on commit dfa270c

Please sign in to comment.