mirror of
https://github.com/DeterminateSystems/nix-installer-action.git
synced 2024-12-23 13:32:06 +01:00
Fix merge conflict with main
This commit is contained in:
commit
ff707a0bf7
3 changed files with 44 additions and 29 deletions
24
dist/index.js
generated
vendored
24
dist/index.js
generated
vendored
|
@ -97375,7 +97375,7 @@ class NixInstallerAction {
|
|||
},
|
||||
});
|
||||
}
|
||||
catch (e) {
|
||||
catch {
|
||||
core.debug("Docker not detected, not enabling docker shim.");
|
||||
return;
|
||||
}
|
||||
|
@ -97595,8 +97595,14 @@ class NixInstallerAction {
|
|||
extraConf += "\n";
|
||||
}
|
||||
if (this.flakehub) {
|
||||
extraConf += `netrc-file = ${await this.flakehubLogin()}`;
|
||||
extraConf += "\n";
|
||||
try {
|
||||
const flakeHubNetrcFile = await this.flakehubLogin();
|
||||
extraConf += `netrc-file = ${flakeHubNetrcFile}`;
|
||||
extraConf += "\n";
|
||||
}
|
||||
catch (e) {
|
||||
core.warning(`Failed to set up FlakeHub: ${e}`);
|
||||
}
|
||||
}
|
||||
if (this.extraConf !== null && this.extraConf.length !== 0) {
|
||||
extraConf += this.extraConf.join("\n");
|
||||
|
@ -97821,7 +97827,7 @@ class NixInstallerAction {
|
|||
core.addPath(homeNixProfilePath);
|
||||
core.info(`Added \`${nixVarNixProfilePath}\` and \`${homeNixProfilePath}\` to \`$GITHUB_PATH\``);
|
||||
}
|
||||
catch (error) {
|
||||
catch {
|
||||
core.info("Skipping setting $GITHUB_PATH in action, the `nix-installer` crate seems to have done this already. From `nix-installer` version 0.11.0 and up, this step is done in the action. Prior to 0.11.0, this was only done in the `nix-installer` binary.");
|
||||
}
|
||||
}
|
||||
|
@ -97932,7 +97938,7 @@ class NixInstallerAction {
|
|||
]);
|
||||
return true;
|
||||
}
|
||||
catch (error) {
|
||||
catch {
|
||||
if (isRoot) {
|
||||
await exec.exec("rm", ["-f", kvmRules]);
|
||||
}
|
||||
|
@ -97958,8 +97964,8 @@ class NixInstallerAction {
|
|||
conclusion: await this.getWorkflowConclusion(),
|
||||
});
|
||||
}
|
||||
catch (error) {
|
||||
core.debug(`Error submitting post-run diagnostics report: ${error}`);
|
||||
catch (e) {
|
||||
core.debug(`Error submitting post-run diagnostics report: ${e}`);
|
||||
}
|
||||
}
|
||||
async getWorkflowConclusion() {
|
||||
|
@ -97995,8 +98001,8 @@ class NixInstallerAction {
|
|||
// Assume success if no jobs failed or were canceled
|
||||
return "success";
|
||||
}
|
||||
catch (error) {
|
||||
core.debug(`Error determining final disposition: ${error}`);
|
||||
catch (e) {
|
||||
core.debug(`Error determining final disposition: ${e}`);
|
||||
return "unavailable";
|
||||
}
|
||||
}
|
||||
|
|
24
dist/main.js
generated
vendored
24
dist/main.js
generated
vendored
|
@ -114,7 +114,7 @@ class NixInstallerAction {
|
|||
},
|
||||
});
|
||||
}
|
||||
catch (e) {
|
||||
catch {
|
||||
actionsCore.debug("Docker not detected, not enabling docker shim.");
|
||||
return;
|
||||
}
|
||||
|
@ -334,8 +334,14 @@ class NixInstallerAction {
|
|||
extraConf += "\n";
|
||||
}
|
||||
if (this.flakehub) {
|
||||
extraConf += `netrc-file = ${await this.flakehubLogin()}`;
|
||||
extraConf += "\n";
|
||||
try {
|
||||
const flakeHubNetrcFile = await this.flakehubLogin();
|
||||
extraConf += `netrc-file = ${flakeHubNetrcFile}`;
|
||||
extraConf += "\n";
|
||||
}
|
||||
catch (e) {
|
||||
actionsCore.warning(`Failed to set up FlakeHub: ${e}`);
|
||||
}
|
||||
}
|
||||
if (this.extraConf !== null && this.extraConf.length !== 0) {
|
||||
extraConf += this.extraConf.join("\n");
|
||||
|
@ -560,7 +566,7 @@ class NixInstallerAction {
|
|||
actionsCore.addPath(homeNixProfilePath);
|
||||
actionsCore.info(`Added \`${nixVarNixProfilePath}\` and \`${homeNixProfilePath}\` to \`$GITHUB_PATH\``);
|
||||
}
|
||||
catch (error) {
|
||||
catch {
|
||||
actionsCore.info("Skipping setting $GITHUB_PATH in action, the `nix-installer` crate seems to have done this already. From `nix-installer` version 0.11.0 and up, this step is done in the action. Prior to 0.11.0, this was only done in the `nix-installer` binary.");
|
||||
}
|
||||
}
|
||||
|
@ -671,7 +677,7 @@ class NixInstallerAction {
|
|||
]);
|
||||
return true;
|
||||
}
|
||||
catch (error) {
|
||||
catch {
|
||||
if (isRoot) {
|
||||
await actionsExec.exec("rm", ["-f", kvmRules]);
|
||||
}
|
||||
|
@ -697,8 +703,8 @@ class NixInstallerAction {
|
|||
conclusion: await this.getWorkflowConclusion(),
|
||||
});
|
||||
}
|
||||
catch (error) {
|
||||
actionsCore.debug(`Error submitting post-run diagnostics report: ${error}`);
|
||||
catch (e) {
|
||||
actionsCore.debug(`Error submitting post-run diagnostics report: ${e}`);
|
||||
}
|
||||
}
|
||||
async getWorkflowConclusion() {
|
||||
|
@ -734,8 +740,8 @@ class NixInstallerAction {
|
|||
// Assume success if no jobs failed or were canceled
|
||||
return "success";
|
||||
}
|
||||
catch (error) {
|
||||
actionsCore.debug(`Error determining final disposition: ${error}`);
|
||||
catch (e) {
|
||||
actionsCore.debug(`Error determining final disposition: ${e}`);
|
||||
return "unavailable";
|
||||
}
|
||||
}
|
||||
|
|
25
src/main.ts
25
src/main.ts
|
@ -162,7 +162,7 @@ class NixInstallerAction {
|
|||
},
|
||||
},
|
||||
});
|
||||
} catch (e) {
|
||||
} catch {
|
||||
actionsCore.debug("Docker not detected, not enabling docker shim.");
|
||||
return;
|
||||
}
|
||||
|
@ -438,8 +438,13 @@ class NixInstallerAction {
|
|||
extraConf += "\n";
|
||||
}
|
||||
if (this.flakehub) {
|
||||
extraConf += `netrc-file = ${await this.flakehubLogin()}`;
|
||||
extraConf += "\n";
|
||||
try {
|
||||
const flakeHubNetrcFile = await this.flakehubLogin();
|
||||
extraConf += `netrc-file = ${flakeHubNetrcFile}`;
|
||||
extraConf += "\n";
|
||||
} catch (e) {
|
||||
actionsCore.warning(`Failed to set up FlakeHub: ${e}`);
|
||||
}
|
||||
}
|
||||
if (this.extraConf !== null && this.extraConf.length !== 0) {
|
||||
extraConf += this.extraConf.join("\n");
|
||||
|
@ -712,7 +717,7 @@ class NixInstallerAction {
|
|||
actionsCore.info(
|
||||
`Added \`${nixVarNixProfilePath}\` and \`${homeNixProfilePath}\` to \`$GITHUB_PATH\``,
|
||||
);
|
||||
} catch (error) {
|
||||
} catch {
|
||||
actionsCore.info(
|
||||
"Skipping setting $GITHUB_PATH in action, the `nix-installer` crate seems to have done this already. From `nix-installer` version 0.11.0 and up, this step is done in the action. Prior to 0.11.0, this was only done in the `nix-installer` binary.",
|
||||
);
|
||||
|
@ -862,7 +867,7 @@ class NixInstallerAction {
|
|||
]);
|
||||
|
||||
return true;
|
||||
} catch (error) {
|
||||
} catch {
|
||||
if (isRoot) {
|
||||
await actionsExec.exec("rm", ["-f", kvmRules]);
|
||||
} else {
|
||||
|
@ -888,10 +893,8 @@ class NixInstallerAction {
|
|||
this.idslib.recordEvent(EVENT_CONCLUDE_WORKFLOW, {
|
||||
conclusion: await this.getWorkflowConclusion(),
|
||||
});
|
||||
} catch (error) {
|
||||
actionsCore.debug(
|
||||
`Error submitting post-run diagnostics report: ${error}`,
|
||||
);
|
||||
} catch (e) {
|
||||
actionsCore.debug(`Error submitting post-run diagnostics report: ${e}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -938,8 +941,8 @@ class NixInstallerAction {
|
|||
|
||||
// Assume success if no jobs failed or were canceled
|
||||
return "success";
|
||||
} catch (error) {
|
||||
actionsCore.debug(`Error determining final disposition: ${error}`);
|
||||
} catch (e) {
|
||||
actionsCore.debug(`Error determining final disposition: ${e}`);
|
||||
return "unavailable";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue