From 63248d6dbe20561ca397a72f8ad305056d712374 Mon Sep 17 00:00:00 2001 From: Oliver Schulz Date: Thu, 10 Oct 2024 08:59:07 +0200 Subject: [PATCH] Improve Julia setup script to support stacked depots --- legend_julia_setup.jl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/legend_julia_setup.jl b/legend_julia_setup.jl index cc81afa..a9703c6 100644 --- a/legend_julia_setup.jl +++ b/legend_julia_setup.jl @@ -1,6 +1,9 @@ import Pkg -Pkg.activate() # Activate default environment +# Activate default environment +# Can't use `Pkg.activate()` with stacked depots if first(DEPOT_PATH) doesn't exist: +Pkg.activate(joinpath(first(DEPOT_PATH), "environments", "v$(VERSION.major).$(VERSION.minor)")) +# Will also create he environment if it doesn't exist: Pkg.instantiate() if !ispath(joinpath(first(DEPOT_PATH), "registries", "LegendJuliaRegistry"))