Feature request: ability to install executables into a specific directory
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- Rust
- Star
- 9.9k
- Fork
- 1.4k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Chúng tôi chưa kiểm tra các tệp thiết lập môi trường của dự án này. Hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của pkgxdev/pkgx
-
`--query` flag goneĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
-
`pkgx --update`Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Issue tương tự
-
`categorize_command` has no `uv` arm, so every `rtk uv …` row counts as `other` in the ecosystem mixĐang mởarea:api bug good first issue priority:low
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
rtk-ai/rtk#4316 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 92/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area/cli kind/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
good first issue open-endedness: low type: new feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100