yonaskolb / Mint

A package manager that installs and runs executable Swift packages
MIT License
2.27k stars 122 forks source link

How to link globally when doing mint bootstrap? #136

Closed acecilia closed 5 years ago

acecilia commented 5 years ago

Hi: In my Mintfile I have:

realm/SwiftLint@0.30.1

I expected to be able to do mint bootstrap and then swiftlint help, but that last command does not work straight away because mint bootstrap is not linking the installed packages globally. Is there any way to do that?

Thanks!

yonaskolb commented 5 years ago

The Mintfile is designed for local usage that doesn't affect the global state. If you really want to link this globally though you can run

mint install SwiftLint

which will look up Swiftlint in the mintfile and install it both locally and globally.

acecilia commented 5 years ago

Cool, that is what is seemed like. I can look into adding an option to mint, so it is possible to install a mintfile globally. What do you think?

yonaskolb commented 5 years ago

Yeah sure, sounds good 👍

guillaumealgis commented 5 years ago

I really like the --link option added to bootstrap (thank you @acecilia!), however I think it's a little inconsistent with how install works:

While the options themselves are self-explicit and clear, I think the default behavior should be the same for both commands.

I just started using mint so I'm not familiar yet with how it works in details, but couldn't the two commands be merged? For example mint install with no argument could install all dependencies in the Mintfile (a bit like what Python's pip does when called as pip -r requirements.txt for example).

Thoughts?

acecilia commented 5 years ago

Hi @guillaumealgis. I also mentioned that issue in https://github.com/yonaskolb/Mint/pull/137 and I think @yonaskolb is aware of it. Such change requires a major version bump, so it may take some time until it’s done and released