@@ -58,11 +58,7 @@ class GoogleBatchScriptLauncher extends BashWrapperBuilder implements GoogleBatc
5858 protected GoogleBatchScriptLauncher () {}
5959
6060 GoogleBatchScriptLauncher (TaskBean bean , Path remoteBinDir , BatchConfig batchConfig ) {
61- // Unstaging is cross-device on Google Batch (gcsfuse-mounted work dir).
62- // `move` can fail with overlapping outputs or symlinked paths.
63- if ( bean. stageOutMode == null )
64- bean. stageOutMode = ' copy'
65- super (bean, copyStrategyFor(bean, batchConfig))
61+ super (defaultStageOutMode(bean), copyStrategyFor(bean, batchConfig))
6662 // keep track the google storage work dir
6763 this . remoteWorkDir = (CloudStoragePath ) bean. workDir
6864 this . remoteBinDir = toContainerMount(remoteBinDir)
@@ -114,6 +110,14 @@ class GoogleBatchScriptLauncher extends BashWrapperBuilder implements GoogleBatc
114110 : new SimpleFileCopyStrategy (bean)
115111 }
116112
113+ private static TaskBean defaultStageOutMode (TaskBean bean ) {
114+ // Unstaging is cross-device on Google Batch (gcsfuse-mounted work dir).
115+ // `move` can fail with overlapping outputs or symlinked paths.
116+ if ( bean. stageOutMode == null )
117+ bean. stageOutMode = ' copy'
118+ return bean
119+ }
120+
117121 protected String headerScript (TaskBean bean ) {
118122 def result = " NXF_CHDIR=${ Escape.path(bean.workDir)} \n "
119123 if ( remoteBinDir ) {
0 commit comments