提交 82c14453 编写于 作者: M Mislav Marohnić

avoid ugly error & stack trace when git is not found on the system

上级 8167fdfe
......@@ -57,6 +57,12 @@ module Hub
args[0, 1] = expanded_args if expanded_args
send(cmd, args)
end
rescue Errno::ENOENT
if $!.message.include? "No such file or directory - git"
abort "Error: `git` command not found"
else
raise
end
end
# $ hub clone rtomayko/tilt
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册