From 5e90fac99f92c98bc1e70035857899e503aad0e0 Mon Sep 17 00:00:00 2001 From: Subhamoy Biswas Date: Thu, 26 Feb 2026 13:44:51 +0530 Subject: [PATCH] refactor: use cat instead of echo --- src-tauri/capabilities/shell.json | 4 ++-- src/helpers/use-linux-registerer.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src-tauri/capabilities/shell.json b/src-tauri/capabilities/shell.json index 43ea75f..85d90e1 100644 --- a/src-tauri/capabilities/shell.json +++ b/src-tauri/capabilities/shell.json @@ -71,8 +71,8 @@ "args": true }, { - "name": "echo", - "cmd": "echo", + "name": "cat", + "cmd": "cat", "args": true } ] diff --git a/src/helpers/use-linux-registerer.ts b/src/helpers/use-linux-registerer.ts index edc69b9..eb17bbb 100644 --- a/src/helpers/use-linux-registerer.ts +++ b/src/helpers/use-linux-registerer.ts @@ -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}`);