Feature request: ability to install executables into a specific directory
还没有人认领这个 Issue。
评估
调研方向
Start with pkgx's command-line option handling, the documented virtual-environment behavior, and the cache behavior referenced in the issue. Define how --install-dir should append or recreate contents, handle cached executables and multi-file packages, and preserve the requested Windows use case. Done means the command places selected package contents in the custom directory without deleting existing files and can reuse the regular cache.
由索引模型根据 Issue 内容生成。
描述
I want to create my own virtual environment, but not using this method: https://docs.pkgx.sh/pkgx/pkgx#virtual-environments
Instead, I would like pkgx to gather all the selected packages and install them into a custom location, as a flat list of files. I would use this specifically for single-file executables.
I would imagine doing something like this: pkgx --install-dir "some-location" gum glow hx@123
An ls of some-location would produce:
> ls some-location
gum
glow
hx
I would then do:
export PATH=some-location:$PATH
gum --version
glow --version
hx --version
I would expect this method to download the tools to the regular pkgx cache location, and that install-dir would just copy (or link) the binaries to some-location. If I re-run the command, it should see that the binaries are already available in the cache, and then just re-copy/re-link them (if needed).
I wouldn't want the command to delete existing contents in some-location, but instead, it should append to some-location:
> ls some-location
(empty)
> pkgx --install-dir some-location gum
> ls some-location
gum
> pkgx --install-dir some-location glow
> ls some-location
gum
glow
Additional flags could be added that could request a recreate of some-location, instead of an append.
I wouldn't use this feature for packages that consist of multiple files, but if someone chooses to do so, I would expect the contents of that package to be copied into some-location.
I am already doing something like this manually using ubi, since a long Path environment variable on Windows becomes problematic. This is to overcome the following issue I am having with Mise: https://github.com/jdx/mise/discussions/5830
Seeing how the + syntax sets the Path (https://docs.pkgx.sh/appendix/faq#where-do-you-put-pkgs), it is clear that long fully-qualified locations are preferred by pkgx, which will surely cause similar issues on Windows as it does for Mise. Having the ability to copy the tools into some-location so that we can control our own Path, would be very helpful.
Similar functionality exists in aqua: https://aquaproj.github.io/docs/guides/build-container-image/#notes-of-aqua-cp
- 主要语言
- Rust
- 星标
- 9.9k
- 派生
- 1.4k
- 平均合并
- 1 天 17 小时
- 30 天内合并 PR
- 1
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
pkgxdev/pkgx 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 45/100
-
难度 4/5 3-5 天 新手友好度 35/100
-
`pkgx --update` 未关闭
难度 4/5 3-5 天 新手友好度 52/100
-
难度 4/5 3-5 天 新手友好度 25/100
-
难度 4/5 3-5 天 新手友好度 35/100
相似的 Issue
-
bug github_actions
难度 2/5 1-3 小时 新手友好度 75/100
registrystack/registry-stack#1393 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
longbridge/gpui-kit#3223 ·
-
bug engine
难度 2/5 1-3 小时 新手友好度 65/100
rocky-data/rocky#2181 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
oasisprotocol/oasis-sdk#2523 ·
-
bot:ai-assisted component:indexer QA-roadmap status:untriaged
难度 2/5 1-3 小时 新手友好度 75/100
midnightntwrk/midnight-indexer#1557 ·