lib/opener/opinion_detectors/base.rb in opener-opinion-detector-base-2.1.5 vs lib/opener/opinion_detectors/base.rb in opener-opinion-detector-base-2.2.0
- old
+ new
@@ -57,23 +57,26 @@
##
# Runs the command and returns the output of STDOUT, STDERR and the
# process information.
#
# @param [String] input The input to tag.
- # @return [Array]
+ # @return [String]
#
def run(input)
language = language(input)
conf = ConfigurationCreator.new(
language,
options[:domain],
options[:resource_path]
)
+
stdout, stderr, process = capture(conf.config_file_path, input)
+
conf.close_config
-
-
- return stdout, stderr, process
+
+ raise stderr unless process.success?
+
+ return stdout
end
protected
##