diff --git a/lib/vos/drivers/ssh.rb b/lib/vos/drivers/ssh.rb index 7d0ef9e..39e8ed5 100644 --- a/lib/vos/drivers/ssh.rb +++ b/lib/vos/drivers/ssh.rb @@ -106,8 +106,7 @@ def home unless @home command = 'cd ~; pwd' code, stdout, stderr = exec command - raise "can't execute '#{command}'!" unless code == 0 - @home = stdout.gsub("\n", '') + @home = code == 0 ? stdout.gsub("\n", '') : '' end @home end @@ -138,4 +137,4 @@ def hacked_exec!(ssh, command, merge_stdout_and_stderr = false, &block) end end end -end \ No newline at end of file +end