Commit b73a8280 authored by Matthieu Coudron's avatar Matthieu Coudron

Print where kernel is installed

parent 419650fd
......@@ -62,7 +62,7 @@ ihaskell (Args ConvertLhs args) = showingHelp ConvertLhs args $ convert args
ihaskell (Args InstallKernelSpec args) = showingHelp InstallKernelSpec args $ do
let kernelSpecOpts = parseKernelArgs args
replaceIPythonKernelspec kernelSpecOpts
installLabextension
installLabextension (kernelSpecDebug kernelSpecOpts)
ihaskell (Args (Kernel (Just filename)) args) = do
let kernelSpecOpts = parseKernelArgs args
runKernel kernelSpecOpts filename
......
......@@ -171,10 +171,11 @@ installKernelspec repl opts = void $ do
installPrefixFlag = maybe ["--user"] (\prefix -> ["--prefix", T.pack prefix]) (kernelSpecInstallPrefix opts)
cmd = concat [["kernelspec", "install"], installPrefixFlag, [SH.toTextIgnore kernelDir], replaceFlag]
SH.silently $ SH.run ipython cmd
let transformOutput = if kernelSpecDebug opts then id else SH.silently
transformOutput $ SH.run ipython cmd
installLabextension :: IO ()
installLabextension = SH.shelly $ do
installLabextension :: Bool -> IO ()
installLabextension debug = SH.shelly $ do
-- Find the prebuilt extension directory
ihaskellDataDir <- liftIO $ Paths.getDataDir
let labextensionDataDir = ihaskellDataDir
......@@ -188,6 +189,7 @@ installLabextension = SH.shelly $ do
SH.</> ("labextensions" :: SH.FilePath)
SH.</> ("jupyterlab-ihaskell" :: SH.FilePath)
when debug (putStrLn $ "Installing kernel in folder: " ++ show jupyterlabIHaskellDir)
-- Remove the extension directory with extreme prejudice if it already exists
SH.rm_rf jupyterlabIHaskellDir
-- Create an empty 'jupyterlab-ihaskell' directory to install our extension in
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment