Merge pull request #303 from AikidoSec/fix-spaces-in-rc-file

This commit is contained in:
bitterpanda 2026-01-27 11:26:00 +01:00 committed by GitHub
commit 8c8a4481ee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -99,7 +99,7 @@ export const knownAikidoTools = [
aikidoCommand: "aikido-pipx", aikidoCommand: "aikido-pipx",
ecoSystem: ECOSYSTEM_PY, ecoSystem: ECOSYSTEM_PY,
internalPackageManagerName: "pipx", internalPackageManagerName: "pipx",
} },
// When adding a new tool here, also update the documentation for the new tool in the README.md // When adding a new tool here, also update the documentation for the new tool in the README.md
]; ];
@ -216,7 +216,13 @@ export function addLineToFile(filePath, line, eol) {
eol = eol || os.EOL; eol = eol || os.EOL;
const fileContent = fs.readFileSync(filePath, "utf-8"); const fileContent = fs.readFileSync(filePath, "utf-8");
const updatedContent = fileContent + eol + line + eol; let updatedContent = fileContent;
if (!fileContent.endsWith(eol)) {
updatedContent += eol;
}
updatedContent += line + eol;
fs.writeFileSync(filePath, updatedContent, "utf-8"); fs.writeFileSync(filePath, updatedContent, "utf-8");
} }