From 304d7ca46049461b12bf8244a144ed5028e5e88f Mon Sep 17 00:00:00 2001 From: Gerit Wagner Date: Thu, 13 Nov 2025 10:03:42 +0100 Subject: [PATCH] Ensure colrev is installed in devcontainer setup --- .devcontainer/post-start.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.devcontainer/post-start.sh b/.devcontainer/post-start.sh index d23a875..34b084f 100755 --- a/.devcontainer/post-start.sh +++ b/.devcontainer/post-start.sh @@ -1,5 +1,16 @@ #!/bin/bash +set -u + +# Ensure that the colrev package is available before using it. When the +# Codespaces image cache does not include the dependency, installing it on +# demand keeps the setup reproducible for new workspaces as well as locally. +if ! command -v colrev >/dev/null 2>&1; then + if ! python -m pip install --no-cache-dir "git+https://github.com/CoLRev-Environment/colrev"; then + echo "Warning: Failed to install colrev automatically." >&2 + fi +fi + colrev install all_internal_packages # Pull Docker images for repo in pandoc/latex:3.2.0 lfoppiano/grobid:0.8.1 jbarlow83/ocrmypdf:latest; do