Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance Git Command Detection Flexibility #39

Open
jimbrig opened this issue Jan 6, 2023 · 0 comments
Open

Enhance Git Command Detection Flexibility #39

jimbrig opened this issue Jan 6, 2023 · 0 comments

Comments

@jimbrig
Copy link

jimbrig commented Jan 6, 2023

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 jimbrig mentioned this issue Jan 6, 2023
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant