Add support for multi-line secrets in setSecret

This commit is contained in:
Francesco Renzi
2023-05-22 14:21:05 +01:00
parent 37e09c586f
commit 5ccbd5f448
3 changed files with 18 additions and 2 deletions

View File

@@ -97,7 +97,11 @@ export function exportVariable(name: string, val: any): void {
* @param secret value of the secret
*/
export function setSecret(secret: string): void {
issueCommand('add-mask', {}, secret)
secret.split(/\r?\n|\r/).forEach(part => {
if (part) {
issueCommand('add-mask', {}, part)
}
})
}
/**