mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Merge pull request #303 from AikidoSec/fix-spaces-in-rc-file
This commit is contained in:
commit
8c8a4481ee
1 changed files with 8 additions and 2 deletions
|
|
@ -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");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue