Closed 00-kat closed 9 months ago
@cd-CreepArghhh Thanks for filing this issue!
This is indeed an unexpected behavior, however I'm no longer using Windows recently so maybe that's why it remains untouched.
I'll have a look into it and hopefully get a fix done real soon. Stay tuned!
Looks like a regression brought in #537. I guess the ideal precedence would be CLI flags > env vars > config, right? cc @cd-CreepArghhh
I guess the ideal precedence would be CLI flags > env vars > config, right?
Yeah, that's what I thought would make the most sense.
By the way, I just installed pacaptr on WSL (Ubuntu) too, and the same problem still exists, so it's probably not a Windows-only issue, unless it's somehow an issue specific to Windows and WSL (which I doubt).
~/.config/pacaptr/pacaptr.toml
:
# This enforces the use of `install` instead of
# `reinstall` in `pacaptr -S`
needed = true
# Explicitly set the default package manager
default_pm = "pip"
[I] user@hostname ~> pacaptr -Q
Running `pip list`
Package Version
---------------------- -------------
bla bla bla 1.0.0
more useful package 2.0.0
[I] user@hostname ~> pacaptr --using apt -Q
Running `pip list`
Package Version
---------------------- -------------
bla bla bla 1.0.0
more useful package 2.0.0
@cd-CreepArghhh Yes, you're right. I meant to say that this feature is mostly intended for Windows users, but it's true that it could also be used on Linux (but maybe not as often), which is just a possible explanation for why it hasn't been reported till just then.
It'll be a very quick fix, nothing to be worried about on your side!
Issue
Trying to use the
--using
or the--pm
options to change the package manager have to effect if the setting is overridden by a config.toml. I'm on Windows 10.My config file (at
~\.config\pacaptr\pacaptr.toml
looks like this:Expected Outcome
Using the
--using
or the--pm
options changes the package manager (unless I'm using them wrong):Actual Outcome
When I try to use Chocolatey or Scoop instead, it still runs Winget (P.S. Scoop has a package named fastfetch, while Chocolatey and Winget don't):