Skip to content

Commit

Permalink
Test git for safety
Browse files Browse the repository at this point in the history
Co-authored-by: Rashil Gandhi <[email protected]>
  • Loading branch information
niheaven and rashil2000 authored Apr 21, 2022
1 parent 82a942b commit c63acd8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/scoop.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ switch ($SubCommand) {

Get-LocalBucket | ForEach-Object {
$bucketLoc = Find-BucketDirectory $_ -Root
if (Test-Path (Join-Path $bucketLoc '.git')) {
if ((Test-Path (Join-Path $bucketLoc '.git')) -and (Test-CommandAvailable git)) {
Write-Host "'$_' bucket:"
Invoke-Expression "git -C '$bucketLoc' --no-pager log --oneline HEAD -n 1"
Write-Host ''
Expand Down

0 comments on commit c63acd8

Please sign in to comment.