commercialhaskell / commercialhaskell/stack

Having relative paths on $PATH breaks stack (with system-ghc)

Open
#5,033 4 comments 0 reactions 0 assignees View on GitHub
resolution: upstream issue
Dominant language
Haskell
Stars
4.1k
Forks
850
Avg merge
10h 37m
Merged PRs (30d)
4

Description

### Steps to reproduce

With a relative path in `$PATH` (e.g. [for this trick](https://thoughtbot.com/blog/git-safe))

```
% echo $PATH
.git/safe/../../bin:/home/greg/.local/bin:/bin:/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/usr/bin
```

try to build something with system GHC.

### Expected

Should work :)

### Actual

```
InvalidAbsFile "/path/to/current/dir/.git/safe/../../bin/ghc-8.6.5"
```

### Stack version

```
% stack --version
Version 2.1.3.1 aarch64
```

### Method of installation

* FreeBSD pkg

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.