From bfe4dd1f1e11aea45ca43e2726873a4dbd2eb624 Mon Sep 17 00:00:00 2001 From: Artem Tykhonov Date: Thu, 19 Sep 2024 16:28:15 +0300 Subject: [PATCH] Fix code scanning alert #11: Use of `Kernel.open` or `IO.read` or similar sinks with a non-constant value Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- fastlane/lib/fastlane/auto_complete.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastlane/lib/fastlane/auto_complete.rb b/fastlane/lib/fastlane/auto_complete.rb index 333a419b8d8..37ade00d3b6 100644 --- a/fastlane/lib/fastlane/auto_complete.rb +++ b/fastlane/lib/fastlane/auto_complete.rb @@ -45,7 +45,7 @@ def self.execute(args, options) custom_commands = options.custom.to_s.split(',') Fastlane::SHELLS.each do |shell_name| - open("#{fastlane_conf_dir}/completions/completion.#{shell_name}", 'a') do |file| + File.open("#{fastlane_conf_dir}/completions/completion.#{shell_name}", 'a') do |file| default_line_prefix = Helper.bundler? ? "bundle exec " : "" file.puts(self.get_auto_complete_line(shell_name, "#{default_line_prefix}fastlane"))