File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ function extract_asdf_version() {
5858 local package=$1
5959
6060 if [ -f $file ]; then
61- grep " ^$package " $file | tail -n 1 | awk ' {print $2}'
61+ grep " ^$package " $file | tail -n 1 | awk ' {print $2}' || true
6262 fi
6363}
6464
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
3- set -e
3+ set -e -o pipefail
44
55SCRIPT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " & > /dev/null && pwd ) "
66source $SCRIPT_DIR /.test_support.sh
@@ -111,6 +111,20 @@ erlang_version=26.0" > $build_path/elixir_buildpack.config
111111
112112
113113
114+ test " has config file with versions and asdf file with only unrelated packages"
115+
116+ echo " nodejs 22.1.0" > $build_path /.tool-versions
117+ echo " elixir_version=1.16.2
118+ erlang_version=26.2.5" > $build_path /elixir_buildpack.config
119+
120+ load_config > /dev/null
121+
122+ [ " $erlang_version " == " 26.2.5" ]
123+ [ " $elixir_version " == " v1.16.2" ]
124+ [ $failed == " false" ]
125+
126+
127+
114128 test " fixes single integer erlang versions"
115129
116130 echo " erlang_version=25" > $build_path /elixir_buildpack.config
You can’t perform that action at this time.
0 commit comments