Let's find out! It's an open source project, so the code is all there for exploring (pun intended).
First off, clone the repository for easier searching: git clone https://github.com/git-lfs/git-lfs.git
. One can search via Github too, but a local copy is easier to work with.
Then, use a tool such as grep
to find a piece of the error message:
grep -r "command line tool" *
vendor/github.com/spf13/cobra/cobra.go:var MousetrapHelpText string = `This is a command line tool.
vendor/github.com/inconshreveable/mousetrap/README.md:Windows developers unfamiliar with command line tools will often "double-click"
Looks like there is a string that contains the message. What's the Mousetrap thing and where is it used?
grep -r "MousetrapHelpText" *
vendor/github.com/spf13/cobra/cobra.go:// MousetrapHelpText enables an information splash screen on Windows
vendor/github.com/spf13/cobra/cobra.go:var MousetrapHelpText string = `This is a command line tool.
vendor/github.com/spf13/cobra/command_win.go: if MousetrapHelpText != "" && mousetrap.StartedByExplorer() {
vendor/github.com/spf13/cobra/command_win.go: c.Print(MousetrapHelpText)
Looks interesting. Let's go to https://github.com/inconshreveable/mousetrap
for the source. There's the command_win.go
file that contains the magic.
TL;DR: A Windows process has startup info that contains parent process id. If that's the same Explorer.exe (Win GUI shell), assume GUI launching.