git-last-commit icon indicating copy to clipboard operation
git-last-commit copied to clipboard

Should execute the git command in the context of the working directory

Open theogravity opened this issue 4 years ago • 1 comments

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()?

theogravity avatar Apr 05 '20 20:04 theogravity

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.

J4YF7O avatar Jun 01 '21 09:06 J4YF7O