Skip to content

Commit

Permalink
fix: ignore other leanpkg print-paths output
Browse files Browse the repository at this point in the history
  • Loading branch information
Kha committed May 31, 2021
1 parent 29dc5c5 commit c5957dc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Lean/Server/FileWorker.lean
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c5957dc

Please sign in to comment.