Skip to content

Commit 78e1c95

Browse files
Sn0wCrackshivammathur
authored andcommitted
feat: set this via an environment variable instead
1 parent 310e481 commit 78e1c95

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

action.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@ inputs:
2727
tools:
2828
description: 'Setup popular tools globally.'
2929
required: false
30-
tools-dir:
31-
description: 'Directory where all tools will be installed to.'
32-
defaut: '/usr/local/bin'
33-
required: false
3430
outputs:
3531
php-version:
3632
description: 'PHP version in semver format'

src/install.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ export async function getScript(os: string): Promise<string> {
1919
const script_path = path.join(__dirname, '../src/scripts', filename);
2020
const run_path = script_path.replace(os, 'run');
2121
process.env['fail_fast'] = await utils.getInput('fail-fast', false);
22-
process.env['tool_path_dir'] = await utils.getInput('tools-dir', false);
2322
const extension_csv: string = await utils.getInput('extensions', false);
2423
const ini_values_csv: string = await utils.getInput('ini-values', false);
2524
const coverage_driver: string = await utils.getInput('coverage', false);

src/scripts/unix.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ read_env() {
5555
fail_fast="${fail_fast:-${FAIL_FAST:-false}}"
5656
[[ -z "${ImageOS}" && -z "${ImageVersion}" || -n ${ACT} ]] && _runner=self-hosted || _runner=github
5757
runner="${runner:-${RUNNER:-$_runner}}"
58+
tool_path_dir="${tools_dir:-${TOOLS_DIR:-/usr/local/bin}}"
5859

5960
if [[ "$runner" = "github" && $_runner = "self-hosted" ]]; then
6061
fail_fast=true
@@ -75,6 +76,7 @@ read_env() {
7576
export runner
7677
export update
7778
export ts
79+
export tools_dir_path
7880
}
7981

8082
# Function to create a lock.

0 commit comments

Comments
 (0)