mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-25 04:33:45 +03:00
Internal errors when install fails
This commit is contained in:
parent
d2b652add5
commit
557de91c5a
File diff suppressed because one or more lines are too long
@ -303,10 +303,10 @@ installFrom pname builddir destdir ns@(m :: dns)
|
||||
let destPath = destdir ++ dirSep ++ showSep dirSep (reverse dns)
|
||||
let destFile = destdir ++ dirSep ++ ttcfile ++ ".ttc"
|
||||
Right _ <- coreLift $ mkdirs (reverse dns)
|
||||
| Left err => throw (FileErr pname err)
|
||||
| Left err => throw (InternalError ("Can't make directories " ++ show (reverse dns)))
|
||||
coreLift $ putStrLn $ "Installing " ++ ttcPath ++ " to " ++ destPath
|
||||
Right _ <- coreLift $ copyFile ttcPath destFile
|
||||
| Left err => throw (FileErr pname err)
|
||||
| Left err => throw (InternalError ("Can't copy file " ++ ttcPath ++ " to " ++ destPath))
|
||||
pure ()
|
||||
|
||||
-- Install all the built modules in prefix/package/
|
||||
|
Loading…
Reference in New Issue
Block a user