yonaskolb / Mint

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

When multiple executables are found, Mint should list them before asking which one to run #143

Closed guillaumealgis closed 4 years ago

guillaumealgis commented 5 years ago

When running a package with multiple executable targets for the first time, Mint will ask the user which executable it should run :

❯ mint run IBDecodable/IBLinter
🌱  Finding latest version of IBLinter
🌱  Cloning IBLinter 0.4.16
🌱  Resolving package
🌱  Building package
🌱  Installed IBLinter 0.4.16
There are multiple executables, which one would you like to run?

The issue here is that the user has no idea what it is expected of him/her.

I think Mint should list the executable when asking this question. I've seen on some CLI tools list such choices with something like :

❯ mint run IBDecodable/IBLinter
🌱  Finding latest version of IBLinter
🌱  Cloning IBLinter 0.4.16
🌱  Resolving package
🌱  Building package
🌱  Installed IBLinter 0.4.16
There are multiple executables, which one would you like to run?
[1] iblinter
[2] iblinter-tools

And then either responding with the executable name or its number in the list should allow the process to continue.

Note that it's not a very serious issue, as merely pressing the enter key lists the executables and it then become fairly obvious what is expected of the user.

I just think it could be a nice improvement :)

yonaskolb commented 4 years ago

Yes agree. I'm pretty sure that used to be the behaviour, so perhaps it's a regression

yonaskolb commented 4 years ago

Released in 0.13.0