mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-08 18:12:33 +08:00
Change execSync/spawnSync to async (#4123)
* WIP * Add missing await * Update package-lock.json
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
const NotificationProvider = require("./notification-provider");
|
||||
const childProcess = require("child_process");
|
||||
const childProcessAsync = require("promisify-child-process");
|
||||
|
||||
class Apprise extends NotificationProvider {
|
||||
|
||||
@@ -11,7 +11,7 @@ class Apprise extends NotificationProvider {
|
||||
args.push("-t");
|
||||
args.push(notification.title);
|
||||
}
|
||||
const s = childProcess.spawnSync("apprise", args);
|
||||
const s = await childProcessAsync.spawn("apprise", args);
|
||||
|
||||
const output = (s.stdout) ? s.stdout.toString() : "ERROR: maybe apprise not found";
|
||||
|
||||
|
Reference in New Issue
Block a user