From f4ab9e9cb817f23321aa8e039cc6c3450cbdf845 Mon Sep 17 00:00:00 2001 From: Matthew R Date: Fri, 20 Dec 2019 12:54:35 -0500 Subject: [PATCH] change spawn path --- src/intervals/storage.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/intervals/storage.ts b/src/intervals/storage.ts index 0727a73..2c1c503 100644 --- a/src/intervals/storage.ts +++ b/src/intervals/storage.ts @@ -25,11 +25,11 @@ export default async function storage(client: Client) { setInterval(async () => { await main(); }, 900000); */ - let storageGo = spawn(`${__dirname}/../bin/storage`, []); + let storageGo = spawn(`${__dirname}/../bin/storage`, [], { cwd: __dirname }); storageGo.stdout.on('data', (data) => client.signale.log(data.toString())); storageGo.stderr.on('data', (data) => client.signale.log(data.toString())); storageGo.on('exit', (code) => { client.signale.log(`Go storage func exited with code ${code}, restarting`); - storageGo = spawn(`${__dirname}/../bin/storage`, []); + storageGo = spawn(`${__dirname}/../bin/storage`, [], { cwd: __dirname }); }); }