This commit is contained in:
Eelco Dolstra 2024-01-09 18:51:52 +01:00
parent 7fb9d0de49
commit 5e8c8cee1b
2 changed files with 2 additions and 0 deletions

1
dist/index.js generated vendored
View File

@ -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`;

View File

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