From 98685a099fdde0b0424b5665debbe508a5c697e5 Mon Sep 17 00:00:00 2001 From: Victoria Ashworth <15619084+vashworth@users.noreply.github.com> Date: Fri, 19 Apr 2024 10:21:04 -0500 Subject: [PATCH] Replace CocoaPods deprecated `exists?` with `exist?` (#147056) Fixes https://github.com/flutter/flutter/issues/147041. --- packages/flutter_tools/bin/podhelper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/flutter_tools/bin/podhelper.rb b/packages/flutter_tools/bin/podhelper.rb index a26f324e4a4f..64e163ea85d3 100644 --- a/packages/flutter_tools/bin/podhelper.rb +++ b/packages/flutter_tools/bin/podhelper.rb @@ -324,12 +324,12 @@ def flutter_install_plugin_pods(application_path = nil, relative_symlink_dir, pl # If Swift Package Manager is enabled and the plugin has a Package.swift, # skip from installing as a pod. - swift_package_exists = File.exists?(File.join(relative, platform_directory, plugin_name, "Package.swift")) + swift_package_exists = File.exist?(File.join(relative, platform_directory, plugin_name, "Package.swift")) next if swift_package_manager_enabled && swift_package_exists # If a plugin is Swift Package Manager compatible but not CocoaPods compatible, skip it. # The tool will print an error about it. - next if swift_package_exists && !File.exists?(File.join(relative, platform_directory, plugin_name + ".podspec")) + next if swift_package_exists && !File.exist?(File.join(relative, platform_directory, plugin_name + ".podspec")) pod plugin_name, path: File.join(relative, platform_directory) end