-
Notifications
You must be signed in to change notification settings - Fork 651
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use "/usr/bin/env bash" instead of "/bin/bash" #1598
Comments
Same issue on Nixos 20.03 also. #!/usr/bin/env bash Works for me. |
Signed-off-by: Edmund Miller <edmund.a.miller@protonmail.com>
Doing a quick search on Pull request #1614 fixed only the |
Well, the issue was automatically closed when merging the associated PR. Said that there's no plan to change the current usage of Also, the proposed alternative suffers from the same issue. Try for example
|
Well, Would it be too risky to simply drop the full path whenever called from a script? i.e. I'm happy to provide a PR with the necessary changes to any existing reference to |
Not so unfair because The only solution that I can see is to make the shell path configurable via config setting (env var or config file) which defaults to |
Sorry this got closed automagically. I agree that support for containers is a major feature and shouldn't be broken, and even if we convinced the biocontainers group to change, there are still tons of previous images that would still have I think making the shell path configurable is only only option also because of that. It's probably not a priority though because |
Just came back to this as I was about to try to package up nextflow with nix. However, I just did |
Super quick flake for running under nixos: {
inputs = {};
outputs = {self, nixpkgs, ...}:
let
system = "x86_64-linux";
pkgs = import nixpkgs{inherit system;};
in
{
devShells.${system}.default = with pkgs; (pkgs.buildFHSUserEnv {
name = "nextflow";
targetPkgs = pkgs: [pkgs.openjdk];
}).env;
};
} |
Bug report
The
Tip
actually runs as expectedExpected behavior and actual behavior
On some systems
/bin/bash
doesn't exist. This causes failures at many levels since/bin/bash
is hardcoded in many locations in nextflow's codebase, including the shebang of thenextflow-X.X.X.all
release files.The compatible alternative is to use
/usr/bin/env bash
or, if involving shebangs and multiple arguments,#!/usr/bin/env -S bash -ue
. See also coreutils - env -S.Environment
$SHELL --version
)The text was updated successfully, but these errors were encountered: