From 190ef021afbaf39bd9fa72884877c21b9ad50836 Mon Sep 17 00:00:00 2001 From: Ashcon Partovi Date: Wed, 13 Nov 2024 18:01:30 -0800 Subject: [PATCH] Changes [build image] --- scripts/agent.mjs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/scripts/agent.mjs b/scripts/agent.mjs index 5384d61e7047f1..ac23f5be845f25 100755 --- a/scripts/agent.mjs +++ b/scripts/agent.mjs @@ -55,17 +55,15 @@ export async function doAgent(action) { return path; } - let homePath, cachePath, logsPath, agentLogPath, socketPath, pidPath; + let homePath, cachePath, logsPath, agentLogPath, pidPath; if (isWindows) { throw new Error("TODO: Windows"); } else { - const varPath = join("/", "var"); - homePath = getPath(varPath, "lib", "buildkite-agent", { mkdir: true }); - cachePath = getPath(varPath, "cache", "buildkite-agent", { mkdir: true }); - logsPath = getPath(varPath, "log", "buildkite-agent", { mkdir: true }); - agentLogPath = getPath(logsPath, "buildkite-agent.log", { touch: true }); - socketPath = getPath(varPath, "run", "buildkite-agent", "buildkite-agent.sock", { mkdir: true }); - pidPath = getPath(varPath, "run", "buildkite-agent", "buildkite-agent.pid", { touch: true }); + homePath = "/var/lib/buildkite-agent"; + cachePath = "/var/cache/buildkite-agent"; + logsPath = "/var/log/buildkite-agent"; + agentLogPath = join(logsPath, "buildkite-agent.log"); + pidPath = join(logsPath, "buildkite-agent.pid"); } function escape(string) {