diff --git a/src/main/groovy/io/seqera/wave/service/logs/BuildLogServiceImpl.groovy b/src/main/groovy/io/seqera/wave/service/logs/BuildLogServiceImpl.groovy index d6e748e517..d806a105b3 100644 --- a/src/main/groovy/io/seqera/wave/service/logs/BuildLogServiceImpl.groovy +++ b/src/main/groovy/io/seqera/wave/service/logs/BuildLogServiceImpl.groovy @@ -194,6 +194,7 @@ class BuildLogServiceImpl implements BuildLogService { } return logs.substring(start + CONDA_LOCK_START.length(), end) .replaceAll(/#\d+ \d+\.\d+\s*/, '') + .stripLeading() } String fetchValidCondaLock(String buildId) { diff --git a/src/test/groovy/io/seqera/wave/service/logs/BuildLogsServiceTest.groovy b/src/test/groovy/io/seqera/wave/service/logs/BuildLogsServiceTest.groovy index a4a9abafd0..595ca6bd21 100644 --- a/src/test/groovy/io/seqera/wave/service/logs/BuildLogsServiceTest.groovy +++ b/src/test/groovy/io/seqera/wave/service/logs/BuildLogsServiceTest.groovy @@ -108,12 +108,11 @@ class BuildLogsServiceTest extends Specification implements AwsS3TestContainer { def result = service.extractCondaLockFile(logs) then: - result == """ - # This file may be used to create an environment using: - # \$ conda create --name --file - # platform: linux-aarch64 - @EXPLICIT - """.stripIndent() + result == """# This file may be used to create an environment using: +# \$ conda create --name --file +# platform: linux-aarch64 +@EXPLICIT +""" } def 'should extract conda lockfile from s3' (){ @@ -155,12 +154,11 @@ class BuildLogsServiceTest extends Specification implements AwsS3TestContainer { service.storeCondaLock(buildID, logs) then: - service.fetchCondaLockString(buildID) == """ - # This file may be used to create an environment using: - # \$ conda create --name --file - # platform: linux-aarch64 - @EXPLICIT - """.stripIndent() + service.fetchCondaLockString(buildID) == """# This file may be used to create an environment using: +# \$ conda create --name --file +# platform: linux-aarch64 +@EXPLICIT +""" } def 'should throw no exception when there is no conda lockfile in logs' (){