1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

Bug #352: oneuser gets only the first line if a file is specified

This commit is contained in:
Javi Fontan 2010-10-07 14:30:38 +02:00
parent 070e1db066
commit 7b22fc9cd6

View File

@ -148,7 +148,7 @@ when "create"
if ops[:read_file]
begin
password = File.read(ARGV[1])
password = File.read(ARGV[1]).split("\n").first
rescue
puts "Can not read file: #{ARGV[1]}"
exit -1
@ -218,7 +218,7 @@ when "passwd"
if ops[:read_file]
begin
password = File.read(ARGV[1])
password = File.read(ARGV[1]).split("\n").first
rescue
puts "Can not read file: #{ARGV[1]}"
exit -1