堆栈安装可执行文件到自定义位置

Sib*_*ibi 1 haskell haskell-stack

我通常会stack install <package-name>和Stack一起安装它~/.local/bin.

我有办法指定目的地位置吗?

Sib*_*ibi 7

您可以使用它--local-bin-path来指定自定义目标路径.演示:

$ 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
Run Code Online (Sandbox Code Playgroud)