Permalink
Browse files

Give accurate error message when trying to add entry without root. Cl…

…oses #3
  • Loading branch information...
1 parent 999190a commit d321d47a5f687e9395bbad98a1ea6a60bde39188 @bjeanes committed Apr 6, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 bin/ghost
View
3 bin/ghost
@@ -34,6 +34,9 @@ else
rescue SocketError
$stderr.puts "Cannot find ip for host"
exit 3
+ rescue Errno::EACCES
+ $stderr.puts "Please re-run as root or using sudo"
+ exit 3
rescue StandardError
$stderr.puts "Cannot overwrite an existing entry. Use the modify subcommand"
exit 3

0 comments on commit d321d47

Please sign in to comment.