Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
rrnewton opened this issue Nov 12, 2015 · 2 comments
Closed

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

rrnewton opened this issue Nov 12, 2015 · 2 comments
Assignees
Milestone

Comments

@rrnewton
Copy link
Contributor

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.

@drwebb
Copy link
Contributor

drwebb commented Nov 12, 2015

This seems very reasonable to me, and a pretty minimal change.
On Nov 12, 2015 7:22 AM, "Ryan Newton" [email protected] wrote:

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 patths
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/
$ 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.


Reply to this email directly or view it on GitHub
#1340.

@drwebb drwebb self-assigned this Nov 12, 2015
@mgsloan mgsloan added this to the P2: Should milestone Nov 12, 2015
@drwebb
Copy link
Contributor

drwebb commented Nov 14, 2015

@rrnewton: local-bin-path relative tot the project dir should be the behavior now with f8d0129

drwebb pushed a commit that referenced this issue Nov 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants