Skip to content

core: getMultilineInput not trimming whitespace #1186

Description

@bicstone

Describe the bug
core.getInput is trimming whitespace by default, but core.getMultilineInput is not.
Also, core.getMultilineInput ignores trimWhitespace option.

To Reproduce

action.yml

# ...inputs:
option:
description: a multiline option

index.js

import*ascorefrom"@actions/core"constoption=core.getMultilineInput("option",{trimWhitespace: true,})core.info(option)

workflow.yml

# ...jobs:
test:
# ...steps:
- uses: # ...with:
option: |- a  b  c 

-> ["a ", " b ", " c"]

Expected behavior
-> ["a", "b", "c"]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions