File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -873,7 +873,16 @@ commands:
873873 # Ensure we're installing the node-version for the cloned repo
874874 command : |
875875 if [[ -f .node-version ]]; then
876- curl -L https://raw.githubusercontent.com/cypress-io/cypress/<< pipeline.git.branch >>/scripts/ensure-node.sh --output ci-ensure-node.sh
876+ branch="<< pipeline.git.branch >>"
877+
878+ externalBranchPattern='^pull\/[0-9]+'
879+ if [[ $branch =~ $externalBranchPattern ]]; then
880+ # We are unable to curl from the external PR branch location
881+ # so we fall back to develop
882+ branch="develop"
883+ fi
884+
885+ curl -L https://raw.githubusercontent.com/cypress-io/cypress/$branch/scripts/ensure-node.sh --output ci-ensure-node.sh
877886 else
878887 # if no .node-version file exists, we no-op the node script and use the global yarn
879888 echo '' > ci-ensure-node.sh
You can’t perform that action at this time.
0 commit comments