mirror of
https://github.com/DeterminateSystems/magic-nix-cache-action.git
synced 2025-01-10 22:22:03 +01:00
Improve logging
This commit is contained in:
parent
b1e40f81bd
commit
232a98572b
2 changed files with 7 additions and 5 deletions
5
dist/index.js
generated
vendored
5
dist/index.js
generated
vendored
|
@ -12265,8 +12265,9 @@ async function netrcPath() {
|
|||
try {
|
||||
await flakehub_login(destinedNetrcPath);
|
||||
}
|
||||
catch {
|
||||
catch (e) {
|
||||
coreExports.info("FlakeHub cache disabled.");
|
||||
coreExports.debug(`Error while logging into FlakeHub: ${e}`);
|
||||
}
|
||||
return destinedNetrcPath;
|
||||
}
|
||||
|
@ -12277,7 +12278,7 @@ async function flakehub_login(netrc) {
|
|||
`machine api.flakehub.com login flakehub password ${jwt}`,
|
||||
`machine flakehub.com login flakehub password ${jwt}`,
|
||||
].join("\n"));
|
||||
coreExports.info("Logging in to FlakeHub.");
|
||||
coreExports.info("Logged in to FlakeHub.");
|
||||
// the join followed by a match on ^... looks silly, but extra_config
|
||||
// could contain multi-line values
|
||||
if (this.extra_conf?.join("\n").match(/^netrc-file/m)) {
|
||||
|
|
|
@ -209,8 +209,9 @@ async function netrcPath() {
|
|||
const destinedNetrcPath = path.join(process.env['RUNNER_TEMP'], 'magic-nix-cache-netrc')
|
||||
try {
|
||||
await flakehub_login(destinedNetrcPath);
|
||||
} catch {
|
||||
core.info("FlakeHub cache disabled.")
|
||||
} catch (e) {
|
||||
core.info("FlakeHub cache disabled.");
|
||||
core.debug(`Error while logging into FlakeHub: ${e}`)
|
||||
}
|
||||
return destinedNetrcPath;
|
||||
}
|
||||
|
@ -227,7 +228,7 @@ async function flakehub_login(netrc: string) {
|
|||
].join("\n"),
|
||||
);
|
||||
|
||||
core.info("Logging in to FlakeHub.");
|
||||
core.info("Logged in to FlakeHub.");
|
||||
|
||||
// the join followed by a match on ^... looks silly, but extra_config
|
||||
// could contain multi-line values
|
||||
|
|
Loading…
Reference in a new issue