Skip to content

Commit bf4ae47

Browse files
committed
Bugfix to nimble -v command
1 parent fe0661a commit bf4ae47

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

singlecell/src/org/labkey/singlecell/run/NimbleHelper.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -711,10 +711,15 @@ private String getVersion(PipelineStepOutput output) throws PipelineJobException
711711
throw new PipelineJobException("Unable to find file: " + outFile.getPath());
712712
}
713713

714-
String ret;
715-
try (BufferedReader reader = Readers.getReader(outFile))
714+
String ret = null;
715+
try
716716
{
717-
ret = reader.readLine();
717+
ret = StringUtils.trimToNull(Files.readString(outFile.toPath()));
718+
if (ret == null)
719+
{
720+
throw new PipelineJobException("nimble -v did not output version");
721+
}
722+
ret = ret.replaceAll("nimble", "").replaceAll("[\\r\\n]+", "");
718723
}
719724
catch (IOException e)
720725
{

0 commit comments

Comments
 (0)