haskell / haskell/cabal

`cabal init -n` fails when `cabal` is not in `$PATH`

Open
#9,687 6 comments 1 reaction 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.