leanprover / lean4

Lean 4 programming language and theorem prover
https://lean-lang.org
Apache License 2.0
3.82k stars 325 forks source link

lake puts relative paths in `LD_LIBRARY_PATH` #4042

Open eric-wieser opened 2 weeks ago

eric-wieser commented 2 weeks ago

Prerequisites

Description

lake env foo runs foo in a context with various environment variables set. However, if foo changes the working directory internally, then these environment variables no longer work, as they are relative paths.

augmentedEnvVars should prepend the working directory to the relative paths it has obtain

Steps to Reproduce

  1. lake env env | grep LD_LIBRARY_PATH

Expected behavior: paths should be absolute

Actual behavior: paths are relative

Versions

4.7.0

Impact

Add :+1: to issues you consider important. If others are impacted by this issue, please ask them to add :+1: to it.