Skip to content

Commit f7ec832

Browse files
committed
fix bsub job regex
1 parent 643b1ff commit f7ec832

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ plugins {
1313
}
1414

1515
group = "io.krews"
16-
version = "0.14.13"
16+
version = "0.14.14"
1717

1818
repositories {
1919
maven { setUrl("https://dl.bintray.com/kotlin/kotlin-eap") }

src/main/kotlin/krews/executor/bsub/BsubExecutor.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,9 @@ class BsubExecutor(private val workflowConfig: WorkflowConfig) : LocallyDirected
236236

237237
val bsubCommand = "echo $bsubScriptAsBase64 | base64 --decode | bsub"
238238
val bsubResponse = commandExecutor.exec(bsubCommand)
239-
val jobId = "\\d+\$".toRegex().find(bsubResponse)?.value
240-
?: throw Exception("JobID not found in response for bsub command")
239+
val jobIdRegex = Regex("""Job <(\d+)>""")
240+
val matchResult = jobIdRegex.find(bsubResponse)
241+
val jobId = matchResult?.groupValues?.get(1) ?: throw Exception("JobID not found in response for bsub command")
241242

242243
log.info { "Job ID $jobId found for bsub command" }
243244

0 commit comments

Comments
 (0)