Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

stack install executable to a custom location

I usually do stack install <package-name> and Stack installs it in the location ~/.local/bin.

Is there a way for me to specify the destination location ?

like image 611
Sibi Avatar asked Dec 17 '22 19:12

Sibi


1 Answers

You can use the --local-bin-path to specify your custom destination path. Demo:

$ stack install tldr --local-bin-path /home/sibi
Copying from /home/sibi/github/tldr-hs/.stack-work/install/x86_64-linux/lts-12.10/8.4.3/bin/tldr to /home/sibi/tldr

Copied executables to /home/sibi:
- tldr

Warning: Installation path /home/sibi not found on the PATH environment variable.
$ ls -lh /home/sibi/tldr
-rwxr-xr-x 1 sibi sibi 3.0M Dec 23 01:37 /home/sibi/tldr
like image 91
Sibi Avatar answered Dec 20 '22 19:12

Sibi