Stucco icon indicating copy to clipboard operation
Stucco copied to clipboard

Enhance Git Command Detection Flexibility

Open jimbrig opened this issue 2 years ago • 0 comments

See the bottom of #38 for details:


Note that during my inspection of these test files I found some other potential areas of improvement also.

For example, on my machine, I have two git executables on my PATH and therefore the statement $git = (Get-Command git -CommandType Application -ErrorAction SilentlyContinue) would return git.exe git.exe instead of just git.exe causing the $thisCommit = & $git log --decorate --oneline HEAD~1..HEAD expression to fail:

image

I simply addressed this issue by changing $git = (Get-Command git -CommandType Application -ErrorAction SilentlyContinue) to $git = (Get-Command git -CommandType Application -ErrorAction SilentlyContinue)[0] to ensure it always is singular.

Now I'm in the clear!

image


Solution to be provided in PR for both issues if you want them (if not that's fine also!).

jimbrig avatar Jan 06 '23 00:01 jimbrig