diff --git a/badges/coverage.svg b/badges/coverage.svg index 75782e9..20b5b30 100644 --- a/badges/coverage.svg +++ b/badges/coverage.svg @@ -1 +1 @@ -Coverage: 6.77%Coverage6.77% \ No newline at end of file +Coverage: 6.66%Coverage6.66% \ No newline at end of file diff --git a/dist/index.js b/dist/index.js index 4595050..82c1fed 100644 --- a/dist/index.js +++ b/dist/index.js @@ -82185,10 +82185,13 @@ const utils = __nccwpck_require__(1608) const which = __nccwpck_require__(6143) async function run() { - core.startGroup('Download & Install flox') - await utils.getDownloadUrl() - await exec.exec('bash', ['-c', utils.SCRIPTS.installFlox]) - core.endGroup() + const nix = await which('nix', { nothrow: true }) + if (nix === null) { + core.startGroup('Download & Install flox') + await utils.getDownloadUrl() + await exec.exec('bash', ['-c', utils.SCRIPTS.installFlox]) + core.endGroup() + } core.startGroup('Configure Git') utils.exportVariableFromInput('git-user') diff --git a/src/main.js b/src/main.js index 2671122..ab6beab 100644 --- a/src/main.js +++ b/src/main.js @@ -5,10 +5,13 @@ const utils = require('./utils') const which = require('which') export async function run() { - core.startGroup('Download & Install flox') - await utils.getDownloadUrl() - await exec.exec('bash', ['-c', utils.SCRIPTS.installFlox]) - core.endGroup() + const nix = await which('nix', { nothrow: true }) + if (nix === null) { + core.startGroup('Download & Install flox') + await utils.getDownloadUrl() + await exec.exec('bash', ['-c', utils.SCRIPTS.installFlox]) + core.endGroup() + } core.startGroup('Configure Git') utils.exportVariableFromInput('git-user')