From ec437b4d8e00e7fd3dd237caa18c0cbb61cf0e13 Mon Sep 17 00:00:00 2001 From: Josh Elser Date: Wed, 28 Mar 2018 10:29:04 -0400 Subject: [PATCH] HBASE-20304 Flip return-values to true and let users turn it off. --- bin/hirb.rb | 8 ++++---- hbase-shell/src/main/ruby/shell.rb | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/hirb.rb b/bin/hirb.rb index 6e92d51eb9..1767065816 100644 --- a/bin/hirb.rb +++ b/bin/hirb.rb @@ -59,7 +59,7 @@ Usage: shell [OPTIONS] [SCRIPTFILE [ARGUMENTS]] -n | --noninteractive Do not run within an IRB session and exit with non-zero status on first error. - -r | --return-values Include return values from commands + -nr | --no-return-values Don't include return values from commands executed in the shell. HERE found = [] @@ -67,7 +67,7 @@ script2run = nil log_level = org.apache.log4j.Level::ERROR @shell_debug = false interactive = true -return_values = false +return_values = true for arg in ARGV if arg == '-h' || arg == '--help' puts cmdline_help @@ -81,8 +81,8 @@ for arg in ARGV elsif arg == '-n' || arg == '--noninteractive' interactive = false found.push(arg) - elsif arg == '-r' || arg == '--return-values' - return_values = true + elsif arg == '-nr' || arg == '--no-return-values' + return_values = false found.push(arg) else # Presume it a script. Save it off for running later below diff --git a/hbase-shell/src/main/ruby/shell.rb b/hbase-shell/src/main/ruby/shell.rb index 507c0a9260..584b473a2e 100644 --- a/hbase-shell/src/main/ruby/shell.rb +++ b/hbase-shell/src/main/ruby/shell.rb @@ -78,7 +78,7 @@ module Shell @debug = false attr_accessor :debug - def initialize(hbase, interactive = true, return_values = !interactive) + def initialize(hbase, interactive = true, return_values = interactive) self.hbase = hbase self.interactive = interactive self.return_values = return_values -- 2.16.3