match/lib/match/encrypt.rb in fastlane-2.70.0.beta.20171216010003 vs match/lib/match/encrypt.rb in fastlane-2.70.0.beta.20171217010003

- old
+ new

@@ -87,11 +87,19 @@ command << "-k #{password.shellescape}" command << "-in #{path.shellescape}" command << "-out #{tmpfile.shellescape}" command << "-a" command << "-d" unless encrypt - command << "&> /dev/null" unless FastlaneCore::Globals.verbose? # to show show an error message is something goes wrong - success = system(command.join(' ')) + command << "&> /dev/null" unless FastlaneCore::Globals.verbose? # to show an error message if something goes wrong + + _out, err, st = Open3.capture3(command.join(' ')) + success = st.success? + + # Ubuntu `openssl` does not fail on failure + # but at least outputs an error message + unless err.to_s.empty? + success = false + end UI.crash!("Error decrypting '#{path}'") unless success # On non-Mac systems (more specific Ubuntu Linux) it might take some time for the file to actually be there (see #11182). # To try to circumvent this flakyness (in tests), we wait a bit until the file appears (max 2s) (usually only 0.1 is actually waited)