JuliaLang / JuliaLang/devcontainer-features

postCreate script failing with trivial path environment variable changes to devcontainer.json

Open
#18 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
18
Forks
5
PR merge metrics
No merged PRs in 30d

Description

When specifying PATH environment variable in the devcontainer.json, for example like this:
```
"remoteEnv": {
"PATH": "${containerEnv:PATH}"
}
```
the postcreate.jl script fails.

```
Running the postCreateCommand from Feature 'ghcr.io/julialang/devcontainer-features/julia:1'...

[19325 ms] Start: Run in container: /bin/sh -c /usr/local/julia-devcontainer-features/postcreate.jl
[20064 ms] postCreateCommand failed with exit code 127. Skipping any further user-provided commands.
Done. Press any key to close the terminal.
```

MWE here:

https://github.com/ahjulstad/julia-devcontainer-feature-errror-minimimworkingexample/commit/df768106758afa1752d1994ed69884f7cb49008e

```
julia> versioninfo()
Julia Version 1.10.2
Commit bd47eca2c8a (2024-03-01 10:14 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 12 × Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-15.0.7 (ORCJIT, skylake)
Threads: 1 default, 0 interactive, 1 GC (on 12 virtual cores)
```

After startup I can run Julia or the `postcreate.jl` script just fine, but the language server does not start.

The resulting path if I delete the remoteEnv statement becomes:
```/vscode/vscode-server/bin/linux-x64/e170252f762678dec6ca2cc69aba1570769a5d39/bin/remote-cli:/home/vscode/.juliaup/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/vscode/.local/bin```

If I keep the remoteEnv statement
```/home/vscode/.juliaup/bin:/vscode/vscode-server/bin/linux-x64/e170252f762678dec6ca2cc69aba1570769a5d39/bin/remote-cli:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/vscode/.local/bin```

Same elements, but slightly different sequence.

(The purpose of the original path setting was to make the Julia-installed python available at the command prompt, with the goal of sharing python environments across devcontainers. And if you ask, why use devcontainers at all; I am on Windows.)

Perhaps this is caused by some core devcontainer feature, I don't know...

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.