Closed akhra closed 9 years ago
Please note that specifying a nonexistent file as the license-file
does stop cabal copy
from succeeding, which is one of the cabal
commands that Halcyon currently uses under the hood:
$ git clone https://github.com/mietek/hello
$ cd hello
$ vi hello.cabal
$ git diff
diff --git a/hello.cabal b/hello.cabal
index eaa71ea..1cf2ae4 100644
--- a/hello.cabal
+++ b/hello.cabal
@@ -2,6 +2,7 @@ name: hello
version: 1.0
build-type: Simple
cabal-version: >= 1.20
+license-file: nonexistent
executable hello
main-is: Main.hs
$ cabal sandbox init
$ cabal configure
Resolving dependencies...
Configuring hello-1.0...
Warning: The 'license-file' field refers to the file 'nonexistent' which does
not exist.
$ cabal build
Building hello-1.0...
Preprocessing executable 'hello' for hello-1.0...
[1 of 1] Compiling Main ( Main.hs, dist/build/hello/hello-tmp/Main.o )
Linking dist/build/hello/hello ...
$ cabal copy
cabal: nonexistent: does not exist
$ echo $?
1
Cabal gives an error message when
license-file: <file>
is specified in config but<file>
is not present; this doesn't actually make the build fail in a local environment, but is interpreted as a build failure by haskell-on-heroku. Granted this is user error at its finest, but I think anything that won't stopcabal run
should probably pass here too.