From 5fe76f45f4ac2b58bcc3d7f7191597f4e42de212 Mon Sep 17 00:00:00 2001 From: FTCHD <144691102+FTCHD@users.noreply.github.com> Date: Sat, 11 Jul 2026 19:47:32 +0300 Subject: [PATCH] add to path --- lib/rclone/init.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/rclone/init.ts b/lib/rclone/init.ts index 2ec7967..e570815 100644 --- a/lib/rclone/init.ts +++ b/lib/rclone/init.ts @@ -22,7 +22,7 @@ import { resolveDefaultConfigPath, validateRcloneBinary, } from './common' -import { downloadVersion, listDownloadedVersions } from './versions' +import { downloadVersion, listDownloadedVersions, setPathIntegration } from './versions' export async function initRclone(args: string[]) { console.log('[initRclone] starting with args:', args) @@ -49,6 +49,16 @@ export async function initRclone(args: string[]) { usePersistedStore.getState().setRclonePath(provisionedPath) rclonePath = provisionedPath + + // The system had no rclone at all, so our copy should serve the shell too: enable PATH + // integration by default (the Settings toggle reflects it). Best-effort — on macOS this + // shows an admin prompt the user may cancel. + try { + await setPathIntegration(true, provisionedPath) + } catch (error) { + console.warn('[initRclone] default PATH integration failed', error) + } + useStore.setState({ startupStatus: 'initialized' }) if (!['windows', 'macos'].includes(platform())) {