fastlane/lib/fastlane/actions/prompt.rb in fastlane-2.94.0.beta.20180501050030 vs fastlane/lib/fastlane/actions/prompt.rb in fastlane-2.94.0

- old
+ new

@@ -16,11 +16,15 @@ end_tag = params[:multi_line_end_keyword] UI.important("Submit inputs using \"#{params[:multi_line_end_keyword]}\"") user_input = STDIN.gets(end_tag).chomp.gsub(end_tag, "").strip else # Standard one line input - user_input = STDIN.gets.chomp.strip while (user_input || "").length == 0 + if params[:secure_text] + user_input = STDIN.noecho(&:gets).chomp while (user_input || "").length == 0 + else + user_input = STDIN.gets.chomp.strip while (user_input || "").length == 0 + end end return user_input end @@ -48,9 +52,13 @@ FastlaneCore::ConfigItem.new(key: :ci_input, description: "The default text that will be used when being executed on a CI service", default_value: ''), FastlaneCore::ConfigItem.new(key: :boolean, description: "Is that a boolean question (yes/no)? This will add (y/n) at the end", + default_value: false, + is_string: false), + FastlaneCore::ConfigItem.new(key: :secure_text, + description: "Is that a secure text (yes/no)?", default_value: false, is_string: false), FastlaneCore::ConfigItem.new(key: :multi_line_end_keyword, description: "Enable multi-line inputs by providing an end text (e.g. 'END') which will stop the user input", optional: true,