Skip to content
Snippets Groups Projects
Artem Pelenitsyn's avatar
Artem Pelenitsyn authored
* cabal init -i should autodetect author name and maintainer email (fix #8255)

Name and email are fetched from git config in the non-interactive init
already, and we plug that utility into the interactive one in this commit.

Testing becomes clunkier: the list of inputs have to hold an additional
string that will be used as the return value of
`Interactive.readProcessWithExitCode`, and here is why. Recall that this
method is used to call `git config` to perform autodetection. In the
real scenario (the `IO` instance of `Interactive`), it actually calls
out to `git`. In the testing scenario (the `PurePrompt` instance of
`Interactive`), the method simply returns the next element of the list
of pre-defined inputs. So, the list of inputs to every relevant test has
to be adjusted.

* Add test checking that username/email can be autodetected
1b8bf8cc
History

Cabal

Hackage version Stackage version Documentation Status IRC chat Matrix chat

This Cabal Git repository contains the following packages:

The canonical upstream repository is located at https://github.com/haskell/cabal.

Installing cabal-install (by downloading the binary)

Prebuilt binary releases can be obtained from https://www.haskell.org/cabal/download.html. The cabal-install binary download for your platform should contain the cabal executable.

Installing cabal-install (preferred, with cabal-install)

Assuming that you have a pre-existing, recent version of cabal-install, run:

cabal install cabal-install

To get the latest version of cabal-install. (You may want to cabal update first.)

To install the latest version from the Git repository, clone the Git repository and then run:

cabal install --project-file=cabal.project.release cabal-install

Installing cabal-install without cabal-install

Assuming you don't have a pre-existing copy of cabal-install, look into bootstrap directory.