fix: ignore other leanpkg print-paths output
This commit is contained in:
parent
29dc5c5b1b
commit
c5957dc069
1 changed files with 5 additions and 1 deletions
|
|
@ -172,7 +172,11 @@ section Initialization
|
|||
let stdout := String.trim (← leanpkgProc.stdout.readToEnd)
|
||||
let stderr ← IO.ofExcept stderr.get
|
||||
if (← leanpkgProc.wait) == 0 then
|
||||
match stdout.split (· == '\n') with
|
||||
let leanpkgLines := stdout.split (· == '\n')
|
||||
-- ignore any output up to the last two lines
|
||||
-- TODO: leanpkg should instead redirect nested stdout output to stderr
|
||||
let leanpkgLines := leanpkgLines.drop (leanpkgLines.length - 2)
|
||||
match leanpkgLines with
|
||||
| [""] => pure [] -- e.g. no leanpkg.toml
|
||||
| [leanPath, leanSrcPath] => let sp ← getBuiltinSearchPath
|
||||
let sp ← addSearchPathFromEnv sp
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue