github-workflows-kt icon indicating copy to clipboard operation
github-workflows-kt copied to clipboard

[Bug] encoding colon as value does not work properly

Open Vampire opened this issue 1 year ago • 1 comments

Action

run(
    command = """
        :
    """.trimIndent()
)

Expected

No exception

Actual

[...]
      - id: step-2
        run: :
[...]
com.charleskorn.kaml.MalformedYamlException at jobs.test_default_distribution.steps[2].run on line 98, column 14: mapping values are not allowed here (is the indentation level of this line or a line nearby incorrect?)
 at line 98, column 14:
            run: :
                 ^
	at com.charleskorn.kaml.YamlParser.translateYamlEngineException(YamlParser.kt:89)

Workaround, if exists

run(
    command = """
        :

    """.trimIndent()
)

Library version

v0.23.0

Vampire avatar Jul 28 '22 20:07 Vampire

See https://github.com/krzema12/github-actions-kotlin-dsl/issues/80#issuecomment-1200504222, it will be fixed in scope of that task.

krzema12 avatar Jul 31 '22 21:07 krzema12

After addressing #80, the colon is now properly quoted.

krzema12 avatar Aug 14 '22 22:08 krzema12