Skip to content

Commit

Permalink
Fix error-prone shell command status check
Browse files Browse the repository at this point in the history
  • Loading branch information
revolter committed Nov 3, 2022
1 parent 1a27157 commit ab46738
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fastlane_core/lib/fastlane_core/cert_checker.rb
Expand Up @@ -160,13 +160,13 @@ def self.install_wwdr_certificate(cert_alias)
import_command = "curl -f -o #{filename} #{url} && security import #{filename} #{keychain}"
UI.verbose("Installing WWDR Cert: #{import_command}")

stdout, stderr, _status = Open3.capture3(import_command)
stdout, stderr, status = Open3.capture3(import_command)
if FastlaneCore::Globals.verbose?
UI.command_output(stdout)
UI.command_output(stderr)
end

unless $?.success?
unless status.success?
UI.verbose("Failed to install WWDR Certificate, checking output to see why")
# Check the command output, WWDR might already exist
unless /The specified item already exists in the keychain./ =~ stderr
Expand Down

0 comments on commit ab46738

Please sign in to comment.