mirror of
https://github.com/DeterminateSystems/magic-nix-cache-action.git
synced 2024-12-27 01:30:35 +01:00
Comment
This commit is contained in:
parent
7fb9d0de49
commit
5e8c8cee1b
2 changed files with 2 additions and 0 deletions
1
dist/index.js
generated
vendored
1
dist/index.js
generated
vendored
|
@ -12142,6 +12142,7 @@ async function fetchAutoCacher() {
|
||||||
coreExports.info(`Fetching the Magic Nix Cache from ${binary_url}`);
|
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 { stdout } = await promisify$1(exec)(`curl "${binary_url}" | xz -d | nix-store --import`);
|
||||||
const paths = stdout.split(os$2.EOL);
|
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);
|
const last_path = paths.at(-2);
|
||||||
console.log(`stdout: ${last_path}`);
|
console.log(`stdout: ${last_path}`);
|
||||||
return `${last_path}/bin/magic-nix-cache`;
|
return `${last_path}/bin/magic-nix-cache`;
|
||||||
|
|
|
@ -66,6 +66,7 @@ async function fetchAutoCacher() {
|
||||||
|
|
||||||
const paths = stdout.split(os.EOL);
|
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);
|
const last_path = paths.at(-2);
|
||||||
|
|
||||||
console.log(`stdout: ${last_path}`);
|
console.log(`stdout: ${last_path}`);
|
||||||
|
|
Loading…
Reference in a new issue