diff options
author | aszlig <aszlig@nix.build> | 2018-07-09 20:43:34 +0200 |
---|---|---|
committer | aszlig <aszlig@nix.build> | 2018-07-09 20:43:34 +0200 |
commit | 739c835515036fcc21cd5f32fc0e37991df5dc18 (patch) | |
tree | 6340ad086242db5d4315890cbbe58da39b4f4a60 /pkgs | |
parent | 98b525895546794aa79dce9dcb155b6a35b20622 (diff) | |
download | nixlib-739c835515036fcc21cd5f32fc0e37991df5dc18.tar nixlib-739c835515036fcc21cd5f32fc0e37991df5dc18.tar.gz nixlib-739c835515036fcc21cd5f32fc0e37991df5dc18.tar.bz2 nixlib-739c835515036fcc21cd5f32fc0e37991df5dc18.tar.lz nixlib-739c835515036fcc21cd5f32fc0e37991df5dc18.tar.xz nixlib-739c835515036fcc21cd5f32fc0e37991df5dc18.tar.zst nixlib-739c835515036fcc21cd5f32fc0e37991df5dc18.zip |
stdenv-setup: Remove superfluous check for /bin/sh
The line was essentially checking whether /bin/sh exists and is executable and if that's the case, the isScript function returns successfully. When asking the author of this line on IRC it seems that even they can't remember or imagine what this was supposed to be. In summary: Whenever /bin/sh doesn't exist during a build, *any* file given to isScript is reported as being a script even if it isn't. This is kinda counter-intuitive and not something what somebody would expect from a function called "isScript". Signed-off-by: aszlig <aszlig@nix.build> Cc: @edolstra
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/stdenv/generic/setup.sh | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh index 87465df1482a..26d28609d877 100644 --- a/pkgs/stdenv/generic/setup.sh +++ b/pkgs/stdenv/generic/setup.sh @@ -220,7 +220,6 @@ isScript() { local fn="$1" local fd local magic - if ! [ -x /bin/sh ]; then return 0; fi exec {fd}< "$fn" read -r -n 2 -u "$fd" magic exec {fd}<&- |