我通常会做stack install <package-name>
,然后Stack会将其安装在~/.local/bin
位置。
我可以指定目的地位置吗?
答案 0 :(得分:6)
您可以使用--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