diff --git a/main.ts b/main.ts index 63cab76..3870b4d 100644 --- a/main.ts +++ b/main.ts @@ -433,9 +433,13 @@ async function startRclone() { return await exit(0) } - const rcloneCommandFn = rclone?.system || rclone?.internal + const command = rclone?.system || rclone?.internal - const command = rcloneCommandFn! + if (!command) { + console.error('[startRclone] initRclone returned without a runnable command') + Sentry.captureException(new Error('initRclone returned without a runnable command.')) + return + } command.addListener('close', async (event) => { console.log('close', event)