Skip to content

Commit

Permalink
fix: skip installing if Nix is present (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomberek authored Dec 5, 2023
1 parent 93664b3 commit e81d193
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion badges/coverage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 7 additions & 4 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 7 additions & 4 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit e81d193

Please sign in to comment.