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

fixes #3201 #7469

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion centaur/centaur.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

CMD='sbt'
if [ -n "$1" ]; then
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
task output_redirection {
command {
echo "#!/bin/bash" > writeToStderr.sh
echo "#!/usr/bin/env bash" > writeToStderr.sh
# Yes, this is deliberate. We'll eventually end up redirecting this to stdout:
echo "echo 'should be on stdout' >&2" >> writeToStderr.sh

Expand Down
2 changes: 1 addition & 1 deletion cromwell.example.backends/HtCondor.conf
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ backend {
submit-docker = """
chmod 755 ${script}
cat > ${cwd}/execution/dockerScript <<EOF
#!/bin/bash
#!/usr/bin/env bash
docker run --rm -i -v ${cwd}:${docker_cwd} ${docker} /bin/bash ${script}
EOF
chmod 755 ${cwd}/execution/dockerScript
Expand Down
2 changes: 1 addition & 1 deletion docker/install.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -e

Expand Down
2 changes: 1 addition & 1 deletion docker/run.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -e
java $JAVA_OPTS -jar /cromwell/cromwell.jar server
2 changes: 1 addition & 1 deletion docs/backends/HTcondor.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ This backend also supports docker as optional feature. Configuration key `backen
```
chmod 755 ${script}
cat > ${cwd}/execution/dockerScript <<EOF
#!/bin/bash
#!/usr/bin/env bash
docker run --rm -i -v ${cwd}:${docker_cwd} ${docker} /bin/bash ${docker_script}
EOF
chmod 755 ${cwd}/execution/dockerScript
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/PipelinesApi101.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Google recommends using a service account to authenticate to GCP.
You may create a service account using the `gcloud` command, consider running the following script and replace MY-GOOGLE-PROJECT:

```
#!/bin/bash
#!/usr/bin/env bash
export LC_ALL=C
RANDOM_BUCKET_NAME=$(head /dev/urandom | tr -dc a-z | head -c 32 ; echo '')

Expand Down
2 changes: 1 addition & 1 deletion scripts/make_pr_clone_branch.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -euo pipefail

Expand Down
2 changes: 1 addition & 1 deletion scripts/reference_disks/create_images.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# uncomment/comment toggle verbose debugging
#set -x
Expand Down
2 changes: 1 addition & 1 deletion scripts/test_upgrade/test_upgrade.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# test_upgrade.sh
#
Expand Down
2 changes: 1 addition & 1 deletion src/ci/resources/acquire_b2c_token.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# This script acquires a b2c token using gcloud auth and writes it to a file.
# This file is used by renderCiResources to populate the CROMWELL_B2C_TOKEN in tes_application.conf.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ trait Delocalization {
/*
* Delocalize all the files returned by the runtime output extractor
*/
s"""|#!/bin/bash
s"""|#!/usr/bin/env bash
|
|set -x
|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ object RunnableCommands {

def multiLineCommandTransformer(shell: String)(commandString: String): String = {
val randomUuid = UUID.randomUUID().toString
val withBashShebang = s"#!/bin/bash\n\n$commandString"
val withBashShebang = s"#!/usr/bin/env bash\n\n$commandString"
val base64EncodedScript = Base64.encodeBase64String(withBashShebang.getBytes(StandardCharsets.UTF_8))
val scriptPath = s"/tmp/$randomUuid.sh"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ object ActionCommands {

def multiLineCommandTransformer(shell: String)(commandString: String): String = {
val randomUuid = UUID.randomUUID().toString
val withBashShebang = s"#!/bin/bash\n\n$commandString"
val withBashShebang = s"#!/usr/bin/env bash\n\n$commandString"
val base64EncodedScript = Base64.encodeBase64String(withBashShebang.getBytes(StandardCharsets.UTF_8))
val scriptPath = s"/tmp/$randomUuid.sh"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ trait Delocalization {
/*
* Delocalize all the files returned by the runtime output extractor
*/
s"""|#!/bin/bash
s"""|#!/usr/bin/env bash
|
|set -x
|
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# The `papi_v2_log` Centaur test is opinionated about the number of log messages around localization/delocalization.
# The trace logging of `set -x` must be turned off for the `papi_v2_log` test to pass.
set +x
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ trait Delocalization {
/*
* Delocalize all the files returned by the runtime output extractor
*/
s"""|#!/bin/bash
s"""|#!/usr/bin/env bash
|
|set -x
|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ sealed trait ConfigAsyncJobExecutionActor extends SharedFileSystemAsyncJobExecut
val command = womInstantiation.toTry.get.commandString
jobLogger.info(s"executing: $command")
val scriptBody =
s"""|#!/bin/bash
s"""|#!/usr/bin/env bash
|SCRIPT_COMMAND
|""".stripMargin.replace("SCRIPT_COMMAND", command)
script.write(scriptBody)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ trait BackgroundAsyncJobExecutionActor extends SharedFileSystemAsyncJobExecution
private def writeBackgroundScriptContents(): Either[ExecutionHandle, Unit] = {
val backgroundCommand = redirectOutputs(processArgs.argv.mkString("'", "' '", "'"))
// $! contains the previous background command's process id (PID)
backgroundScript.write(s"""|#!/bin/bash
backgroundScript.write(s"""|#!/usr/bin/env bash
|BACKGROUND_COMMAND &
|echo $$!
|""".stripMargin.replace("BACKGROUND_COMMAND", backgroundCommand))
Expand Down Expand Up @@ -49,7 +49,7 @@ trait BackgroundAsyncJobExecutionActor extends SharedFileSystemAsyncJobExecution
/*
Use pgrep to find the children of a process, and recursively kill the children before killing the parent.
*/
killScript.write(s"""|#!/bin/bash
killScript.write(s"""|#!/usr/bin/env bash
|kill_tree() {
| local pid
| local cpid
Expand Down
Loading