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

Fix chmod command to accommodate hidden files in bindir (or empty bindir) #3247

Merged
merged 4 commits into from
Sep 27, 2022
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class AwsBatchFileCopyStrategy extends SimpleFileCopyStrategy {
// when a remote bin directory is provide managed it properly
if( opts.remoteBinDir ) {
result << "${opts.getAwsCli()} s3 cp --recursive --only-show-errors s3:/${opts.remoteBinDir} \$PWD/nextflow-bin\n"
result << "chmod +x \$PWD/nextflow-bin/*\n"
result << "chmod +x \$PWD/nextflow-bin/* || true\n"
result << "export PATH=\$PWD/nextflow-bin:\$PATH\n"
}
// finally render the environment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ class AwsBatchFileCopyStrategyTest extends Specification {
opts.getAwsCli() >> 'aws'
script == '''
aws s3 cp --recursive --only-show-errors s3://foo/bar $PWD/nextflow-bin
chmod +x $PWD/nextflow-bin/*
chmod +x $PWD/nextflow-bin/* || true
export PATH=$PWD/nextflow-bin:$PATH
export BAR="world"
export FOO="hola"
Expand All @@ -339,7 +339,7 @@ class AwsBatchFileCopyStrategyTest extends Specification {
opts.getRemoteBinDir() >> '/foo/bar'
script == '''
/conda/bin/aws s3 cp --recursive --only-show-errors s3://foo/bar $PWD/nextflow-bin
chmod +x $PWD/nextflow-bin/*
chmod +x $PWD/nextflow-bin/* || true
export PATH=$PWD/nextflow-bin:$PATH
export BAR="world"
export FOO="hola"
Expand All @@ -353,7 +353,7 @@ class AwsBatchFileCopyStrategyTest extends Specification {
opts.getRegion() >> 'eu-west-1'
script == '''
/conda/bin/aws s3 cp --recursive --only-show-errors s3://foo/bar $PWD/nextflow-bin
chmod +x $PWD/nextflow-bin/*
chmod +x $PWD/nextflow-bin/* || true
export PATH=$PWD/nextflow-bin:$PATH
export BAR="world"
export FOO="hola"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ class AwsBatchScriptLauncherTest extends Specification {
then:
binding.task_env == '''\
aws s3 cp --recursive --only-show-errors s3://bucket/bin $PWD/nextflow-bin
chmod +x $PWD/nextflow-bin/*
chmod +x $PWD/nextflow-bin/* || true
export PATH=$PWD/nextflow-bin:$PATH
export FOO="xxx"
'''.stripIndent()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class AzFileCopyStrategy extends SimpleFileCopyStrategy {
String getStageInputFilesScript(Map<String, Path> inputFiles) {
String result = ( remoteBinDir ? """\
nxf_az_download '${AzHelper.toHttpUrl(remoteBinDir)}' \$PWD/.nextflow-bin
chmod +x \$PWD/.nextflow-bin/*
chmod +x \$PWD/.nextflow-bin/* || true
""".stripIndent() : '' )

result += 'downloads=(true)\n'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ class AzFileCopyStrategyTest extends Specification {
binding.stage_inputs == '''\
# stage input files
nxf_az_download 'http://account.blob.core.windows.net/my-data/work/remote/bin' $PWD/.nextflow-bin
chmod +x $PWD/.nextflow-bin/*
chmod +x $PWD/.nextflow-bin/* || true
downloads=(true)

nxf_parallel "${downloads[@]}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ class GoogleLifeSciencesFileCopyStrategyTest extends GoogleSpecification {
def envScript = strategy.getEnvScript([FOO:1, BAR: 2, PATH: 3], false)
then:
envScript == '''\
chmod +x /work/xx/yy/nextflow-bin/*
chmod +x /work/xx/yy/nextflow-bin/* || true
export PATH=/work/xx/yy/nextflow-bin:$PATH
export BAR="2"
export FOO="1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class GoogleLifeSciencesScriptLauncherTest extends GoogleSpecification {
binding.stage_cmd == null
binding.unstage_cmd == null
binding.task_env == '''\
chmod +x /work/xx/yy/nextflow-bin/*
chmod +x /work/xx/yy/nextflow-bin/* || true
export PATH=/work/xx/yy/nextflow-bin:$PATH
export FOO="xxx"
'''.stripIndent()
Expand Down