Skip to content

Commit

Permalink
Fix merge conflict with main
Browse files Browse the repository at this point in the history
  • Loading branch information
lucperkins committed May 2, 2024
2 parents 1ebf6ca + 7d2a9c4 commit ff707a0
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 29 deletions.
24 changes: 15 additions & 9 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 15 additions & 9 deletions dist/main.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 14 additions & 11 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ class NixInstallerAction {
},
},
});
} catch (e) {
} catch {
actionsCore.debug("Docker not detected, not enabling docker shim.");
return;
}
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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.",
);
Expand Down Expand Up @@ -862,7 +867,7 @@ class NixInstallerAction {
]);

return true;
} catch (error) {
} catch {
if (isRoot) {
await actionsExec.exec("rm", ["-f", kvmRules]);
} else {
Expand All @@ -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}`);
}
}

Expand Down Expand Up @@ -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";
}
}
Expand Down

0 comments on commit ff707a0

Please sign in to comment.