mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-26 13:23:05 +07:00
Use GITHUB_ENV to append to PATH
This commit is contained in:
parent
068c794af7
commit
d2f58713aa
@ -204,8 +204,10 @@ add_tool() {
|
|||||||
tool=$2
|
tool=$2
|
||||||
ver_param=$3
|
ver_param=$3
|
||||||
tool_path="$tool_path_dir/$tool"
|
tool_path="$tool_path_dir/$tool"
|
||||||
export PATH=$PATH:$tool_path_dir
|
if ! [[ "$PATH" =~ $tool_path_dir ]] ; then
|
||||||
echo "$tool_path_dir" >> "$GITHUB_PATH"
|
export PATH=$PATH:"$tool_path_dir"
|
||||||
|
echo "export PATH=\$PATH:$tool_path_dir" | sudo tee -a "$GITHUB_ENV" >/dev/null
|
||||||
|
fi
|
||||||
if [ ! -e "$tool_path" ]; then
|
if [ ! -e "$tool_path" ]; then
|
||||||
rm -rf "$tool_path"
|
rm -rf "$tool_path"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user