Skip to content

local-bin-path is not relative to the stack.yaml that specifies it #1340

@rrnewton

Description

@rrnewton

We like to have projects that build all the stack-built binaries into ./bin within the project directory so that other scripts can easily find them. But we were surprised to find that relative paths are interpreted relative to wherever stack runs, not the stack.yaml file containing the path.

Steps to reproduce:

With stack 0.1.6.0., put following line in stack.yaml:

local-bin-path: ./bin/

Switch to a subdirectory and build:

$ mkdir ./bin/
$ mkdir ./foo/
$ cd foo
$ stack build 
No directory could be located matching the supplied path: ./bin/

Expected behavior:

That ./bin is relative to the stack.yaml file that contains it.

Actual:

That local-bin-path is relative to the directory in which stack build is executed, which can be a deep subdirectory because of the automatic "look upwards to find stack.yaml" behavior.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions