feat: auto-add stdlib to LEAN_SRC_PATH for installed Lean
This commit is contained in:
parent
f0cbf08cb0
commit
fbb1184f25
1 changed files with 3 additions and 3 deletions
|
|
@ -204,9 +204,9 @@ section Initialization
|
|||
let leanpkgPath ← match ← IO.getEnv "LEAN_SYSROOT" with
|
||||
| some path => s!"{path}/bin/leanpkg{System.FilePath.exeSuffix}"
|
||||
| _ => s!"{← appDir}/leanpkg{System.FilePath.exeSuffix}"
|
||||
let mut srcSearchPath := match (← IO.getEnv "LEAN_SRC_PATH") with
|
||||
| some p => parseSearchPath p
|
||||
| none => []
|
||||
let mut srcSearchPath := [s!"{← appDir}/../lib/lean/src"]
|
||||
if let some p := (← IO.getEnv "LEAN_SRC_PATH") then
|
||||
srcSearchPath := srcSearchPath ++ parseSearchPath p
|
||||
-- NOTE: leanpkg does not exist in stage 0 (yet?)
|
||||
if (← fileExists leanpkgPath) then
|
||||
let pkgSearchPath ← leanpkgSetupSearchPath leanpkgPath m (Lean.Elab.headerToImports headerStx).toArray hOut
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue