Skip to content

Commit

Permalink
Fix uninitialized constant error
Browse files Browse the repository at this point in the history
Signed-off-by: Vasu1105 <vasundhara.jagdale@msystechnologies.com>
  • Loading branch information
Vasu1105 committed Jun 11, 2019
1 parent e36d9a8 commit 0521bfe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/train/platforms/detect/helpers/os_common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def command_output(cmd)
# When you try to execute command using ssh connction as root user and you have provided ssh user identity file
# it gives standard output to login as authorised user other than root. To show this standard ouput as an error
# to user we are matching the string of stdout and raising the error here so that user gets exact information.
if @backend.class == Train::Transports::SSH::Connection && res =~ /Please login as the user/
if @backend.class.to_s == "Train::Transports::SSH::Connection" && res =~ /Please login as the user/
raise Train::UserError, "SSHFailed: #{res}"
end
res.strip! unless res.nil?
Expand Down

0 comments on commit 0521bfe

Please sign in to comment.