Closed ainame closed 4 years ago
This turned out that I could avoid that issue by having a wrapper shell script for SwiftLint in our project.
scripts/swiftlint.sh
#!/usr/bin/env bash
/usr/bin/env mint run swiftlint "$@"
But not sure if my original suggestion makes sense to others. So will leave this for a while.
This seems to be duplicated with https://github.com/yonaskolb/Mint/pull/73
Hi. Our project started using Mint and had an issue where our CLI toolings require an absolute/relative path of executables. e.g. danger-ruby-swiftlint requires the path to run linting. https://github.com/ashfurrow/danger-ruby-swiftlint/blob/master/ext/swiftlint/swiftlint.rb#L30-L38 I guess it's not a rare case that checks the executable path to see if a tool is installed.
As far as I'm aware, Mint doesn't support an option or a command to print such paths yet (, does it?). Although I know the default directory to install packages is "/usr/local/lib/mint/" and could work out the executable path by myself eventually. But in order to integrate CLI tools managed by Mint and other CI stuff smoothly, I think providing such ability is the most efficient way to do it.
Let's say I installed SwiftLint v0.38.0 via Mint now and found this path.
I can then work out the path from
MINT_PATH
+Mintfile
with using something like the following command.The problem with this is that
Dangerfile
😂So it would be great if Mint has the ability to print the absolute path of the executable by default. My suggestion for the comannd is to integrate such ability with existing command and add an option called something like "--print-executable-path" or add a subcommand called "which" that follows
which
orgem which
command.WDYT?