Skip to content

Commit 77b8f38

Browse files
committed
refactor(lib): use nicer approach to escape dollar sign
1 parent 0406c8d commit 77b8f38

File tree

2 files changed

+2
-2
lines changed
  • github-workflows-kt/src

2 files changed

+2
-2
lines changed

github-workflows-kt/src/main/kotlin/io/github/typesafegithub/workflows/dsl/JobBuilder.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public class JobBuilder<OUTPUT : JobOutputs>(
148148
name = name,
149149
command = "GHWKT_RUN_STEP='${this.id}:$id' '$sourceFilePath'",
150150
logic = logic,
151-
env = env + mapOf("GHWKT_GITHUB_CONTEXT_JSON" to "${'$'}{{ toJSON(github) }}"),
151+
env = env + mapOf("GHWKT_GITHUB_CONTEXT_JSON" to "\${{ toJSON(github) }}"),
152152
condition =
153153
conditionCheckingStep?.let {
154154
expr { "steps.${conditionCheckingStep.id}.outputs.$evaluationResultOutput" }

github-workflows-kt/src/test/kotlin/io/github/typesafegithub/workflows/dsl/JobBuilderTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,6 @@ class JobBuilderTest :
243243
}
244244

245245
// Then
246-
workflow!!.jobs[0].environment?.url shouldBe "${'$'}{{ steps.deployment.outputs.page_url }}"
246+
workflow!!.jobs[0].environment?.url shouldBe "\${{ steps.deployment.outputs.page_url }}"
247247
}
248248
})

0 commit comments

Comments
 (0)