feat: Support different php binary.

This commit is contained in:
Nikolaj Stockholm 2024-05-07 12:27:55 +02:00
parent 6242095e72
commit 84770a210d
2 changed files with 11 additions and 1 deletions

View file

@ -19,6 +19,10 @@
# Required.
dep: deploy
# The path to the PHP binary to use.
# Optional.
php-binary: "php"
# Specifies a sub directory within the repository to deploy
# Optional
sub-directory: "..."

View file

@ -125,8 +125,14 @@ async function dep() {
console.error('Invalid JSON in options')
}
let phpBin = 'php'
let phpBinArg = core.getInput('php-binary');
if (phpBinArg !== '') {
phpBin = phpBinArg
}
try {
await $`php ${dep} ${cmd} ${recipe} --no-interaction ${ansi} ${verbosity} ${options}`
await $`${phpBin} ${dep} ${cmd} ${recipe} --no-interaction ${ansi} ${verbosity} ${options}`
} catch (err) {
core.setFailed(`Failed: dep ${cmd}`)
}