Skip to content

Commit

Permalink
Merge pull request #77 from DeterminateSystems/flakehub-fallback
Browse files Browse the repository at this point in the history
Gracefully handle FlakeHub login failure
  • Loading branch information
cole-h committed May 2, 2024
2 parents 5c49fa4 + 413ac98 commit 7d2a9c4
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 6 deletions.
10 changes: 8 additions & 2 deletions dist/index.js

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

10 changes: 8 additions & 2 deletions dist/main.js

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

9 changes: 7 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -420,8 +420,13 @@ class NixInstallerAction {
extra_conf += "\n";
}
if (this.flakehub) {
extra_conf += `netrc-file = ${await this.flakehub_login()}`;
extra_conf += "\n";
try {
const flakehub_netrc_file = await this.flakehub_login();
extra_conf += `netrc-file = ${flakehub_netrc_file}`;
extra_conf += "\n";
} catch (e) {
actions_core.warning(`Failed to setup FlakeHub: ${e}`);
}
}
if (this.extra_conf !== null && this.extra_conf.length !== 0) {
extra_conf += this.extra_conf.join("\n");
Expand Down

0 comments on commit 7d2a9c4

Please sign in to comment.