mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-01 09:49:24 +03:00
findIpkg needs to set working directory
This makes vim mode work again. I don't know a good way to test this, since it involves dealing with absolute paths. If anyone has the bash skills to get this working in a pkg test, please do...
This commit is contained in:
parent
c212255290
commit
773d0dfdee
@ -93,7 +93,7 @@ pathToNS wdir sdir fname
|
||||
base = if isAbsolute fname then wdir </> sdir else sdir
|
||||
in
|
||||
case stripPrefix base fname of
|
||||
Nothing => throw (UserError ("Source file " ++ show fname
|
||||
Nothing => throw (UserError ("Source file " ++ show fname
|
||||
++ " is not in the source directory "
|
||||
++ show (wdir </> sdir)))
|
||||
Just p => pure $ map show $ reverse $ (parse (p <.> "")).body
|
||||
|
@ -552,6 +552,7 @@ findIpkg fname
|
||||
= do Just (dir, ipkgn, up) <- coreLift findIpkgFile
|
||||
| Nothing => pure fname
|
||||
coreLift $ changeDir dir
|
||||
setWorkingDir dir
|
||||
Right (pname, fs) <- coreLift $ parseFile ipkgn
|
||||
(do desc <- parsePkgDesc ipkgn
|
||||
eoi
|
||||
|
Loading…
Reference in New Issue
Block a user