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

fix: cp command string with sh

This commit is contained in:
2026-02-26 22:07:20 +05:30
Verified
parent bc48391a70
commit 6e76747f06

View File

@@ -58,7 +58,7 @@ export function useLinuxRegisterer() {
const sourcePath = await join(resourceDirPath, file.source); const sourcePath = await join(resourceDirPath, file.source);
const destinationPath = await join(homeDirPath, file.destination); const destinationPath = await join(homeDirPath, file.destination);
const escapedContent = file.content?.replace(/'/g, `'\\''`) || ''; const escapedContent = file.content?.replace(/'/g, `'\\''`) || '';
const copyCommand = Command.create('sh', ['-c', 'cp', sourcePath, destinationPath]); const copyCommand = Command.create('sh', ['-c', `cp "${sourcePath}" "${destinationPath}"`]);
const writeCommand = Command.create('sh', ['-c', `printf '%s' '${escapedContent}' > "${destinationPath}"`]); const writeCommand = Command.create('sh', ['-c', `printf '%s' '${escapedContent}' > "${destinationPath}"`]);
if (file.content) { if (file.content) {