lib/leap_cli/commands/pre.rb in leap_cli-1.7.3 vs lib/leap_cli/commands/pre.rb in leap_cli-1.7.4
- old
+ new
@@ -45,9 +45,13 @@
# :verbose -- integer log verbosity level
# :log -- log file path
# :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)
# load Leapfile