Unverified Commit 01c0df91 authored by David Rodríguez's avatar David Rodríguez
Browse files

Fix a bash 4.4 warning when installing jruby

In particular, the following:

```
/path/to/bin/ruby-build: line 739: warning: command substitution: ignored null byte in input
```
parent 12af1c38
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -736,7 +736,7 @@ install_jruby_launcher() {

fix_jruby_shebangs() {
  for file in "${PREFIX_PATH}/bin"/*; do
    if [ "$(head -c 20 "$file")" = "#!/usr/bin/env jruby" ]; then
    if [ "$(head -c 20 "$file" | tr -d '\0')" = "#!/usr/bin/env jruby" ]; then
      sed -i.bak "1 s:.*:#\!${PREFIX_PATH}\/bin\/jruby:" "$file"
      rm "$file".bak
    fi