`cabal init -n` fails when `cabal` is not in `$PATH`
Open
attention: pr-welcome
cabal-install: cmd/init
type: bug
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
**Describe the bug**
`cabal init -n` fails when `cabal` is not in `$PATH`. seems like it wants to call itself?
```
cabal: readCreateProcessWithExitCode: posix_spawnp: does not exist (No such file or directory)
```
**To Reproduce**
Steps to reproduce the behavior:
Ensure `cabal` is not in `$PATH`
```
$ mkdir mypackage
$ cd mypackage
$ /path/to/cabal init -n
```
**Expected behavior**
The package is initialized
**System information**
- NixOS
- `cabal` 3ae04882fde1b344150581eebca7291800ec3dd0
- `GHC` 9.4.8
**Additional context**
Contributor guide
Assessment
This issue has not been assessed yet.