From 98e020b05cc13fa142186adbfd9d10783d4caa15 Mon Sep 17 00:00:00 2001 From: ayamir Date: Wed, 30 Aug 2023 18:15:09 +0800 Subject: [PATCH] fix(install): change user settings during installation. --- scripts/install.ps1 | 4 ++-- scripts/install.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install.ps1 b/scripts/install.ps1 index 922bba547..33d2261d9 100644 --- a/scripts/install.ps1 +++ b/scripts/install.ps1 @@ -390,9 +390,9 @@ Please make sure you have nvim v$REQUIRED_NVIM_VERSION_LEGACY installed at the v if (-not $USE_SSH) { info -Msg "Changing default fetching method to HTTPS..." safe_execute -WithCmd { - (Get-Content "$env:CCDEST_DIR\lua\core\settings.lua") | + (Get-Content "$env:CCDEST_DIR\lua\user\settings.lua") | ForEach-Object { $_ -replace '\["use_ssh"\] = true','["use_ssh"] = false' } | - Set-Content "$env:CCDEST_DIR\lua\core\settings.lua" + Set-Content "$env:CCDEST_DIR\lua\user\settings.lua" } } diff --git a/scripts/install.sh b/scripts/install.sh index ff55aebac..bdddc4139 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -289,7 +289,7 @@ cd "${DEST_DIR}" || return if [[ "${USE_SSH}" -eq "0" ]]; then info "Changing default fetching method to HTTPS..." - execute "perl" "-pi" "-e" "s/\[\"use_ssh\"\] \= true/\[\"use_ssh\"\] \= false/g" "${DEST_DIR}/lua/core/settings.lua" + execute "perl" "-pi" "-e" "s/\[\"use_ssh\"\] \= true/\[\"use_ssh\"\] \= false/g" "${DEST_DIR}/lua/user/settings.lua" fi info "Spawning Neovim and fetching plugins... (You'll be redirected shortly)"