After upgrade capacitor 5 to 6 "cap sync" trying to execute bundle exec pod install on linux

Executing cap sync before updating skipped bundle exec pod install:
[capacitor] [warn] Skipping pod install because CocoaPods is not installed
[capacitor] [warn] Unable to find “xcodebuild”. Skipping xcodebuild clean step…

After the upgrade, it tries to execute it:
[capacitor] :heavy_multiplication_x: Updating iOS native dependencies with bundle exec pod install - failed!
[capacitor] :heavy_multiplication_x: update ios - failed!
[capacitor] [error] ERR_SUBPROCESS_COMMAND_NOT_FOUND
[ERROR] An error occurred while running subprocess capacitor.

I checked the update.js file from capacitor/cli and somehow podPath changed from “pod” to “bundle exec pod” after the upgrade and if it starts with bundle, it tries to be executed. I don’t know where this comes from. Any advice is appreciated.
From the update.js
const podPath = await config.ios.podPath;
const useBundler = podPath.startsWith(‘bundle’);
const podCommandExists = await (0, subprocess_1.isInstalled)(‘pod’);
if (useBundler || podCommandExists) {

Hmmm…I am also on Linux and just get the warnings:

[warn] Skipping pod install because CocoaPods is not installed
[warn] Unable to find "xcodebuild". Skipping xcodebuild clean step..

You sure your Capacitor CLI version is v6?

"@capacitor/cli": "^6.0.0"

So, it appears to be a configuration issue on my end then… In your case, config.ios.podPath is “pod install” and not “bundle exec pod install”. I wonder where this comes from? When I set up a new capacitor project, I get the same result as you.

I am using the latest client version as of today:
@capacitor/cli”: “6.1.2”,

The config that sets podPath is set in loadIOSConfig. Which in turn calls determineGemfileOrCocoapodPath.

Maybe you have a rogue CAPACITOR_COCOAPODS_PATH env variable or a Gemfile?

Yes, there is a gemfile and this line is causing it:
gem “cocoapods”

However, I don’t understand why there is a change of behaviour after upgrading.

But with this, I will modify the Gemfile. Thanks for the advice.