Commit c83836f1 authored by Matthias Bernt's avatar Matthias Bernt
Browse files

fix test for availablity of mamba in container building

parent dc3bff48
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -313,11 +313,11 @@ def mull_targets(
        if conda_version is not None:
            specs.append(f"conda={conda_version}")
        if mamba_version is not None:
            specs.append(f"mamba={mamba_version}")
            if mamba_version == "" and not specs:
                # If nothing but mamba without a specific version is requested,
                # then only run conda install if mamba is not already installed.
                mamba_test = "[ '[]' = \"$( conda list --json --full-name mamba )\" ]"
            specs.append(f"mamba={mamba_version}")
        conda_install = f"""conda install {verbose} --yes {" ".join(f"'{spec}'" for spec in specs)}"""
        involucro_args.extend(["-set", f"PREINSTALL=if {mamba_test} ; then {conda_install} ; fi"])