diff options
author | elijah <elijah@riseup.net> | 2015-06-26 16:11:01 -0700 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2015-06-26 16:11:01 -0700 |
commit | ac28764f2b227d25a2b9d2415199ff19af8e201a (patch) | |
tree | 7ff2c8bfd8f7fe21cf5de5295eb0fc2f69b403c7 /lib | |
parent | a48a10fa048c534ba82536126a2a951090675d98 (diff) |
ensure that `leap` is not run as root.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/leap_cli/commands/pre.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/leap_cli/commands/pre.rb b/lib/leap_cli/commands/pre.rb index 3b316a4..c531065 100644 --- a/lib/leap_cli/commands/pre.rb +++ b/lib/leap_cli/commands/pre.rb @@ -47,6 +47,10 @@ module LeapCli; module Commands # :color -- true or false, to log in color or not. # def initialize_leap_cli(require_provider, options={}) + if Process::Sys.getuid == 0 + bail! "`leap` should not be run as root." + end + # set verbosity options[:verbose] ||= 1 LeapCli.set_log_level(options[:verbose].to_i) |