GitGuardian / src-fingerprint

Extract git related information (file shas, commit shas) from your hosted source version control system
MIT License
20 stars 10 forks source link

Find alternative solution for bash, pipe and grep #42

Open pierrelalanne opened 2 years ago

pierrelalanne commented 2 years ago

In this issue, we would like to see if we can somehow easily get rid of the bash -c, pipe and grep commands in the code.
Instead we would like to use go to pipe the commands, and go as well to grep relevant results.

This is in order to simplify the install for Windows user, and make it available for people that don't have a bash emulator available.

As the logic behind a bash pipe is pretty complex (especially when it comes to error management), a possible outcome is an unsuccessful attempt, we are okay with this as long as we can explain our choice.

MichaelPereira commented 2 years ago

Not a complete replacement for everything, but the use of the script package could provide a nicer integration of shell and script commands into the go code.