git-last-commit
git-last-commit copied to clipboard
Should execute the git command in the context of the working directory
I wrote this tool to update changelogs with the latest git commit info, and I noticed when I install it globally, the git info seems to be coming from the global path to which it was installed to, vs the working directory of my project.
If I install it locally to the project and execute it via npm run
, then there's no problem.
Can we get an option to set the execution context of the git command to pwd()
?
It's possible.
Look at https://github.com/seymen/git-last-commit/blob/master/source/index.js#L7-L9
An option
params is available as 2nd param, and you can set {dst: proccess.pwd()}
It could be interesting to create an MR to add the "option" parameter in typescript definiton.