aboutsummaryrefslogtreecommitdiff
path: root/src/lib/utils/BushUtils.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-07-10 21:54:43 +0200
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-07-10 21:54:43 +0200
commit627979e836edd0801f9201a98e239bf697a211be (patch)
tree0cf2d347d4eb6f02bfcc714307c4e211664c53b9 /src/lib/utils/BushUtils.ts
parent131b44f23be250aed2aeacdb51321b141d2ede4f (diff)
downloadtanzanite-627979e836edd0801f9201a98e239bf697a211be.tar.gz
tanzanite-627979e836edd0801f9201a98e239bf697a211be.tar.bz2
tanzanite-627979e836edd0801f9201a98e239bf697a211be.zip
allow more config options to be null / not set
Diffstat (limited to 'src/lib/utils/BushUtils.ts')
-rw-r--r--src/lib/utils/BushUtils.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/utils/BushUtils.ts b/src/lib/utils/BushUtils.ts
index 059d001..e3539a1 100644
--- a/src/lib/utils/BushUtils.ts
+++ b/src/lib/utils/BushUtils.ts
@@ -11,7 +11,7 @@ import {
} from '#lib';
import { humanizeDuration as humanizeDurationMod } from '@notenoughupdates/humanize-duration';
import assert from 'assert';
-import { exec } from 'child_process';
+import cp from 'child_process';
import deepLock from 'deep-lock';
import { Util as AkairoUtil } from 'discord-akairo';
import {
@@ -43,13 +43,15 @@ export function capitalize(text: string): string {
return text.charAt(0).toUpperCase() + text.slice(1);
}
+export const exec = promisify(cp.exec);
+
/**
* Runs a shell command and gives the output
* @param command The shell command to run
* @returns The stdout and stderr of the shell command
*/
export async function shell(command: string): Promise<{ stdout: string; stderr: string }> {
- return await promisify(exec)(command);
+ return await exec(command);
}
/**