aws-secrets-manager-actions
aws-secrets-manager-actions copied to clipboard
Change file output to end with newline?
I am using this great package for some GitHub Actions which export some environment variables to a file. One issue I am running into is that I am using DamianReeves/write-file-action
to append additional environment variables to the outputted file. However, because of the limitations of .yml
files, I am unable to insert a preceeding line break in the DamianReeves/write-file-action
content
property, so the appended items corrupt the last line of the output file from your action. I think this would be easily solved if the output file content has all items output with a newline at the end.
In order to make all lines end with a newline (including the last line), would it be acceptable to change this line:
const secretsAsEnv = Object.entries(parsedSecret).map(([key, value]) => `${key}=${value}`).join('\n')
to this:
const secretsAsEnv = Object.entries(parsedSecret).map(([key, value]) => `${key}=${value}\n`)