Skip to content
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

Is it possible to use /usr/bin/env bash instead of /bin/bash? #3201

Open
scalavision opened this issue Jan 25, 2018 · 5 comments · May be fixed by #7469
Open

Is it possible to use /usr/bin/env bash instead of /bin/bash? #3201

scalavision opened this issue Jan 25, 2018 · 5 comments · May be fixed by #7469
Labels
Needs Triage Ticket needs further investigation and refinement prior to moving to milestones

Comments

@scalavision
Copy link

scalavision commented Jan 25, 2018

Or maybe provide a flag to switch the default?

I get this error when running the hello world example from docs on nixos:

cromwell.core.CromwellFatalException: java.io.IOException: Cannot run program "/bin/bash": error=2, No such file or directory

Is it just to change this line?

I could possibly just make my own version building from source then ..

It is due to the way nixos is built. A similar case is referenced here :

RcppCore/RcppArmadillo#15

@cjllanwarne
Copy link
Contributor

cjllanwarne commented Jan 26, 2018

To answer your second question, if you're planning to build from source you'll want to find where the script is being invoked, and the internals of the script that call the user script (ie there's probably more than one instance of the string /bin/bash in the codebase).

I believe we might have bash-specific syntax in the scripts (at least at some point we did) but I laud your bravery and willingness to try it out!

@geoffjentry geoffjentry added the Needs Triage Ticket needs further investigation and refinement prior to moving to milestones label Feb 21, 2019
@tbenst
Copy link

tbenst commented Jan 29, 2020

I just ran into this as well--cromwell does not work on OSes without /bin/bash. /usr/bin/env bash is more portable and IMHO the better option. The following fails to execute for me:

workflow myWorkflow {
    call myTask
}

task myTask {
    command {
        echo "hello world"
    }
    output {
        String out = read_string(stdout())
    }
}

Unfortunately this precludes me from using Cromwell.

@elais
Copy link

elais commented Dec 12, 2020

Bumping this issue because it’s also affecting me. Is it possible to sed whatever scripts are using /bin/bash to use #!/usr/bin/env bash instead?

@scalavision
Copy link
Author

When I looked at it back then, it didn't seem to be impossible to make this change. Since I decided on using scala directly via Lihaoyi's os-lib, I never did the extra effort unfortunately.

@Malix-Labs Malix-Labs linked a pull request Jul 11, 2024 that will close this issue
4 tasks
@Malix-Labs
Copy link

Malix-Labs commented Jul 18, 2024

I didn't need it.

I just thought you could just have submitted a pull request instead of waited for 6 years

So I did that for you;
See #7469

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Triage Ticket needs further investigation and refinement prior to moving to milestones
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants