yonaskolb / Mint

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

Can `mint run` be used without an internet connection? #273

Closed colejd closed 6 months ago

colejd commented 6 months ago

Hello!

When I run mint run _ without an internet connection, it fails. For example:

➜ mint run swiftgen
🌱 Finding latest version of SwiftGen
🌱  Git repo not found at "https://github.com/SwiftGen/SwiftGen.git"

Is this desired behavior? SwiftGen is already installed, and I don't want mint run to update my dependencies without asking me first. I imagine that's what the --no-install option is for, but it still doesn't bypass the network check:

➜ mint run --no-install swiftgen
🌱 Finding latest version of SwiftGen
🌱  Git repo not found at "https://github.com/SwiftGen/SwiftGen.git"

What should I do?

yonaskolb commented 6 months ago

Hi @colejd. If no version is specified, mint fetches the newest version from the remote repo. You can specify a version with mint run swiftgen@6.6.2 or by adding the package and version to a Mintfile

colejd commented 6 months ago

Gotcha, thanks!