mirror of
https://github.com/neosubhamoy/neodlp.git
synced 2026-03-22 05:45:50 +05:30
refactor: use cat instead of echo
This commit is contained in:
@@ -71,8 +71,8 @@
|
||||
"args": true
|
||||
},
|
||||
{
|
||||
"name": "echo",
|
||||
"cmd": "echo",
|
||||
"name": "cat",
|
||||
"cmd": "cat",
|
||||
"args": true
|
||||
}
|
||||
]
|
||||
|
||||
@@ -63,7 +63,7 @@ export function useLinuxRegisterer() {
|
||||
console.log(`File ${file.source} copied successfully to ${destinationPath}`);
|
||||
LOG.info("LINUX REGISTERER", `File ${file.source} copied successfully to ${destinationPath}`);
|
||||
if (file.content) {
|
||||
const writeCommand = Command.create('echo', [file.content, '>', destinationPath]);
|
||||
const writeCommand = Command.create('cat', ['>', destinationPath, '<<', 'EOF', file.content, 'EOF']);
|
||||
const writeOutput = await writeCommand.execute();
|
||||
if (writeOutput.code === 0) {
|
||||
console.log(`Content written successfully to ${destinationPath}`);
|
||||
|
||||
Reference in New Issue
Block a user