feat: configurable `pod` command / try local `bundle exec pod`
See original GitHub issueFeature Request
Description
Some projects may chose to not install pod
globally, but locally via bundle
. In this case, pod
is normally not in the $PATH
. However, it would be accessible via bundle exec pod
.
Because cap
expects pod
to be accessible from the $PATH
, any command using pod
would fail with that setup.
Currently we work around this in our project by generating a binstub for pod (bundle binstubs cocoapods
) and adding it to the $PATH
using an .envrc
file like this:
# Add the gem binstubs directory to `PATH`.
export PATH="$PWD/bin:$PATH"
Platform(s)
macOS / iOS
Preferred Solution
Not entirely sure.
It would be nice, if the command for pod
could be configured or alternatively the path to the bin could be configured explicitly. Both solutions could be supported simultaneously. I would not put this in the capacitor.config.json
, but rather add a capacitor
key to the package.json
:
{
"capacitor": {
"pod": "bundle exec pod"
// or alternatively:
"pod": "./bin/pod"
}
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (3 by maintainers)
Top GitHub Comments
Thanks for mentioning. Thatβd be fine as well though. If users for some reason cannot use binstubs, they could create an executable (
chmod +x
) shell script instead:We use a monorepo setup that looks like this: (irrelevant files & directories omitted)
For our tool chain version management we have (among others) these entries in our
Brewfile
:And this
.envrc
:And this
.bundle/config
:And hereβs the contents created by
bundle install
:Our
Gemfile
looks like this:And the
Pluginfile
: