diff --git a/lib/apkstats/command/apk_analyzer.rb b/lib/apkstats/command/apk_analyzer.rb index ad366c5..f025635 100644 --- a/lib/apkstats/command/apk_analyzer.rb +++ b/lib/apkstats/command/apk_analyzer.rb @@ -6,7 +6,7 @@ def compare_with(apk_filepath, other_apk_filepath) out, err = run_command('apk', 'compare', '--different-only', apk_filepath, other_apk_filepath) if out - return out.partition("\n").first, nil + return out.partition("\n").first.strip, nil else return nil, err end diff --git a/lib/apkstats/gem_version.rb b/lib/apkstats/gem_version.rb index a5ede70..1da3c00 100644 --- a/lib/apkstats/gem_version.rb +++ b/lib/apkstats/gem_version.rb @@ -1,3 +1,3 @@ module Apkstats - VERSION = "0.0.1".freeze + VERSION = "0.0.2".freeze end diff --git a/lib/apkstats/plugin.rb b/lib/apkstats/plugin.rb index 9c49e61..bc02145 100644 --- a/lib/apkstats/plugin.rb +++ b/lib/apkstats/plugin.rb @@ -44,9 +44,11 @@ def compare_with(other_apk_filepath, opts={}) out, err = command.compare_with(apk_filepath, other_apk_filepath) if opts[:do_report] - if out + if out&.empty? + message("Apk file size was not changed") + elsif out left, right, diff, = out.split("\s") - message("Apk file size was changed by #{diff} : from #{right} to #{left}") + message("Apk file size was changed by #{diff} : from #{left} to #{right}") else warn(err) end