mirror of
https://github.com/hashicorp/vault-action.git
synced 2025-11-07 15:16:56 +00:00
fix: release new action bundle
This commit is contained in:
parent
bef2eb0b90
commit
4ab6f6070f
1 changed files with 11 additions and 5 deletions
16
dist/index.js
vendored
16
dist/index.js
vendored
|
|
@ -5096,12 +5096,18 @@ function parseHeadersInput(inputKey, inputOptions) {
|
|||
.split('\n')
|
||||
.map(line => line.trim())
|
||||
.filter(line => line !== '');
|
||||
const pairs = headerStrings
|
||||
.map(line => {
|
||||
return headerStrings
|
||||
.reduce((map, line) => {
|
||||
const seperator = line.indexOf(':');
|
||||
return [line.substring(0, seperator), line.substring(seperator + 1)];
|
||||
});
|
||||
return new Headers(pairs);
|
||||
const key = line.substring(0, seperator).trim().toLowerCase();
|
||||
const value = line.substring(seperator + 1).trim();
|
||||
if (map.has(key)) {
|
||||
map.set(key, [map.get(key), value].join(', '));
|
||||
} else {
|
||||
map.set(key, value);
|
||||
}
|
||||
return map;
|
||||
}, new Map());
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue