mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2026-04-05 19:53:20 +08:00
Add support for multi-line secrets in setSecret
This commit is contained in:
@@ -164,6 +164,15 @@ describe('@actions/core', () => {
|
||||
assertWriteCalls([`::add-mask::secret val${os.EOL}`])
|
||||
})
|
||||
|
||||
it('setSecret splits multi line secrets into multiple commands', () => {
|
||||
core.setSecret('first\nsecond\r\nthird')
|
||||
assertWriteCalls([
|
||||
`::add-mask::first${os.EOL}`,
|
||||
`::add-mask::second${os.EOL}`,
|
||||
`::add-mask::third${os.EOL}`
|
||||
])
|
||||
})
|
||||
|
||||
it('prependPath produces the correct commands and sets the env', () => {
|
||||
const command = 'PATH'
|
||||
createFileCommandFile(command)
|
||||
|
||||
Reference in New Issue
Block a user