mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
stdenv/patchShebangs: fix off by one reading old interpreter
This caused shebangs that were already store paths to be rewritten.
Introduced by ab4c359822
in #94642
Example difference:
$ echo "hello world" | tail -c+3
llo world
$ str="hello world"; echo ${str:3}
lo world
This commit is contained in:
parent
2bd3aa4bc2
commit
ca156a66b7
@ -51,7 +51,7 @@ patchShebangs() {
|
||||
isScript "$f" || continue
|
||||
|
||||
read -r oldInterpreterLine < "$f"
|
||||
read -r oldPath arg0 args <<< "${oldInterpreterLine:3}"
|
||||
read -r oldPath arg0 args <<< "${oldInterpreterLine:2}"
|
||||
|
||||
if [[ -z "$pathName" ]]; then
|
||||
if [[ -n $strictDeps && $f == "$NIX_STORE"* ]]; then
|
||||
|
Loading…
Reference in New Issue
Block a user