Skip to content

@actions/core 1.2.2 breaks when trying to set a number as output #321

@dguo

Description

@dguo

Describe the bug

My team has code like:

core.setOutput("test_db_migrations", testDbMigrations ? 1 : 0);

This broke with the 1.2.2 release because it expects the output to be a string.

The error is: TypeError: (s || "").replace is not a function and occurs at node_modules/@actions/core/lib/command.js:66:10).

To Reproduce

Try to set a number as output.

Expected behavior

The library could do a .toString(), or I recommend at least updating the README to make it clear that the output value has to be a string.

Screenshots

N/A

Desktop (please complete the following information):

N/A

Smartphone (please complete the following information):

N/A

Additional context

N/A

Metadata

Metadata

Assignees

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