commercialhaskell / commercialhaskell/stack
Invalid template error for `stack new` could be clearer
- Dominant language
- Haskell
- Stars
- 4.1k
- Forks
- 850
- Avg merge
- 10h 37m
- Merged PRs (30d)
- 4
Description
```
~/tmp $ stack new repro https://github.com/sjakobi/stack-templates/blob/master/tasty-travis.hsfiles
Downloading template "https://github.com/sjakobi/stack-templates/blob/master/tasty-travis.hsfiles" to create project "repro" in repro/ ...
The template "https://github.com/sjakobi/stack-templates/blob/master/tasty-travis.hsfiles" is invalid and could not be used. The error was: "InvalidInput """
~/tmp $ stack --version
Version 1.3.3, Git revision 87068d8edb64e81f4062ae889472ef74452a2b97 (dirty) (4441 commits) x86_64 hpack-0.15.0
```
It took a me a while to realize that should have used the link to the "raw" file instead of the html page. (In this particular case I could have used the template name of course)
To make the error message more helpful I'd suggest that it should cite the file, roughly like this:
```
Downloading template "https://github.com/sjakobi/stack-templates/blob/master/tasty-travis.hsfiles" to create project "repro" in repro/ ...
The template "https://github.com/sjakobi/stack-templates/blob/master/tasty-travis.hsfiles" is invalid and could not be used:
...
The error was: "InvalidInput """
```
Contributor guide
Assessment
This issue has not been assessed yet.