From 467b7ad67ec5520b97203fabcf8adbd2a5feff68 Mon Sep 17 00:00:00 2001 From: Sander Date: Fri, 12 Jan 2024 12:10:31 +0000 Subject: [PATCH] daemon: fix support check in post run Javascript truthy strings strike again. --- dist/main/index.js | 6 +++--- src/main.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dist/main/index.js b/dist/main/index.js index 989b7c95..deb398a9 100644 --- a/dist/main/index.js +++ b/dist/main/index.js @@ -7745,7 +7745,7 @@ const pathsToPush = core.getInput('pathsToPush'); const pushFilter = core.getInput('pushFilter'); const cachixArgs = core.getInput('cachixArgs'); const skipAddingSubstituter = core.getInput('skipAddingSubstituter'); -const useDaemon = (core.getInput('useDaemon') === 'true') ? true : false; +const useDaemon = core.getBooleanInput('useDaemon'); const cachixBinInput = core.getInput('cachixBin'); const installCommand = core.getInput('installCommand') || "nix-env --quiet -j8 -iA cachix -f https://cachix.org/api/v1/install"; @@ -7858,7 +7858,7 @@ async function setup() { async function upload() { core.startGroup('Cachix: push'); const cachixBin = core.getState('cachixBin'); - const supportsDaemon = core.getState('supportsDaemon'); + const supportsDaemon = core.getState('supportsDaemon') === 'true'; try { if (skipPush === 'true') { core.info('Pushing is disabled as skipPush is set to true'); @@ -7867,7 +7867,7 @@ async function upload() { if (useDaemon && supportsDaemon) { const daemonDir = process.env[ENV_CACHIX_DAEMON_DIR]; if (!daemonDir) { - core.debug('Cachix Daemon not started. Skipping push'); + core.error('Cachix Daemon not started. Skipping push'); return; } const daemonPid = parseInt(await fs.readFile(pidFilePath(daemonDir), { encoding: 'utf8' })); diff --git a/src/main.ts b/src/main.ts index 5b6c22fa..bfc1eed2 100644 --- a/src/main.ts +++ b/src/main.ts @@ -19,7 +19,7 @@ const pathsToPush = core.getInput('pathsToPush'); const pushFilter = core.getInput('pushFilter'); const cachixArgs = core.getInput('cachixArgs'); const skipAddingSubstituter = core.getInput('skipAddingSubstituter'); -const useDaemon = (core.getInput('useDaemon') === 'true') ? true : false; +const useDaemon = core.getBooleanInput('useDaemon'); const cachixBinInput = core.getInput('cachixBin'); const installCommand = core.getInput('installCommand') || @@ -153,7 +153,7 @@ async function upload() { core.startGroup('Cachix: push'); const cachixBin = core.getState('cachixBin'); - const supportsDaemon = core.getState('supportsDaemon'); + const supportsDaemon = core.getState('supportsDaemon') === 'true'; try { if (skipPush === 'true') { @@ -163,7 +163,7 @@ async function upload() { const daemonDir = process.env[ENV_CACHIX_DAEMON_DIR]; if (!daemonDir) { - core.debug('Cachix Daemon not started. Skipping push'); + core.error('Cachix Daemon not started. Skipping push'); return; }