Skip to content

Commit

Permalink
Merge a656a2b into e9f3e2f
Browse files Browse the repository at this point in the history
  • Loading branch information
Vasundhara Jagdale committed Jun 7, 2019
2 parents e9f3e2f + a656a2b commit 38d5b8b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/train/extras/command_wrapper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,10 @@ class CommandWrapper
include_options WindowsCommand

def self.load(transport, options)
if transport.os.unix?
msg = transport.run_command("whoami").stdout
if msg.match?(/Please login as the user/)
raise Train::UserError.new("Sudo failed: #{msg}")
elsif transport.os.unix?
return nil unless LinuxCommand.active?(options)
res = LinuxCommand.new(transport, options)
verification_res = res.verify
Expand Down

0 comments on commit 38d5b8b

Please sign in to comment.