Class: Fastlane::Helper::CarthageCacheFtpsHelper

Inherits:
Object
  • Object
show all
Defined in:
lib/fastlane/plugin/carthage_cache_ftps/helper/carthage_cache_ftps_helper.rb

Constant Summary collapse

UI =
FastlaneCore::UI

Class Method Summary collapse

Class Method Details

.ask_password(message: "Passphrase for FTP: ", confirm: true) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/fastlane/plugin/carthage_cache_ftps/helper/carthage_cache_ftps_helper.rb', line 8

def self.ask_password(message: "Passphrase for FTP: ", confirm: true)
  ensure_ui_interactive
  loop do
    password = UI.password(message)
    if confirm
      password2 = UI.password("Type passphrase again: ")
      if password == password2
        return password
      end
    else
      return password
    end
    UI.error("Passphrases differ. Try again")
  end
end