mpm icon indicating copy to clipboard operation
mpm copied to clipboard

Use source flag or node-style query key (`path:`) to lock 1 specific origin

Open zm-cttae opened this issue 2 years ago • 3 comments

I'd prefer to install a package from only file exchange sometimes, or github sometimes. Especially when names could clash!
Preferably, we should have the choice to force a specific source and then error out on 404 from that origin.

zm-cttae avatar Apr 10 '23 16:04 zm-cttae

As it is currently, it searches file exchange first, and then github. You can pass --github-first or -g to search github first. Does that help with what you're looking for, or slightly different?

mobeets avatar Apr 10 '23 17:04 mobeets

This would be about locking search to one registry - in case we want to avoid unrelated GitHub scripts for example!

zm-cttae avatar Apr 10 '23 17:04 zm-cttae

Gotcha, this sounds like a pretty simple fix. Mostly just adding a new name-value argument, -s for source, and then updating the function findUrl. If you want to take a stab at it and make a pull-request, please do!

mobeets avatar Apr 10 '23 17:04 mobeets