Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$(ipython locate) instead of .ipython/ #19

Closed
Carreau opened this issue Oct 28, 2013 · 3 comments
Closed

$(ipython locate) instead of .ipython/ #19

Carreau opened this issue Oct 28, 2013 · 3 comments

Comments

@Carreau
Copy link
Contributor

Carreau commented Oct 28, 2013

Sorry, those might be be trivial to fix, but as my Hakell knowledge is ~0.
I'll prefer to open issues that trying to fix it myself.

Just home -> do
          dotIpython <- test_d . fromText $ home ++ "/.ipython"
          dotConfigIpython <- test_d . fromText $ home ++ "/.config/ipython"

          when (not dotIpython && not dotConfigIpython) $ do
            putStrLn "Could not find ~/.ipython or ~/.config/ipython."
            error "Could not find IPython directory."

          return $ home ++ (if dotIpython
                          then "/.ipython"
                          else "/.config/ipython")

You can just execute in a subshell ipython locate it will give you where ipython is expecting its conf to live and will work more reliably on some platform.

@gibiansky
Copy link
Member

Thanks, will fix. Should be easy with runHandle path ["locate"] $ liftIO . StrictIO.hGetContents; also should probably change the case to just use when and monadic fail...

@gibiansky
Copy link
Member

Now using ipython locate in 1000280

Also, it creates the static/custom directory if it didn't exist already. Let me know if you encounter any errors with either.

@Carreau
Copy link
Contributor Author

Carreau commented Oct 28, 2013

Will do.
In 2.0.0-dev full profile dir is created and already filled with empty custom.js and custom.css for you to know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants