From 5e8c8cee1b0dacb84bd85bbba6f0e9637a3e6980 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 9 Jan 2024 18:51:52 +0100 Subject: [PATCH] Comment --- dist/index.js | 1 + src/index.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/dist/index.js b/dist/index.js index 74dbbc8..7ed5c28 100644 --- a/dist/index.js +++ b/dist/index.js @@ -12142,6 +12142,7 @@ async function fetchAutoCacher() { coreExports.info(`Fetching the Magic Nix Cache from ${binary_url}`); const { stdout } = await promisify$1(exec)(`curl "${binary_url}" | xz -d | nix-store --import`); const paths = stdout.split(os$2.EOL); + // Since the export is in reverse topologically sorted order, magic-nix-cache is always the penultimate entry in the list (the empty string left by split being the last). const last_path = paths.at(-2); console.log(`stdout: ${last_path}`); return `${last_path}/bin/magic-nix-cache`; diff --git a/src/index.ts b/src/index.ts index d1bc90b..19d1866 100644 --- a/src/index.ts +++ b/src/index.ts @@ -66,6 +66,7 @@ async function fetchAutoCacher() { const paths = stdout.split(os.EOL); + // Since the export is in reverse topologically sorted order, magic-nix-cache is always the penultimate entry in the list (the empty string left by split being the last). const last_path = paths.at(-2); console.log(`stdout: ${last_path}`);