Commit d3891be3 authored by Ahmad's avatar Ahmad

inikt

parent ba5cb6a7
Pipeline #210 canceled with stages
......@@ -20,9 +20,12 @@ function getAWSCredentials() {
.pipe(csv())
.on('data', (row) => {
console.log('Parsed row:', row); // Log the parsed row for debugging
if (row['Access key ID'] && row['Secret access key']) {
// Adjust for BOM in the header
const accessKeyIdHeader = Object.keys(row)[0].replace(/^\uFEFF/, ''); // Removes BOM if present
if (accessKeyIdHeader === 'Access key ID' && row['Secret access key']) {
credentials = {
accessKeyId: row['Access key ID'].trim(),
accessKeyId: row[accessKeyIdHeader].trim(),
secretAccessKey: row['Secret access key'].trim(),
};
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment