From b54cda63e893c26200494ded2656bc0cd08a9c16 Mon Sep 17 00:00:00 2001 From: dylan <> Date: Wed, 27 Mar 2024 19:22:08 -0700 Subject: [PATCH] add some logging? --- src/server/util/pico8.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/server/util/pico8.ts b/src/server/util/pico8.ts index a5cfee8..1ae440f 100644 --- a/src/server/util/pico8.ts +++ b/src/server/util/pico8.ts @@ -22,6 +22,13 @@ const execPico = (args: string[]) => { export const pico8 = { async export(fileIn: string, fileOut: string) { - return await execPico([fileIn, "-export", fileOut]); + try { + return await execPico([fileIn, "-export", fileOut]); + } catch (err) { + console.log("CAUGHT ERROR", err); + } } -} \ No newline at end of file +} + +// const result = await pico8.export("/home/dylan/.lexaloffle/pico-8/carts/candles/candles.p8", "/home/dylan/repos/picobook/sample.js"); +// console.log(result); \ No newline at end of file