mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
style(exec): type-annotate spawned child as ChildProcess and format spawn call
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { PromiseRejectErrorFunction } from "../../Types/FunctionTypes";
|
||||
import {
|
||||
ChildProcess,
|
||||
ExecException,
|
||||
ExecOptions,
|
||||
SpawnOptions,
|
||||
@@ -101,7 +102,11 @@ export default class Execute {
|
||||
...data.options,
|
||||
};
|
||||
|
||||
const child = spawn(data.command, data.args ?? [], spawnOptions);
|
||||
const child: ChildProcess = spawn(
|
||||
data.command,
|
||||
data.args ?? [],
|
||||
spawnOptions,
|
||||
);
|
||||
|
||||
child.on("error", (err: Error) => {
|
||||
logger.error(
|
||||
|
||||
Reference in New Issue
Block a user