mirror of
https://github.com/DeterminateSystems/nix-installer-action.git
synced 2024-12-23 13:32:06 +01:00
Merge pull request #77 from DeterminateSystems/flakehub-fallback
Gracefully handle FlakeHub login failure
This commit is contained in:
commit
7d2a9c4c9d
3 changed files with 23 additions and 6 deletions
8
dist/index.js
generated
vendored
8
dist/index.js
generated
vendored
|
@ -97900,9 +97900,15 @@ class NixInstallerAction {
|
|||
extra_conf += "\n";
|
||||
}
|
||||
if (this.flakehub) {
|
||||
extra_conf += `netrc-file = ${await this.flakehub_login()}`;
|
||||
try {
|
||||
const flakehub_netrc_file = await this.flakehub_login();
|
||||
extra_conf += `netrc-file = ${flakehub_netrc_file}`;
|
||||
extra_conf += "\n";
|
||||
}
|
||||
catch (e) {
|
||||
core.warning(`Failed to setup FlakeHub: ${e}`);
|
||||
}
|
||||
}
|
||||
if (this.extra_conf !== null && this.extra_conf.length !== 0) {
|
||||
extra_conf += this.extra_conf.join("\n");
|
||||
extra_conf += "\n";
|
||||
|
|
8
dist/main.js
generated
vendored
8
dist/main.js
generated
vendored
|
@ -313,9 +313,15 @@ class NixInstallerAction {
|
|||
extra_conf += "\n";
|
||||
}
|
||||
if (this.flakehub) {
|
||||
extra_conf += `netrc-file = ${await this.flakehub_login()}`;
|
||||
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");
|
||||
extra_conf += "\n";
|
||||
|
|
|
@ -420,8 +420,13 @@ class NixInstallerAction {
|
|||
extra_conf += "\n";
|
||||
}
|
||||
if (this.flakehub) {
|
||||
extra_conf += `netrc-file = ${await this.flakehub_login()}`;
|
||||
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");
|
||||
|
|
Loading…
Reference in a new issue