From 572ca7e6e3539087d0d4dca2876e5e24e7f06fb5 Mon Sep 17 00:00:00 2001 From: Charles Harris Date: Thu, 10 Aug 2023 05:19:48 -0600 Subject: [PATCH] MAINT: Fix codespaces setup.sh script (#24381) A change in how codespaces is configured upstream causes the installation script for micromamba to wait for input unless stdin is explicitly made empty, which causes codespaces creation to fail. [skip ci] Co-authored-by: melissawm --- .devcontainer/setup.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh index 4ea718ec927f..1f3005d30d2f 100755 --- a/.devcontainer/setup.sh +++ b/.devcontainer/setup.sh @@ -2,7 +2,7 @@ set -e -curl micro.mamba.pm/install.sh | bash +"${SHELL}" <(curl -Ls micro.mamba.pm/install.sh) < /dev/null conda init --all micromamba shell init -s bash @@ -11,3 +11,7 @@ micromamba env create -f environment.yml --yes # user (same applies to `conda activate`) git submodule update --init + +# Enables users to activate environment without having to specify the full path +echo "envs_dirs: + - /home/codespace/micromamba/envs" > /opt/conda/.condarc