@@ -199,7 +199,7 @@ protected void run() throws Exception {
199
199
writeNextflowConfigFile (nextflowConfig , nextflowConfigPath , outDirPath );
200
200
dockerInputBindings .add (new AbstractMap .SimpleEntry <>(nextflowConfigPath .toString (), nextflowConfigPath .toString ()));
201
201
} else {
202
- throw new RuntimeException ("Can't fetch nextflow.config file" );
202
+ throw new ToolException ("Can't fetch nextflow.config file" );
203
203
}
204
204
205
205
// Build output binding
@@ -233,8 +233,11 @@ protected void run() throws Exception {
233
233
Map <String , String > dockerParams = new HashMap <>();
234
234
// Set HOME environment variable to the temporal input directory. This is because nextflow creates a hidden folder there and,
235
235
// when nextflow runs on other dockers, we need to store those files in a path shared between the parent docker and the host
236
- dockerParams .put ("-e" , "HOME=" + temporalInputDir );
237
- dockerParams .put ("-e" , "OPENCGA_TOKEN=" + getExpiringToken ());
236
+ // TODO: Temporal solution
237
+ dockerParams .put ("-e" , "HOME=" + temporalInputDir + " -e OPENCGA_TOKEN=" + getExpiringToken ());
238
+
239
+ // dockerParams.put("-e", "HOME=" + temporalInputDir);
240
+ // dockerParams.put("-e", "OPENCGA_TOKEN=" + getExpiringToken());
238
241
// Set user uid and guid to 1001
239
242
dockerParams .put ("user" , "1001:1001" );
240
243
@@ -256,7 +259,7 @@ protected void close() {
256
259
deleteTemporalFiles ();
257
260
}
258
261
259
- private void writeNextflowConfigFile (URL inputUrl , Path outputFile , String outdirPath ) {
262
+ private void writeNextflowConfigFile (URL inputUrl , Path outputFile , String outdirPath ) throws ToolException {
260
263
try (BufferedReader reader = new BufferedReader (new InputStreamReader (inputUrl .openStream ()));
261
264
BufferedWriter writer = Files .newBufferedWriter (outputFile )) {
262
265
@@ -268,7 +271,7 @@ private void writeNextflowConfigFile(URL inputUrl, Path outputFile, String outdi
268
271
writer .newLine ();
269
272
}
270
273
} catch (IOException e ) {
271
- throw new RuntimeException ( e );
274
+ throw new ToolException ( "Could not replace 'nextflow.config' file contents" , e );
272
275
}
273
276
}
274
277
0 commit comments