watson-ruby
watson-ruby copied to clipboard
Crossplatform password block needed, not sure if current method is safe either [lib/watson/bitbucket.rb]
filename : lib/watson/bitbucket.rb line # : 99 tag : fix md5 : 63005a1dc174a3a608b3efa79a983baa
# [fix] - Crossplatform password block needed, not sure if current method is safe either
# Block output to tty to prevent PW showing, Linux/Unix only :(
print BOLD + "Password: " + RESET
system "stty -echo"
_password = $stdin.gets.chomp
system "stty echo"
print "\n"
if _password.empty?
Printer.print_status "x", RED
print BOLD + "Input is blank. Please enter your password!\n\n" + RESET
return false
end
# HTTP Request to check if Repo exists and user has access
# http://confluence.atlassian.com/display/BITBUCKET/Use+the+Bitbucket+REST+APIs
# Create options hash to pass to Remote::http_call