diff --git a/plugins/nf-azure/src/main/nextflow/cloud/azure/batch/AzBatchService.groovy b/plugins/nf-azure/src/main/nextflow/cloud/azure/batch/AzBatchService.groovy index 5d9f9f1596..08e9d3e11b 100644 --- a/plugins/nf-azure/src/main/nextflow/cloud/azure/batch/AzBatchService.groovy +++ b/plugins/nf-azure/src/main/nextflow/cloud/azure/batch/AzBatchService.groovy @@ -835,7 +835,7 @@ class AzBatchService implements Closeable { } // otherwise return a StartTask object with the start task command and resource files - return new BatchStartTask(startCmd.join('; ')) + return new BatchStartTask(startCmd.join(' && ')) .setResourceFiles(resourceFiles) .setUserIdentity(userIdentity(opts.privileged, null, AutoUserScope.POOL)) } diff --git a/plugins/nf-azure/src/test/nextflow/cloud/azure/batch/AzBatchServiceTest.groovy b/plugins/nf-azure/src/test/nextflow/cloud/azure/batch/AzBatchServiceTest.groovy index 353383dcd4..afdedfee8c 100644 --- a/plugins/nf-azure/src/test/nextflow/cloud/azure/batch/AzBatchServiceTest.groovy +++ b/plugins/nf-azure/src/test/nextflow/cloud/azure/batch/AzBatchServiceTest.groovy @@ -308,7 +308,7 @@ class AzBatchServiceTest extends Specification { when: def configuredStartTask = svc.createStartTask( new AzStartTaskOpts(script: 'echo hello-world') ) then: - configuredStartTask.commandLine == 'bash -c "chmod +x azcopy && mkdir $AZ_BATCH_NODE_SHARED_DIR/bin/ && cp azcopy $AZ_BATCH_NODE_SHARED_DIR/bin/"; bash -c \'echo hello-world\'' + configuredStartTask.commandLine == 'bash -c "chmod +x azcopy && mkdir $AZ_BATCH_NODE_SHARED_DIR/bin/ && cp azcopy $AZ_BATCH_NODE_SHARED_DIR/bin/" && bash -c \'echo hello-world\'' and: configuredStartTask.resourceFiles.size()==1 configuredStartTask.resourceFiles.first().filePath == 'azcopy'