You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
If you run xargs without specifying the command argument, it falls back on running echo (this is roughly documented in the man page, but the note there mistakenly claims the default is /bin/echo, but this was changed back in 2011...). If it can't find echo, xargs throws a .../bin/xargs: echo: No such file or directory error.
To Reproduce
This example is a little synthetic (not very similar to how I found the issue), but a simple way to demonstrate it is: nix-shell -p findutils --run 'echo heh | env -i PATH= $(type -p xargs)'
Additional context
The checkPhase of the CI build for my shell-script dependency resolver invokes a test script like env -i <script> to demonstrate that it's depending on resolved executable paths--not the environment. The test script in turn sources a resolved copy of shunit2 (which contains a bare xargs invocation). This has been running okay in macOS and Linux (but obviously, with a hidden dependency leaking in), but I noticed today that it errors on NixOS.
Describe the bug
If you run
xargs
without specifying the command argument, it falls back on runningecho
(this is roughly documented in the man page, but the note there mistakenly claims the default is/bin/echo
, but this was changed back in 2011...). If it can't find echo, xargs throws a.../bin/xargs: echo: No such file or directory
error.To Reproduce
This example is a little synthetic (not very similar to how I found the issue), but a simple way to demonstrate it is:
nix-shell -p findutils --run 'echo heh | env -i PATH= $(type -p xargs)'
Additional context
The checkPhase of the CI build for my shell-script dependency resolver invokes a test script like
env -i <script>
to demonstrate that it's depending on resolved executable paths--not the environment. The test script in turn sources a resolved copy of shunit2 (which contains a barexargs
invocation). This has been running okay in macOS and Linux (but obviously, with a hidden dependency leaking in), but I noticed today that it errors on NixOS.It's not hard to patch this with substitute:
I'm not, however, sure if it is "right" to try to fix this at all, nor if this is the right approach.
Notify maintainers
@veprbl @disassembler @vcunat
The text was updated successfully, but these errors were encountered: