mirror of
https://github.com/DeterminateSystems/magic-nix-cache-action.git
synced 2024-12-26 01:12:17 +01:00
Don't mark the daemon started until after we successfully import the closure
This commit is contained in:
parent
c4a0b3111a
commit
5a8a0e7f2c
3 changed files with 6 additions and 5 deletions
4
dist/index.js
generated
vendored
4
dist/index.js
generated
vendored
|
@ -94819,8 +94819,6 @@ var MagicNixCacheAction = class {
|
|||
core.debug(
|
||||
`GitHub Action Cache URL: ${process.env["ACTIONS_CACHE_URL"]}`
|
||||
);
|
||||
this.daemonStarted = true;
|
||||
core.saveState(STATE_STARTED, STARTED_HINT);
|
||||
const sourceBinary = inputs_exports.getStringOrNull("source-binary");
|
||||
const daemonBin = sourceBinary !== null ? sourceBinary : await this.fetchAutoCacher();
|
||||
let runEnv;
|
||||
|
@ -94896,6 +94894,8 @@ var MagicNixCacheAction = class {
|
|||
};
|
||||
core.debug("Full daemon start command:");
|
||||
core.debug(`${daemonBin} ${daemonCliFlags.join(" ")}`);
|
||||
this.daemonStarted = true;
|
||||
core.saveState(STATE_STARTED, STARTED_HINT);
|
||||
const daemon = (0,external_node_child_process_namespaceObject.spawn)(daemonBin, daemonCliFlags, opts);
|
||||
const pidFile = external_node_path_namespaceObject.join(this.daemonDir, "daemon.pid");
|
||||
await promises_namespaceObject.writeFile(pidFile, `${daemon.pid}`);
|
||||
|
|
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
|
@ -109,8 +109,6 @@ class MagicNixCacheAction {
|
|||
`GitHub Action Cache URL: ${process.env["ACTIONS_CACHE_URL"]}`,
|
||||
);
|
||||
|
||||
this.daemonStarted = true;
|
||||
actionsCore.saveState(STATE_STARTED, STARTED_HINT);
|
||||
const sourceBinary = inputs.getStringOrNull("source-binary");
|
||||
const daemonBin =
|
||||
sourceBinary !== null ? sourceBinary : await this.fetchAutoCacher();
|
||||
|
@ -203,6 +201,9 @@ class MagicNixCacheAction {
|
|||
actionsCore.debug("Full daemon start command:");
|
||||
actionsCore.debug(`${daemonBin} ${daemonCliFlags.join(" ")}`);
|
||||
|
||||
this.daemonStarted = true;
|
||||
actionsCore.saveState(STATE_STARTED, STARTED_HINT);
|
||||
|
||||
// Start the server. Once it is ready, it will notify us via the notification server.
|
||||
const daemon = spawn(daemonBin, daemonCliFlags, opts);
|
||||
|
||||
|
|
Loading…
Reference in a new issue