mirror of
https://github.com/DeterminateSystems/magic-nix-cache-action.git
synced 2024-12-26 01:12:17 +01:00
Staple the magic-nix-cache daemon log in error conditions
This commit is contained in:
parent
4ae13c51d8
commit
3b0ad43946
3 changed files with 16 additions and 4 deletions
10
dist/index.js
generated
vendored
10
dist/index.js
generated
vendored
|
@ -94765,6 +94765,10 @@ var MagicNixCacheAction = class {
|
|||
this.unsafeDaemonDir = this.idslib.getTemporaryName();
|
||||
core.exportVariable(ENV_CACHE_DAEMONDIR, this.unsafeDaemonDir);
|
||||
}
|
||||
this.idslib.stapleFile(
|
||||
"daemon.log",
|
||||
external_node_path_namespaceObject.join(this.unsafeDaemonDir, "daemon.log")
|
||||
);
|
||||
}
|
||||
async getDaemonDir() {
|
||||
if (this.daemonDir === void 0) {
|
||||
|
@ -94911,6 +94915,10 @@ var MagicNixCacheAction = class {
|
|||
return `${lastPath}/bin/magic-nix-cache`;
|
||||
}
|
||||
async notifyAutoCache() {
|
||||
if (!await this.daemonDirExists()) {
|
||||
core.debug("magic-nix-cache not started - Skipping");
|
||||
return;
|
||||
}
|
||||
try {
|
||||
core.debug(`Indicating workflow start`);
|
||||
const hostAndPort = inputs_exports.getString("listen");
|
||||
|
@ -94923,7 +94931,7 @@ var MagicNixCacheAction = class {
|
|||
}
|
||||
}
|
||||
async tearDownAutoCache() {
|
||||
if (await this.daemonDirExists()) {
|
||||
if (!await this.daemonDirExists()) {
|
||||
core.debug("magic-nix-cache not started - Skipping");
|
||||
return;
|
||||
}
|
||||
|
|
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
|
@ -50,6 +50,10 @@ class MagicNixCacheAction {
|
|||
this.unsafeDaemonDir = this.idslib.getTemporaryName();
|
||||
actionsCore.exportVariable(ENV_CACHE_DAEMONDIR, this.unsafeDaemonDir);
|
||||
}
|
||||
this.idslib.stapleFile(
|
||||
"daemon.log",
|
||||
path.join(this.unsafeDaemonDir, "daemon.log"),
|
||||
);
|
||||
}
|
||||
|
||||
async getDaemonDir(): Promise<string> {
|
||||
|
@ -235,7 +239,7 @@ class MagicNixCacheAction {
|
|||
}
|
||||
|
||||
async notifyAutoCache(): Promise<void> {
|
||||
if (!await this.daemonDirExists()) {
|
||||
if (!(await this.daemonDirExists())) {
|
||||
actionsCore.debug("magic-nix-cache not started - Skipping");
|
||||
return;
|
||||
}
|
||||
|
@ -255,7 +259,7 @@ class MagicNixCacheAction {
|
|||
}
|
||||
|
||||
async tearDownAutoCache(): Promise<void> {
|
||||
if (!await this.daemonDirExists()) {
|
||||
if (!(await this.daemonDirExists())) {
|
||||
actionsCore.debug("magic-nix-cache not started - Skipping");
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue