mirror of
https://github.com/hashicorp/setup-terraform.git
synced 2025-12-24 12:17:09 +00:00
Merge 679784b708 into 5f32e8acaf
This commit is contained in:
commit
d31c174c4b
3 changed files with 13 additions and 2 deletions
3
dist/index1.js
vendored
3
dist/index1.js
vendored
|
|
@ -27613,7 +27613,8 @@ class OutputListener {
|
|||
get contents () {
|
||||
return this._buff
|
||||
.map(chunk => chunk.toString())
|
||||
.join('');
|
||||
.join('')
|
||||
.replace(/`/g, '\\`');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,8 @@ class OutputListener {
|
|||
get contents () {
|
||||
return this._buff
|
||||
.map(chunk => chunk.toString())
|
||||
.join('');
|
||||
.join('')
|
||||
.replace(/`/g, '\\`');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -14,4 +14,13 @@ describe('output-listener', () => {
|
|||
listen(Buffer.from('baz'));
|
||||
expect(listener.contents).toEqual('foobarbaz');
|
||||
});
|
||||
|
||||
it('escape backticks', () => {
|
||||
const listener = new OutputListener();
|
||||
const listen = listener.listener;
|
||||
listen(Buffer.from('foo'));
|
||||
listen(Buffer.from('`bar`'));
|
||||
listen(Buffer.from('baz'));
|
||||
expect(listener.contents).toEqual('foo\\`bar\\`baz');
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue