File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -18,17 +18,18 @@ param([string]$RepoDir = "$PWD")
18
18
try {
19
19
$StopWatch = [system.diagnostics.stopwatch ]::startNew()
20
20
21
- " ⏳ Step 1/2: Checking requirements ... "
22
- $null = ( git -- version)
21
+ " ⏳ Step 1/3 - Searching for Git executable ... "
22
+ & git -- version
23
23
if ($lastExitCode -ne " 0" ) { throw " Can't execute 'git' - make sure Git is installed and available" }
24
24
25
- if (-not (Test-Path " $RepoDir " - pathType container)) { throw " Can't access folder: $RepoDir " }
25
+ $RepoDirName = (Get-Item " $RepoDir " ).Name
26
+ " ⏳ Step 2/3 - Checking folder 📂$RepoDirName ... "
27
+ if (! (Test-Path " $RepoDir " - pathType container)) { throw " Can't access folder: $RepoDir " }
26
28
27
- " ⏳ Step 2/2: Fetching updates... "
29
+ " ⏳ Step 3/3 - Fetching updates... "
28
30
& git - C " $RepoDir " fetch -- all -- recurse- submodules -- prune -- prune- tags -- force
29
31
if ($lastExitCode -ne " 0" ) { throw " 'git fetch' failed with exit code $lastExitCode " }
30
32
31
- $RepoDirName = (get-item " $RepoDir " ).Name
32
33
[int ]$Elapsed = $StopWatch.Elapsed.TotalSeconds
33
34
" ✔️ fetched updates for 📂$RepoDirName repo in $Elapsed sec"
34
35
exit 0 # success
You can’t perform that action at this time.
0 commit comments