From b5d354f76b5de026de2523d4f24a72558fb8a6cd Mon Sep 17 00:00:00 2001 From: Andrew Rudoi Date: Mon, 16 Dec 2024 12:04:13 -0800 Subject: [PATCH] fix(friendshipper): fix initial repo clone from modal --- .../lib/components/oobe/WelcomeModal.svelte | 28 ++++++++----------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/friendshipper/src/lib/components/oobe/WelcomeModal.svelte b/friendshipper/src/lib/components/oobe/WelcomeModal.svelte index ef3fee4f..2ccb8f10 100644 --- a/friendshipper/src/lib/components/oobe/WelcomeModal.svelte +++ b/friendshipper/src/lib/components/oobe/WelcomeModal.svelte @@ -142,7 +142,6 @@ try { await updateAppConfig(updatedAppConfig); await emit('success', 'Preferences saved.'); - await restart(); } catch (e) { await emit('error', e); } @@ -151,26 +150,23 @@ const initiateRepoClone = async () => { errorMessage = ''; try { + cloning = true; await handleUpdateAppConfig(); - // only clone if this is our first time through - if (!currentConfig.repoPath) { - cloning = true; - await cloneRepo({ url: repoUrl, path: cloneLocation }); + await cloneRepo({ url: repoUrl, path: cloneLocation }); - // force update of repo status - message = 'Updating repo status...'; - $repoStatus = await getRepoStatus(SkipDllCheck.False, AllowOfflineCommunication.False); + // force update of repo status + message = 'Updating repo status...'; + $repoStatus = await getRepoStatus(SkipDllCheck.False, AllowOfflineCommunication.False); - // run initial fetch of DLLs - it may be worth moving this and the engine fetch - // to the clone endpoint on the backend - message = 'Performing initial fetch of DLLs...'; - await forceDownloadDlls(); + // run initial fetch of DLLs - it may be worth moving this and the engine fetch + // to the clone endpoint on the backend + message = 'Performing initial fetch of DLLs...'; + await forceDownloadDlls(); - // run initial fetch of Engine binaries - message = 'Performing initial fetch of Engine binaries...'; - await forceDownloadEngine(); - } + // run initial fetch of Engine binaries + message = 'Performing initial fetch of Engine binaries...'; + await forceDownloadEngine(); } catch (e) { const error = e as Error; errorMessage = String(error.message);