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
10
dist/index.js
generated
vendored
10
dist/index.js
generated
vendored
|
@ -97900,8 +97900,14 @@ 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) {
|
||||
core.warning(`Failed to setup FlakeHub: ${e}`);
|
||||
}
|
||||
}
|
||||
if (this.extra_conf !== null && this.extra_conf.length !== 0) {
|
||||
extra_conf += this.extra_conf.join("\n");
|
||||
|
|
10
dist/main.js
generated
vendored
10
dist/main.js
generated
vendored
|
@ -313,8 +313,14 @@ 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");
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue