cabal init --overwrite: openFile: app/Main.hs: does not exist (No such file or directory)
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
**Describe the bug**
cabal init --overwrite: openFile: app/Main.hs: does not exist (No such file or directory)
**To Reproduce**
Steps to reproduce the behavior:
```
$ cabal init -n
[...]
$ cabal init -n --overwrite
Log: Guessing dependencies...
Log: Using cabal specification: 3.0
Warning: unknown license type, you must put a copy in LICENSE yourself.
Log: CHANGELOG.md already exists. Backing up old version in CHANGELOG.md.save0
Log: Overwriting file CHANGELOG.md...
Log: /tmp/tmp.ndqJzZ9Tz3 already exists. Backing up old version in /tmp/tmp.ndqJzZ9Tz3.save0
Log: Overwriting directory .//tmp/tmp.ndqJzZ9Tz3...
/tmp/tmp.ndqJzZ9Tz3/app/Main.hs: openFile: does not exist (No such file or directory)
```
Please use version-prefixed commands (e.g. `v2-build` or `v1-build`) to avoid ambiguity.
**Expected behavior**
no error, the existing .cabal file is overwritten
**System information**
- cabal 3.8.1.0-rc1
cc @emilypi @ptkato
Contributor guide
Assessment
This issue has not been assessed yet.