fix: Update Apprise notification command execution method

This commit is contained in:
Greirson Lee-Thorp
2025-02-07 10:44:13 -08:00
parent d1aab6bc60
commit 0dd96b50ac

View File

@@ -616,9 +616,10 @@ async function sendNotification(filename, fileSize) {
.replace('{size}', formattedSize) .replace('{size}', formattedSize)
.replace('{storage}', totalStorage); .replace('{storage}', totalStorage);
// Use array syntax to avoid shell interpretation // Use a string command instead of an array
await execAsync(['apprise', APPRISE_URL, '-b', message], { const command = `apprise ${APPRISE_URL} -b "${message}"`;
shell: false await execAsync(command, {
shell: true
}); });
log.info(`Notification sent for: ${sanitizedFilename} (${formattedSize}, Total storage: ${totalStorage})`); log.info(`Notification sent for: ${sanitizedFilename} (${formattedSize}, Total storage: ${totalStorage})`);