Skip to content

Commit

Permalink
Merge pull request #166 from cachix/feature/daemon
Browse files Browse the repository at this point in the history
daemon: fix support check in post run
  • Loading branch information
domenkozar authored Jan 12, 2024
2 parents c9fc59c + 467b7ad commit 18cf96c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions dist/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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');
Expand All @@ -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' }));
Expand Down
6 changes: 3 additions & 3 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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') ||
Expand Down Expand Up @@ -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') {
Expand All @@ -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;
}

Expand Down

0 comments on commit 18cf96c

Please sign in to comment.