Skip to content

Commit

Permalink
Use GITHUB_ENV to append to PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
shivammathur committed Jan 7, 2021
1 parent 068c794 commit d2f5871
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/scripts/common.sh
Expand Up @@ -204,8 +204,10 @@ add_tool() {
tool=$2
ver_param=$3
tool_path="$tool_path_dir/$tool"
export PATH=$PATH:$tool_path_dir
echo "$tool_path_dir" >> "$GITHUB_PATH"
if ! [[ "$PATH" =~ $tool_path_dir ]] ; then
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
rm -rf "$tool_path"
fi
Expand Down

0 comments on commit d2f5871

Please sign in to comment.