mirror of
https://github.com/shivammathur/setup-php.git
synced 2025-11-26 09:06:44 +07:00
Fix check in add_path
Add composer_bin to the PATH after a tool is added using composer
This commit is contained in:
@ -99,7 +99,7 @@ get_shell_profile() {
|
||||
# Function to add a path to the PATH variable.
|
||||
add_path() {
|
||||
path_to_add=$1
|
||||
[ ! -d "$path_to_add" ] && [[ ":$PATH:" == *":$path_to_add:"* ]] && return
|
||||
{ [ ! -d "$path_to_add" ] || [[ ":$PATH:" == *":$path_to_add:"* ]]; } && return
|
||||
if [[ -n "$GITHUB_PATH" ]]; then
|
||||
echo "$path_to_add" | tee -a "$GITHUB_PATH" >/dev/null 2>&1
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user