Add check for one nix-build-* directory

This commit is contained in:
Tim Van Baak 2024-10-31 06:46:33 -07:00
parent a75b082a28
commit a530939fe4

View File

@ -49,6 +49,10 @@ test_custom_build_dir() {
[ "$status" = "100" ]
[[ 1 == "$(count "$customBuildDir/nix-build-"*)" ]]
local buildDir=("$customBuildDir/nix-build-"*)
if [[ "${#buildDir[@]}" -ne 1 ]]; then
echo "expected one nix-build-* directory, got: ${buildDir[*]}" >&2
exit 1
fi
if [[ -e ${buildDir[*]}/build ]]; then
buildDir[0]="${buildDir[*]}/build"
fi