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}`);