Skip to content

Commit

Permalink
fix(runner): emove codspeed_introspected_node from PATH to prevent in…
Browse files Browse the repository at this point in the history
…finite loop
  • Loading branch information
adriencaccia committed Nov 30, 2023
1 parent 14b666d commit 306c799
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/runner/helpers/introspected_node/node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ function echo_debug {
# to avoid setting the variable for the children processes, unset it before running the node command
unset __CODSPEED_NODE_CORE_INTROSPECTION_PATH__

# Retrieve the original path by removing the folder containing CodSpeedHQ/action from the path.
ORIGINAL_PATH=$(echo "$PATH" | tr ":" "\n" | grep -v "CodSpeedHQ/action" | tr "\n" ":")
# Retrieve the original path by removing the folder containing codspeed_introspected_node from the path.
ORIGINAL_PATH=$(echo "$PATH" | tr ":" "\n" | grep -v "codspeed_introspected_node" | tr "\n" ":")
# Check if node is in the original path.
if ! env PATH="$ORIGINAL_PATH" which node &>/dev/null; then
echo "Error: node not found in PATH. There might be a problem with the node installation."
Expand Down

0 comments on commit 306c799

Please sign in to comment.