Created
November 17, 2016 01:07
-
-
Save huseyinyilmaz/a7e2e2307407a36842a6cf64875601ac to your computer and use it in GitHub Desktop.
Setting path on a shell script:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env stack | |
-- stack --install-ghc runghc --package turtle | |
{-# LANGUAGE OverloadedStrings #-} | |
import Turtle | |
import System.Process(callProcess) | |
import qualified Data.Text as Text | |
-- adds virtualenv wrapper to path | |
addVirtualenvWrapper = do | |
(exitSuccess, virtualenvwrapper) <- procStrict "which" ["virtualenvwrapper.sh"] empty | |
shells virtualenvwrapper empty | |
shells ("workon test") empty | |
-- gives following error: | |
-- | |
-- /bin/sh: workon: command not found | |
-- venvtest.hs: ShellFailed {shellCommandLine = "workon test", shellExitCode = ExitFailure 127} | |
main = do | |
addVirtualenvWrapper |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment