Disable yesod test for Stack (fixes #1198)
This commit is contained in:
parent
8ce201faca
commit
814ad379b6
@ -1,3 +1,7 @@
|
|||||||
|
## 1.4.18
|
||||||
|
|
||||||
|
* Disable `yesod test` when using Stack [#1198](https://github.com/yesodweb/yesod/issues/1198)
|
||||||
|
|
||||||
## 1.4.17
|
## 1.4.17
|
||||||
|
|
||||||
* Fully remove the `yesod init` command
|
* Fully remove the `yesod init` command
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import Data.Monoid
|
|||||||
import Data.Version (showVersion)
|
import Data.Version (showVersion)
|
||||||
import Options.Applicative
|
import Options.Applicative
|
||||||
import System.Environment (getEnvironment)
|
import System.Environment (getEnvironment)
|
||||||
import System.Exit (ExitCode (ExitSuccess), exitWith)
|
import System.Exit (ExitCode (ExitSuccess), exitWith, exitFailure)
|
||||||
import System.FilePath (splitSearchPath)
|
import System.FilePath (splitSearchPath)
|
||||||
import System.Process (rawSystem)
|
import System.Process (rawSystem)
|
||||||
|
|
||||||
@ -15,6 +15,7 @@ import Devel (DevelOpts (..), devel, DevelTermOpt(..)
|
|||||||
import Keter (keter)
|
import Keter (keter)
|
||||||
import Options (injectDefaults)
|
import Options (injectDefaults)
|
||||||
import qualified Paths_yesod_bin
|
import qualified Paths_yesod_bin
|
||||||
|
import System.IO (hPutStrLn, stderr)
|
||||||
|
|
||||||
import HsFile (mkHsFile)
|
import HsFile (mkHsFile)
|
||||||
#ifndef WINDOWS
|
#ifndef WINDOWS
|
||||||
@ -130,10 +131,18 @@ main = do
|
|||||||
}
|
}
|
||||||
devel develOpts develExtraArgs
|
devel develOpts develExtraArgs
|
||||||
where
|
where
|
||||||
cabalTest cabal = do touch'
|
cabalTest cabal = do
|
||||||
_ <- cabal ["configure", "--enable-tests", "-flibrary-only"]
|
env <- getEnvironment
|
||||||
_ <- cabal ["build"]
|
case lookup "STACK_EXE" env of
|
||||||
cabal ["test"]
|
Nothing -> do
|
||||||
|
touch'
|
||||||
|
_ <- cabal ["configure", "--enable-tests", "-flibrary-only"]
|
||||||
|
_ <- cabal ["build"]
|
||||||
|
cabal ["test"]
|
||||||
|
Just _ -> do
|
||||||
|
hPutStrLn stderr "'yesod test' is no longer needed with Stack"
|
||||||
|
hPutStrLn stderr "Instead, please just run 'stack test'"
|
||||||
|
exitFailure
|
||||||
|
|
||||||
handleGhcPackagePath :: IO ([String], Maybe [(String, String)])
|
handleGhcPackagePath :: IO ([String], Maybe [(String, String)])
|
||||||
handleGhcPackagePath = do
|
handleGhcPackagePath = do
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
name: yesod-bin
|
name: yesod-bin
|
||||||
version: 1.4.17.1
|
version: 1.4.18
|
||||||
license: MIT
|
license: MIT
|
||||||
license-file: LICENSE
|
license-file: LICENSE
|
||||||
author: Michael Snoyman <michael@snoyman.com>
|
author: Michael Snoyman <michael@snoyman.com>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user