Fix merge conflict with main

This commit is contained in:
Luc Perkins 2024-05-02 13:03:12 -03:00
commit ff707a0bf7
No known key found for this signature in database
GPG key ID: 16DB1108FB591835
3 changed files with 44 additions and 29 deletions

22
dist/index.js generated vendored
View file

@ -97375,7 +97375,7 @@ class NixInstallerAction {
},
});
}
catch (e) {
catch {
core.debug("Docker not detected, not enabling docker shim.");
return;
}
@ -97595,9 +97595,15 @@ class NixInstallerAction {
extraConf += "\n";
}
if (this.flakehub) {
extraConf += `netrc-file = ${await this.flakehubLogin()}`;
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");
extraConf += "\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";
}
}

22
dist/main.js generated vendored
View file

@ -114,7 +114,7 @@ class NixInstallerAction {
},
});
}
catch (e) {
catch {
actionsCore.debug("Docker not detected, not enabling docker shim.");
return;
}
@ -334,9 +334,15 @@ class NixInstallerAction {
extraConf += "\n";
}
if (this.flakehub) {
extraConf += `netrc-file = ${await this.flakehubLogin()}`;
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");
extraConf += "\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";
}
}

View file

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