Top Level Namespace
Instance Method Summary collapse
Instance Method Details
#whoami_root(cmd) ⇒ Object
1 2 3 4 5 |
# File 'lib/run-as-root.rb', line 1 def whoami_root(cmd) `#{cmd}`.strip.chomp == 'root' $stderr.puts $run_as_root_msg || 'You need to be root to run this command.' exit $run_as_root_exit_code || 1 end |