1
1
mirror of https://github.com/neosubhamoy/neodlp.git synced 2026-03-22 12:35:49 +05:30

refactor: use echo again

This commit is contained in:
2026-02-26 14:03:22 +05:30
Verified
parent 5e90fac99f
commit f2bd8bd4df
2 changed files with 4 additions and 3 deletions

View File

@@ -71,8 +71,8 @@
"args": true "args": true
}, },
{ {
"name": "cat", "name": "echo",
"cmd": "cat", "cmd": "echo",
"args": true "args": true
} }
] ]

View File

@@ -63,7 +63,8 @@ export function useLinuxRegisterer() {
console.log(`File ${file.source} copied successfully to ${destinationPath}`); console.log(`File ${file.source} copied successfully to ${destinationPath}`);
LOG.info("LINUX REGISTERER", `File ${file.source} copied successfully to ${destinationPath}`); LOG.info("LINUX REGISTERER", `File ${file.source} copied successfully to ${destinationPath}`);
if (file.content) { if (file.content) {
const writeCommand = Command.create('cat', ['>', destinationPath, '<<', 'EOF', file.content, 'EOF']); LOG.info("LINUX REGISTERER", `Writing content to ${destinationPath}: ${file.content}`);
const writeCommand = Command.create('echo', [file.content, '>', destinationPath]);
const writeOutput = await writeCommand.execute(); const writeOutput = await writeCommand.execute();
if (writeOutput.code === 0) { if (writeOutput.code === 0) {
console.log(`Content written successfully to ${destinationPath}`); console.log(`Content written successfully to ${destinationPath}`);