Skip to content

Commit

Permalink
use explicit binary encoding when binary patching
Browse files Browse the repository at this point in the history
prevents invalid char sequence errors in older rubies
  • Loading branch information
RyanKoppenhaver-NCC committed Jan 16, 2018
1 parent dae372c commit 459ad53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/processor/macosx.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def tweak_install
framework_glob = File.expand_path(FrameworkBinaryGlob, @extdir)
framework_fn = Dir.glob(framework_glob).first
raise "Can't find framework file at #{framework_glob} to patch" unless File.exist? framework_fn
framework_bin = File.read(framework_fn)
framework_bin = File.read(framework_fn, encoding: 'binary')
framework_bin.sub! 'ExtensionInstallVerification', 'ExtensionInstallVerificati_1'
framework_bin.sub! 'ExtensionInstallVerification', 'ExtensionInstallVerificati_2'
File.write(framework_fn, framework_bin)
Expand Down

0 comments on commit 459ad53

Please sign in to comment.