Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32029,6 +32029,7 @@ const SELF_HOSTED_RUNNER_MESSAGE = "This job is running on a self-hosted runner.
const HARDEN_RUNNER_UNAVAILABLE_MESSAGE = "Sorry, we are currently experiencing issues with the Harden Runner installation process. It is currently unavailable.";
const ARC_RUNNER_MESSAGE = "Workflow is currently being executed in ARC based runner.";
const ARM64_RUNNER_MESSAGE = "ARM runners are not supported in the Harden-Runner community tier.";
const ARM64_WINDOWS_RUNNER_MESSAGE = "Windows ARM runners are not yet supported by Harden-Runner.";

;// CONCATENATED MODULE: external "node:fs"
const external_node_fs_namespaceObject = require("node:fs");
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions dist/post/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32034,6 +32034,7 @@ const SELF_HOSTED_RUNNER_MESSAGE = "This job is running on a self-hosted runner.
const HARDEN_RUNNER_UNAVAILABLE_MESSAGE = "Sorry, we are currently experiencing issues with the Harden Runner installation process. It is currently unavailable.";
const ARC_RUNNER_MESSAGE = "Workflow is currently being executed in ARC based runner.";
const ARM64_RUNNER_MESSAGE = "ARM runners are not supported in the Harden-Runner community tier.";
const ARM64_WINDOWS_RUNNER_MESSAGE = "Windows ARM runners are not yet supported by Harden-Runner.";

// EXTERNAL MODULE: external "path"
var external_path_ = __nccwpck_require__(6928);
Expand Down Expand Up @@ -32350,6 +32351,10 @@ function handleWindowsCleanup() {
console.log("Windows post step already executed, skipping");
return;
}
if (process.arch === "arm64") {
console.log(ARM64_WINDOWS_RUNNER_MESSAGE);
return;
}
const p = external_child_process_.spawn("powershell.exe", [
"-NoProfile",
"-NonInteractive",
Expand Down
2 changes: 1 addition & 1 deletion dist/post/index.js.map

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion dist/pre/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -85298,6 +85298,7 @@ const SELF_HOSTED_RUNNER_MESSAGE = "This job is running on a self-hosted runner.
const HARDEN_RUNNER_UNAVAILABLE_MESSAGE = "Sorry, we are currently experiencing issues with the Harden Runner installation process. It is currently unavailable.";
const ARC_RUNNER_MESSAGE = "Workflow is currently being executed in ARC based runner.";
const ARM64_RUNNER_MESSAGE = "ARM runners are not supported in the Harden-Runner community tier.";
const ARM64_WINDOWS_RUNNER_MESSAGE = "Windows ARM runners are not yet supported by Harden-Runner.";

;// CONCATENATED MODULE: external "node:fs"
const external_node_fs_namespaceObject = require("node:fs");
Expand Down Expand Up @@ -85708,7 +85709,7 @@ function installWindowsAgent(configStr) {
const auth = `token ${token}`;
const variant = process.arch === "x64" ? "amd64" : "arm64";
if (variant === "arm64") {
console.log(ARM64_RUNNER_MESSAGE);
console.log(ARM64_WINDOWS_RUNNER_MESSAGE);
return false;
}
const agentDir = "C:\\agent";
Expand Down
2 changes: 1 addition & 1 deletion dist/pre/index.js.map

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions src/cleanup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,11 @@ async function handleWindowsCleanup() {
return;
}

if (process.arch === "arm64") {

Copilot AI Feb 26, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On Windows arm64 you return before writing post_event.json. That breaks the existing “post step already executed” guard, so if the action is used multiple times in the same job the post-step will run (and log) repeatedly. Consider still creating a post-step marker (e.g., write post_event.json after ensuring agentDir exists, or use a marker location independent of C:\agent) before returning.

Suggested change
if (process.arch === "arm64") {
if (process.arch === "arm64") {
try {
if (!fs.existsSync(agentDir)) {
fs.mkdirSync(agentDir, { recursive: true });
}
fs.writeFileSync(postEventFile, JSON.stringify({ event: "post" }));
} catch (error) {
console.log(
"warning: failed to write Windows post-step marker:",
(error as any).message || error
);
}

Copilot uses AI. Check for mistakes.
console.log(common.ARM64_WINDOWS_RUNNER_MESSAGE);
return;
}

const p = cp.spawn(
"powershell.exe",
[
Expand Down
3 changes: 3 additions & 0 deletions src/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,3 +145,6 @@ export const ARC_RUNNER_MESSAGE =

export const ARM64_RUNNER_MESSAGE =
"ARM runners are not supported in the Harden-Runner community tier.";

export const ARM64_WINDOWS_RUNNER_MESSAGE =
"Windows ARM runners are not yet supported by Harden-Runner.";
4 changes: 2 additions & 2 deletions src/install-agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import * as path from "path";
import * as fs from "fs";
import { verifyChecksum } from "./checksum";
import { EOL } from "os";
import { ARM64_RUNNER_MESSAGE } from "./common";
import { ARM64_RUNNER_MESSAGE, ARM64_WINDOWS_RUNNER_MESSAGE } from "./common";
import { chownForFolder } from "./utils";

export async function installAgent(
Expand Down Expand Up @@ -157,7 +157,7 @@ export async function installWindowsAgent(configStr: string): Promise<boolean> {

const variant = process.arch === "x64" ? "amd64" : "arm64";
if (variant === "arm64") {
console.log(ARM64_RUNNER_MESSAGE);
console.log(ARM64_WINDOWS_RUNNER_MESSAGE);
return false;
}

Expand Down
Loading