-
Notifications
You must be signed in to change notification settings - Fork 691
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cabal init -i should autodetect author name and maintainer email (#8267)
* 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
- Loading branch information
1 parent
2e9af5b
commit 1b8bf8c
Showing
4 changed files
with
37 additions
and
8 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
synopsis: cabal init -i should autodetect author name and maintainer email (fix #8255) | ||
packages: cabal-install | ||
issues: #8255 | ||
prs: #8267 |