From 0c3bd50246ea0abf2fd8a10c195e467fb5bb99c1 Mon Sep 17 00:00:00 2001 From: Baipyrus Date: Thu, 28 Nov 2024 15:08:23 +0100 Subject: [PATCH] implement fallback strategy in case of local contents --- util/windows.psm1 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/util/windows.psm1 b/util/windows.psm1 index a9a2ccd..7d6299a 100644 --- a/util/windows.psm1 +++ b/util/windows.psm1 @@ -47,6 +47,14 @@ function ReadyDotfilesRepo return $destination } + # Try using current directory + $request = Read-Host "Clone the dotfiles repository anew? [y/N]" + if ($request.ToLower() -ne 'y') + { + Write-Warning "Fallback to current directory (Errors without necessary files)!" + return $cwd + } + Write-Host "Cloning dotfiles repository..." -ForegroundColor Cyan git clone $url $destination return $destination