Update util.js

Fixed Notify
This commit is contained in:
Smealm 2023-07-05 20:08:52 -07:00 committed by GitHub
parent f0e15b5c7c
commit e301b03639
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -103,7 +103,7 @@ import { cfg } from './config.js';
export const notify = (html) => new Promise((resolve, reject) => { export const notify = (html) => new Promise((resolve, reject) => {
if (!cfg.notify) return resolve(); if (!cfg.notify) return resolve();
const title = cfg.notify_title ? `-t ${cfg.notify_title}` : ''; const title = cfg.notify_title ? `-t ${cfg.notify_title}` : '';
exec(`apprise ${cfg.notify} -i html '${title}' -b '${html}'`, (error, stdout, stderr) => { exec(`apprise ${cfg.notify} -i html "${title}" -b "${html}"`, (error, stdout, stderr) => {
if (error) { if (error) {
console.log(`error: ${error.message}`); console.log(`error: ${error.message}`);
if (error.message.includes('command not found')) { if (error.message.includes('command not found')) {