Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/misc_funcs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function extract_asdf_version() {
local package=$1

if [ -f $file ]; then
grep "^$package" $file | tail -n 1 | awk '{print $2}'
grep "^$package" $file | tail -n 1 | awk '{print $2}' || true
fi
}

Expand Down
16 changes: 15 additions & 1 deletion test/load_config.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

set -e
set -e -o pipefail

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
source $SCRIPT_DIR/.test_support.sh
Expand Down Expand Up @@ -111,6 +111,20 @@ erlang_version=26.0" > $build_path/elixir_buildpack.config



test "has config file with versions and asdf file with only unrelated packages"

echo "nodejs 22.1.0" > $build_path/.tool-versions
echo "elixir_version=1.16.2
erlang_version=26.2.5" > $build_path/elixir_buildpack.config

load_config > /dev/null

[ "$erlang_version" == "26.2.5" ]
[ "$elixir_version" == "v1.16.2" ]
[ $failed == "false" ]



test "fixes single integer erlang versions"

echo "erlang_version=25" > $build_path/elixir_buildpack.config
Expand Down