Specify executable path?

99 views
Skip to first unread message

Casper T. Hansen

unread,
Oct 10, 2019, 4:01:44 PM10/10/19
to haskell-stack
Is there a way to instruct stack on where to place the executable once it has been built?
Currently I use: find ./.stack-work/install/x86_64-linux/ -name appName-exe
but it seems like something, where I just cannot find the right command.

Han Joosten

unread,
Oct 10, 2019, 7:02:36 PM10/10/19
to haskell-stack
As far as I know, this is by design. 
If you just want to execute it in your sandbox, you can run `stack exec appName.exe`
If you want the executable to be available in your path, build it with `stack install`


Op donderdag 10 oktober 2019 22:01:44 UTC+2 schreef Casper T. Hansen:

Michael Snoyman

unread,
Oct 11, 2019, 3:04:47 AM10/11/19
to Casper T. Hansen, haskell-stack
You can use `stack install` or `stack build --copy-bins` with `--local-bin-path`

--
You received this message because you are subscribed to the Google Groups "haskell-stack" group.
To unsubscribe from this group and stop receiving emails from it, send an email to haskell-stac...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/haskell-stack/3b77b516-f2c6-4578-bdc3-c5a535d38e2c%40googlegroups.com.

Casper T. Hansen

unread,
Oct 11, 2019, 3:26:16 AM10/11/19
to haskell-stack
Ahh I will try this! 
I need to extract the binary after building in a docker container, so this seems to be a good approach.
Thank you.


fredag den 11. oktober 2019 kl. 09.04.47 UTC+2 skrev Michael Snoyman:
You can use `stack install` or `stack build --copy-bins` with `--local-bin-path`

On Thu, Oct 10, 2019 at 11:01 PM Casper T. Hansen <c.thul...@gmail.com> wrote:
Is there a way to instruct stack on where to place the executable once it has been built?
Currently I use: find ./.stack-work/install/x86_64-linux/ -name appName-exe
but it seems like something, where I just cannot find the right command.

--
You received this message because you are subscribed to the Google Groups "haskell-stack" group.
To unsubscribe from this group and stop receiving emails from it, send an email to haskel...@googlegroups.com.

Casper T. Hansen

unread,
Oct 11, 2019, 3:26:52 AM10/11/19
to haskell-stack
Thank you for your answer, my case is that I need to extract the binary after building in a docker container, so Michael Snoyman's approach seems to fit better.
Reply all
Reply to author
Forward
0 new messages