1 import Test
.Cabal
.Prelude
5 main
= withShorterPathForNewBuildStore
$ \storeDir
-> cabalTest
$ do
6 -- Windows does not natively include a touch command.
7 -- SEE: https://stackoverflow.com/questions/30011267/create-an-empty-file-on-the-commandline-in-windows-like-the-linux-touch-command
9 let options
= ["--store-dir=" ++ storeDir
, "--installdir=" ++ storeDir
]
10 -- Touch the target to see if the warning is made early before the build.
11 _
<- runM
"touch" [storeDir
</> "warn-early-overwrite"] Nothing
12 fails
$ cabalG options
"v2-install" []
13 cabalG options
"v2-install" ["--overwrite-policy=always"]