Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/Runner.Worker/Handlers/NodeScriptActionHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
using GitHub.Runner.Sdk;
using GitHub.Runner.Worker.Container;
using GitHub.Runner.Worker.Container.ContainerHooks;
using GitHub.Services.Common;

namespace GitHub.Runner.Worker.Handlers
{
Expand Down Expand Up @@ -128,6 +129,17 @@ public async Task RunAsync(ActionRunStage stage)
// file name character on Linux.
string arguments = StepHost.ResolvePathForStepHost(ExecutionContext, StringUtil.Format(@"""{0}""", target.Replace(@"""", @"\""")));

// Disable maglev jit compiler in node.js 24.x.x on x64 Windows until the node.js bug is fixed.
// https://github.com/nodejs/node/issues/62260
if (nodeRuntimeVersion.StartsWith("node24", StringComparison.OrdinalIgnoreCase) &&
Constants.Runner.Platform == Constants.OSPlatform.Windows &&
Constants.Runner.PlatformArchitecture == Constants.Architecture.X64 &&
!StringUtil.ConvertToBoolean(System.Environment.GetEnvironmentVariable("ACTIONS_RUNNER_REENABLE_NODE_MAGLEV")) &&
!StringUtil.ConvertToBoolean(Environment.GetValueOrDefault("ACTIONS_RUNNER_REENABLE_NODE_MAGLEV")))
Comment on lines +134 to +138
{
arguments = $"--no-maglev {arguments}";
}

#if OS_WINDOWS
// It appears that node.exe outputs UTF8 when not in TTY mode.
Encoding outputEncoding = Encoding.UTF8;
Expand Down
Loading