Skip to content

Commit

Permalink
Check if we are root in the installer in a more ruby way.
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Catty committed May 6, 2009
1 parent cca03db commit a3ea14e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
pkg
html
TODO
3 changes: 1 addition & 2 deletions install.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
EXECUTABLE_PATH = "translate"

def check_privileges
userid = `id -u`.chomp.to_i
unless userid.zero?
unless Process.uid.zero?
puts "You must have root's privileges to install translate."
interrupt
end
Expand Down

0 comments on commit a3ea14e

Please sign in to comment.