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:
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!
Solution to be provided in PR for both issues if you want them (if not that's fine also!).
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 returngit.exe git.exe
instead of justgit.exe
causing the$thisCommit = & $git log --decorate --oneline HEAD~1..HEAD
expression to fail: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!
Solution to be provided in PR for both issues if you want them (if not that's fine also!).