about summary refs log tree commit diff
path: root/pkgs/development/ruby-modules/bundled-common/gen-bin-stubs.rb
diff options
context:
space:
mode:
authorMichael Fellinger <m.fellinger@gmail.com>2017-11-03 12:31:16 +0100
committerzimbatm <zimbatm@zimbatm.com>2017-11-03 11:31:16 +0000
commitd36a83a7840e159afed4f9646bdc912630b1bb41 (patch)
treefb617587ec21ae051aaefc11a44c5f53caa8a120 /pkgs/development/ruby-modules/bundled-common/gen-bin-stubs.rb
parentb2093d4611995839962912b85aa6e57ff5f3a13c (diff)
downloadnixlib-d36a83a7840e159afed4f9646bdc912630b1bb41.tar
nixlib-d36a83a7840e159afed4f9646bdc912630b1bb41.tar.gz
nixlib-d36a83a7840e159afed4f9646bdc912630b1bb41.tar.bz2
nixlib-d36a83a7840e159afed4f9646bdc912630b1bb41.tar.lz
nixlib-d36a83a7840e159afed4f9646bdc912630b1bb41.tar.xz
nixlib-d36a83a7840e159afed4f9646bdc912630b1bb41.tar.zst
nixlib-d36a83a7840e159afed4f9646bdc912630b1bb41.zip
bundlerEnv: support unicode executables (#31145)
Diffstat (limited to 'pkgs/development/ruby-modules/bundled-common/gen-bin-stubs.rb')
-rw-r--r--pkgs/development/ruby-modules/bundled-common/gen-bin-stubs.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkgs/development/ruby-modules/bundled-common/gen-bin-stubs.rb b/pkgs/development/ruby-modules/bundled-common/gen-bin-stubs.rb
index 92321d6427dc..fe8c43f55ed1 100644
--- a/pkgs/development/ruby-modules/bundled-common/gen-bin-stubs.rb
+++ b/pkgs/development/ruby-modules/bundled-common/gen-bin-stubs.rb
@@ -18,7 +18,8 @@ paths.each do |path|
   next unless File.directory?("#{path}/nix-support/gem-meta")
 
   name = File.read("#{path}/nix-support/gem-meta/name")
-  executables = File.read("#{path}/nix-support/gem-meta/executables").split
+  executables = File.read("#{path}/nix-support/gem-meta/executables")
+    .force_encoding('UTF-8').split
   executables.each do |exe|
     File.open("#{out}/bin/#{exe}", "w") do |f|
       f.write(<<-EOF)