From 6e669159e8b97a68d84a3e91cc9f11dc125948cf Mon Sep 17 00:00:00 2001 From: FTCHD <144691102+FTCHD@users.noreply.github.com> Date: Sun, 22 Feb 2026 20:34:33 +0300 Subject: [PATCH] handle empty command initialization --- main.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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)