Permalink
Browse files

Present the user with a more helpful error message if they do not run…

… through sudo instead of blowing up on nil.strip
  • Loading branch information...
1 parent 79eed79 commit 4668675af23e42e527689767e724869136637847 @schubert schubert committed Mar 21, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 libraries/user.rb
View
@@ -1,3 +1,5 @@
+raise "sudo to root before running" if ENV['SUDO_USER'].nil?
+
WS_USER = ENV['SUDO_USER'].strip
WS_HOME = ENV['HOME']
WS_LIBRARY = "#{WS_HOME}/Library"

0 comments on commit 4668675

Please sign in to comment.